CSMultiplayerRules: use Destroy() instead of plain remove() on NSEntity derivatives

This commit is contained in:
Marco Cawthorne 2023-03-01 21:58:55 -08:00
parent c7d4f3631a
commit ff59be9392
Signed by: eukara
GPG key ID: CE2032F0A2882A22

View file

@ -485,7 +485,12 @@ CSMultiplayerRules::RestartRound(int iWipe)
/* clear the corpses/items/bombs */
for (entity eFind = world; (eFind = find(eFind, ::classname, "remove_me"));) {
remove(eFind);
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;