mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-26 14:45:38 +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
|
#ifdef REGAMEDLL_FIXES
|
||||||
if (m_pBombDefuser == pPlayer)
|
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;
|
m_fNextDefuse = gpGlobals->time + NEXT_DEFUSE_TIME;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
m_fNextDefuse = gpGlobals->time + NEXT_DEFUSE_TIME;
|
|
||||||
#endif // #ifdef REGAMEDLL_FIXES
|
|
||||||
|
|
||||||
return;
|
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);
|
DefuseBombStart(pPlayer);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user