Skip to content

Commit 99ec8a0

Browse files
committed
Fix multiturret droids trying to look at invalid weapon slots of structures when looking at their targets.
1 parent a6b3f0b commit 99ec8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ai.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ SDWORD aiBestNearestTarget(DROID *psDroid, BASE_OBJECT **ppsObj, int weapon_slot
325325
psTarget = targetInQuestion;
326326
}
327327
}
328-
else if (psStruct->asWeaps[weapon_slot].nStat > 0)
328+
else if (psStruct->asWeaps[0].nStat > 0)
329329
{
330330
// structure with weapons - go for this
331331
psTarget = targetInQuestion;

0 commit comments

Comments
 (0)