mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-04-11 20:20:02 +03:00
Changed the order of setting pev->body for the correct value in SetBombIcon() (#893)
This commit is contained in:
parent
9ab1589d32
commit
b10489f2e0
@ -249,11 +249,13 @@ EXT_FUNC CBaseEntity *CCSPlayer::GiveNamedItemEx(const char *pszName)
|
|||||||
|
|
||||||
if (FStrEq(pszName, "weapon_c4")) {
|
if (FStrEq(pszName, "weapon_c4")) {
|
||||||
pPlayer->m_bHasC4 = true;
|
pPlayer->m_bHasC4 = true;
|
||||||
pPlayer->SetBombIcon();
|
|
||||||
|
|
||||||
if (pPlayer->m_iTeam == TERRORIST) {
|
if (pPlayer->m_iTeam == TERRORIST) {
|
||||||
pPlayer->pev->body = 1;
|
pPlayer->pev->body = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pPlayer->SetBombIcon();
|
||||||
|
|
||||||
} else if (FStrEq(pszName, "weapon_shield")) {
|
} else if (FStrEq(pszName, "weapon_shield")) {
|
||||||
pPlayer->DropPrimary();
|
pPlayer->DropPrimary();
|
||||||
pPlayer->DropPlayerItem("weapon_elite");
|
pPlayer->DropPlayerItem("weapon_elite");
|
||||||
|
@ -1695,7 +1695,6 @@ void EXT_FUNC CBasePlayer::__API_HOOK(GiveDefaultItems)()
|
|||||||
|
|
||||||
void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
||||||
{
|
{
|
||||||
bool bKillProgBar = false;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
@ -1715,20 +1714,12 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
|||||||
{
|
{
|
||||||
m_bHasC4 = false;
|
m_bHasC4 = false;
|
||||||
pev->body = 0;
|
pev->body = 0;
|
||||||
|
SetBombIcon(FALSE);
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
SetProgressBarTime(0);
|
||||||
WRITE_BYTE(STATUSICON_HIDE);
|
|
||||||
WRITE_STRING("c4");
|
|
||||||
MESSAGE_END();
|
|
||||||
|
|
||||||
bKillProgBar = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveShield();
|
RemoveShield();
|
||||||
|
|
||||||
if (bKillProgBar)
|
|
||||||
SetProgressBarTime(0);
|
|
||||||
|
|
||||||
if (m_pActiveItem)
|
if (m_pActiveItem)
|
||||||
{
|
{
|
||||||
ResetAutoaim();
|
ResetAutoaim();
|
||||||
@ -10361,8 +10352,8 @@ bool EXT_FUNC CBasePlayer::__API_HOOK(MakeBomber)()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_bHasC4 = true;
|
m_bHasC4 = true;
|
||||||
SetBombIcon();
|
|
||||||
pev->body = 1;
|
pev->body = 1;
|
||||||
|
SetBombIcon();
|
||||||
|
|
||||||
m_flDisplayHistory |= DHF_BOMB_RETRIEVED;
|
m_flDisplayHistory |= DHF_BOMB_RETRIEVED;
|
||||||
HintMessage("#Hint_you_have_the_bomb", FALSE, TRUE);
|
HintMessage("#Hint_you_have_the_bomb", FALSE, TRUE);
|
||||||
|
@ -1920,8 +1920,8 @@ void CWeaponBox::Touch(CBaseEntity *pOther)
|
|||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
pPlayer->m_bHasC4 = true;
|
pPlayer->m_bHasC4 = true;
|
||||||
pPlayer->SetBombIcon(FALSE);
|
|
||||||
pPlayer->pev->body = 1;
|
pPlayer->pev->body = 1;
|
||||||
|
pPlayer->SetBombIcon(FALSE);
|
||||||
|
|
||||||
CBaseEntity *pEntity = nullptr;
|
CBaseEntity *pEntity = nullptr;
|
||||||
while ((pEntity = UTIL_FindEntityByClassname(pEntity, "player")))
|
while ((pEntity = UTIL_FindEntityByClassname(pEntity, "player")))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user