Counter-Strike: Fixed hostage-rescue zone generation check. Exposed by trying to play bhd_cs by Nipper

This commit is contained in:
Marco Cawthorne 2020-08-27 06:33:44 +02:00
parent 69ed06b1fe
commit b7ac9ade38
3 changed files with 8 additions and 3 deletions

View file

@ -55,6 +55,9 @@ func_hostage_rescue::touch(void)
return;
}
if (!((player)hosty.m_eFollowing))
return;
Radio_BroadcastMessage(RADIO_RESCUED);
g_cs_hostagesrescued++;

View file

@ -149,9 +149,7 @@ CSMultiplayerRules::CreateRescueZones(void)
/* count the already existing rescue zones. */
for (entity e = world; (e = find(e, ::classname, "func_hostage_rescue"));) {
if (e.team == TEAM_CT) {
zones++;
}
zones++;
}
/* we don't need to create any additional rescue zones. */

View file

@ -54,6 +54,10 @@ info_hostage_rescue::touch(void)
return;
}
/* some custom maps are very smart... */
if (!((player)hosty.m_eFollowing))
return;
Radio_BroadcastMessage(RADIO_RESCUED);
g_cs_hostagesrescued++;