@@ -990,25 +990,9 @@ static void actionHomeBasePos(SDWORD player, SDWORD *px, SDWORD *py)
990990
991991#define VTOL_ATTACK_AUDIO_DELAY (3*GAME_TICKS_PER_SEC)
992992
993- // Update the action state for a droid
994- void actionUpdateDroid (DROID * psDroid )
993+ void actionSanity (DROID * psDroid )
995994{
996- BASE_OBJECT * psTarget ;
997- PROPULSION_STATS * psPropStats ;
998- BOOL (* actionUpdateFunc )(DROID * psDroid ) = NULL ;
999- signed int i ;
1000- unsigned int j ;
1001- //this is a bit field
1002- bool nonNullWeapon [DROID_MAXWEAPS ] = { false };
1003- BASE_OBJECT * psTargets [DROID_MAXWEAPS ];
1004- bool hasVisibleTarget = false;
1005- bool targetVisibile [DROID_MAXWEAPS ] = { false };
1006- bool bHasTarget ;
1007-
1008- CHECK_DROID (psDroid );
1009-
1010- psPropStats = asPropulsionStats + psDroid -> asBits [COMP_PROPULSION ].nStat ;
1011- ASSERT_OR_RETURN (, psPropStats != NULL , "Invalid propulsion stats pointer" );
995+ int i ;
1012996
1013997 // clear the target if it has died
1014998 for (i = 0 ; i < DROID_MAXWEAPS ; i ++ )
@@ -1040,6 +1024,29 @@ void actionUpdateDroid(DROID *psDroid)
10401024 }
10411025 }
10421026 }
1027+ }
1028+
1029+ // Update the action state for a droid
1030+ void actionUpdateDroid (DROID * psDroid )
1031+ {
1032+ BASE_OBJECT * psTarget ;
1033+ PROPULSION_STATS * psPropStats ;
1034+ BOOL (* actionUpdateFunc )(DROID * psDroid ) = NULL ;
1035+ signed int i ;
1036+ unsigned int j ;
1037+ //this is a bit field
1038+ bool nonNullWeapon [DROID_MAXWEAPS ] = { false };
1039+ BASE_OBJECT * psTargets [DROID_MAXWEAPS ];
1040+ bool hasVisibleTarget = false;
1041+ bool targetVisibile [DROID_MAXWEAPS ] = { false };
1042+ bool bHasTarget ;
1043+
1044+ CHECK_DROID (psDroid );
1045+
1046+ psPropStats = asPropulsionStats + psDroid -> asBits [COMP_PROPULSION ].nStat ;
1047+ ASSERT_OR_RETURN (, psPropStats != NULL , "Invalid propulsion stats pointer" );
1048+
1049+ actionSanity (psDroid );
10431050
10441051 //if the droid has been attacked by an EMP weapon, it is temporarily disabled
10451052 if (psDroid -> lastHitWeapon == WSC_EMP )
0 commit comments