From 71cf666bbd271562546f29d13eeccdced6c6602f Mon Sep 17 00:00:00 2001 From: erorcun Date: Sat, 20 Feb 2021 23:58:08 +0300 Subject: A saner way to remove Stingers, may fix Physical crash --- src/objects/Stinger.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/objects/Stinger.cpp b/src/objects/Stinger.cpp index 79730c89..848a7cf7 100644 --- a/src/objects/Stinger.cpp +++ b/src/objects/Stinger.cpp @@ -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; } -- cgit v1.2.3