CSMultiplayerRules: Remove temp items after respawning everything else to avoid phantom pickups.

This commit is contained in:
Marco Cawthorne 2024-03-06 22:24:44 -08:00
parent 0e8be2560b
commit 9893e8bc3e
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 10 additions and 9 deletions

View File

@ -589,15 +589,6 @@ CSMultiplayerRules::RestartRound(int iWipe)
}
}
/* clear the corpses/items/bombs */
for (entity eFind = world; (eFind = find(eFind, ::classname, "remove_me"));) {
if (eFind.identity) {
NSEntity e = (NSEntity)eFind;
e.Destroy();
} else {
remove(eFind);
}
}
for (entity eFind = world; (eFind = find(eFind, ::classname, "tempdecal"));) {
decal dec = (decal)eFind;
dec.m_strTexture = "";
@ -657,6 +648,16 @@ CSMultiplayerRules::RestartRound(int iWipe)
caw.Respawn();
}
/* clear the corpses/items/bombs */
for (entity eFind = world; (eFind = find(eFind, ::classname, "remove_me"));) {
if (eFind.identity) {
NSEntity toRemove = (NSEntity)eFind;
toRemove.Destroy();
} else {
remove(eFind);
}
}
CSBot_BuyStart();
TimerBegin(autocvar_mp_freezetime, GAME_FREEZE);
Money_ResetTeamReward();