mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-02-04 01:30:32 +03:00
fix: do not overwrite CC4::Think()
Co-authored-by: Garey27 <ak.garey@gmail.com> Co-authored-by: s1lentq <s1lentsk@yandex.ru>
This commit is contained in:
parent
889edc81bf
commit
d97482640a
@ -870,7 +870,6 @@ public:
|
||||
virtual BOOL Deploy();
|
||||
virtual void Holster(int skiplocal);
|
||||
virtual void AttachToPlayer(CBasePlayer* pPlayer);
|
||||
virtual void Think();
|
||||
virtual float GetMaxSpeed();
|
||||
virtual int iItemSlot() { return C4_SLOT; }
|
||||
virtual void PrimaryAttack();
|
||||
@ -884,6 +883,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
void EXPORT TrackPlayerHeldPosition();
|
||||
Vector GetLastValidHeldPosition() const { return m_vecLastValidPlayerHeldPosition; }
|
||||
|
||||
public:
|
||||
|
@ -388,7 +388,7 @@ void CC4::AttachToPlayer(CBasePlayer* pPlayer)
|
||||
CBasePlayerWeapon::AttachToPlayer(pPlayer);
|
||||
|
||||
#ifdef REGAMEDLL_ADD
|
||||
SetThink(&CC4::Think);
|
||||
SetThink(&CC4::TrackPlayerHeldPosition);
|
||||
pev->nextthink = gpGlobals->time + WEAPON_C4_UPDATE_LAST_VALID_PLAYER_HELD_POSITION_INTERVAL;
|
||||
|
||||
if (pPlayer->IsPlayer() && pPlayer->IsAlive())
|
||||
@ -399,9 +399,8 @@ void CC4::AttachToPlayer(CBasePlayer* pPlayer)
|
||||
#endif
|
||||
}
|
||||
|
||||
void CC4::Think()
|
||||
void CC4::TrackPlayerHeldPosition()
|
||||
{
|
||||
#ifdef REGAMEDLL_ADD
|
||||
pev->nextthink = gpGlobals->time + WEAPON_C4_UPDATE_LAST_VALID_PLAYER_HELD_POSITION_INTERVAL;
|
||||
|
||||
// If the bomb is held by an alive player standing on the ground, then we can use this
|
||||
@ -412,7 +411,4 @@ void CC4::Think()
|
||||
entvars_t* pevPlayer = m_pPlayer->pev;
|
||||
m_vecLastValidPlayerHeldPosition = pevPlayer->origin + pevPlayer->mins;
|
||||
}
|
||||
#else
|
||||
CBasePlayerWeapon::Think();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user