mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-01-28 22:48:02 +03:00
Minor refactoring
This commit is contained in:
parent
f8b082fece
commit
b669a3907a
@ -1489,8 +1489,7 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
|||||||
|
|
||||||
if (m_bHasDefuser)
|
if (m_bHasDefuser)
|
||||||
{
|
{
|
||||||
m_bHasDefuser = false;
|
RemoveDefuser();
|
||||||
pev->body = 0;
|
|
||||||
|
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
||||||
WRITE_BYTE(STATUSICON_HIDE);
|
WRITE_BYTE(STATUSICON_HIDE);
|
||||||
@ -2124,8 +2123,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Killed)(entvars_t *pevAttacker, int iGib)
|
|||||||
}
|
}
|
||||||
else if (m_bHasDefuser)
|
else if (m_bHasDefuser)
|
||||||
{
|
{
|
||||||
m_bHasDefuser = false;
|
RemoveDefuser();
|
||||||
pev->body = 0;
|
|
||||||
|
|
||||||
#ifdef REGAMEDLL_FIXES
|
#ifdef REGAMEDLL_FIXES
|
||||||
CItemThighPack *pDefuser = (CItemThighPack *)CBaseEntity::Create("item_thighpack", pev->origin, g_vecZero, ENT(pev));
|
CItemThighPack *pDefuser = (CItemThighPack *)CBaseEntity::Create("item_thighpack", pev->origin, g_vecZero, ENT(pev));
|
||||||
@ -3447,8 +3445,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Disappear)()
|
|||||||
}
|
}
|
||||||
else if (m_bHasDefuser)
|
else if (m_bHasDefuser)
|
||||||
{
|
{
|
||||||
m_bHasDefuser = false;
|
RemoveDefuser();
|
||||||
pev->body = 0;
|
|
||||||
GiveNamedItem("item_thighpack");
|
GiveNamedItem("item_thighpack");
|
||||||
|
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
||||||
@ -7794,8 +7791,7 @@ void CBasePlayer::__API_HOOK(SwitchTeam)()
|
|||||||
|
|
||||||
if (m_bHasDefuser)
|
if (m_bHasDefuser)
|
||||||
{
|
{
|
||||||
m_bHasDefuser = false;
|
RemoveDefuser();
|
||||||
pev->body = 0;
|
|
||||||
|
|
||||||
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
MESSAGE_BEGIN(MSG_ONE, gmsgStatusIcon, nullptr, pev);
|
||||||
WRITE_BYTE(STATUSICON_HIDE);
|
WRITE_BYTE(STATUSICON_HIDE);
|
||||||
@ -9498,6 +9494,12 @@ void CBasePlayer::RemoveBomb()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CBasePlayer::RemoveDefuser()
|
||||||
|
{
|
||||||
|
m_bHasDefuser = false;
|
||||||
|
pev->body = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void CBasePlayer::Disconnect()
|
void CBasePlayer::Disconnect()
|
||||||
{
|
{
|
||||||
SetThink(nullptr);
|
SetThink(nullptr);
|
||||||
|
@ -605,6 +605,7 @@ public:
|
|||||||
void DropPrimary();
|
void DropPrimary();
|
||||||
void OnSpawnEquip(bool addDefault = true, bool equipGame = true);
|
void OnSpawnEquip(bool addDefault = true, bool equipGame = true);
|
||||||
void RemoveBomb();
|
void RemoveBomb();
|
||||||
|
void RemoveDefuser();
|
||||||
void HideTimer();
|
void HideTimer();
|
||||||
bool MakeBomber();
|
bool MakeBomber();
|
||||||
bool GetIntoGame();
|
bool GetIntoGame();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user