A saner way to remove Stingers, may fix Physical crash

This commit is contained in:
erorcun 2021-02-20 23:58:08 +03:00
parent 040c6f9027
commit 71cf666bbd
1 changed files with 6 additions and 0 deletions

View File

@ -75,10 +75,16 @@ CStinger::Remove()
for (int32 i = 0; i < NUM_STINGER_SEGMENTS; i++) {
CStingerSegment *spikeSegment = pSpikes[i];
#ifdef FIX_BUGS
CWorld::Remove(spikeSegment);
delete spikeSegment;
#else
if (spikeSegment->m_entryInfoList.first != nil)
spikeSegment->bRemoveFromWorld = true;
else
delete spikeSegment;
#endif
}
bIsDeployed = false;
}