File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -593,8 +593,17 @@ UpdateSleepTime ParticleUplinkCannonUpdate::update()
593
593
Int linkCount = way->getNumLinks ();
594
594
Int which = GameLogicRandomValue ( 0 , linkCount-1 );
595
595
way = way->getLink ( which );
596
- m_nextDestWaypointID = way->getID ();
597
- m_overrideTargetDestination.set ( way->getLocation () );
596
+
597
+ // TheSuperHackers @bugfix Caball009 27/06/2025 Check if the last way point has been reached before attempting to access the next way point.
598
+ if ( way )
599
+ {
600
+ m_nextDestWaypointID = way->getID ();
601
+ m_overrideTargetDestination.set (way->getLocation ());
602
+ }
603
+ else
604
+ {
605
+ m_nextDestWaypointID = INVALID_WAYPOINT_ID;
606
+ }
598
607
}
599
608
}
600
609
}
You can’t perform that action at this time.
0 commit comments