mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-25 14:15:35 +03:00
CGrenade::Use: Fixed spam sound on defuse start, if player in air
This commit is contained in:
parent
22f5fe3831
commit
c35545a5b8
@ -1151,21 +1151,20 @@ void CGrenade::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useTy
|
||||
{
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
if (m_pBombDefuser == pPlayer)
|
||||
#endif
|
||||
{
|
||||
if ((pPlayer->pev->flags & FL_ONGROUND) != FL_ONGROUND) // Defuse should start only on ground
|
||||
{
|
||||
ClientPrint(pPlayer->pev, HUD_PRINTCENTER, "#C4_Defuse_Must_Be_On_Ground");
|
||||
return;
|
||||
}
|
||||
|
||||
m_fNextDefuse = gpGlobals->time + NEXT_DEFUSE_TIME;
|
||||
}
|
||||
#else
|
||||
m_fNextDefuse = gpGlobals->time + NEXT_DEFUSE_TIME;
|
||||
#endif // #ifdef REGAMEDLL_FIXES
|
||||
|
||||
return;
|
||||
}
|
||||
#ifdef REGAMEDLL_FIXES
|
||||
else if ((pPlayer->pev->flags & FL_ONGROUND) != FL_ONGROUND) // Defuse should start only on ground
|
||||
{
|
||||
ClientPrint(pPlayer->pev, HUD_PRINTCENTER, "#C4_Defuse_Must_Be_On_Ground");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
DefuseBombStart(pPlayer);
|
||||
}
|
||||
|
@ -1502,8 +1502,8 @@ void CBasePlayer::RemoveAllItems(BOOL removeSuit)
|
||||
m_pTank->Use(this, this, USE_OFF, 0);
|
||||
m_pTank = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
if (m_bHasDefuser)
|
||||
{
|
||||
RemoveDefuser();
|
||||
|
Loading…
Reference in New Issue
Block a user