Counter-Strike: Prevent the player defusing the bomb from moving.
This commit is contained in:
parent
70451433b8
commit
dc43e5f3a9
3 changed files with 10 additions and 3 deletions
|
@ -129,6 +129,11 @@ CSGameRules::PlayerPostFrame(base_player pp)
|
|||
pl.old_a_ammo3 = pl.a_ammo3;
|
||||
pl.old_cs_shotmultiplier = pl.cs_shotmultiplier;
|
||||
pl.old_cs_shottime = pl.cs_shottime;
|
||||
|
||||
if (g_cs_gamestate != GAME_FREEZE) {
|
||||
if (pl.progress <= 0.0f)
|
||||
pl.flags &= ~FL_FROZEN;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -102,13 +102,13 @@ CSMultiplayerRules::PlayerDeath(base_player pl)
|
|||
void
|
||||
CSMultiplayerRules::PlayerPreFrame(base_player pl)
|
||||
{
|
||||
player pp = (player)pl;
|
||||
|
||||
if (pl.health <= 0)
|
||||
return;
|
||||
|
||||
if (g_cs_gamestate == GAME_FREEZE) {
|
||||
if (g_cs_gamestate == GAME_FREEZE || pp.progress > 0.0f) {
|
||||
pl.flags |= FL_FROZEN;
|
||||
} else {
|
||||
pl.flags &= ~FL_FROZEN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ item_c4::ClearProgress(void)
|
|||
if (m_eUser != world) {
|
||||
player pl = (player)m_eUser;
|
||||
pl.progress = 0.0f;
|
||||
pl.flags &= ~FL_FROZEN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,6 +66,7 @@ item_c4::Logic(void)
|
|||
|
||||
/* tracked stat */
|
||||
pl.progress = m_flDefusalState;
|
||||
pl.flags |= FL_FROZEN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue