Skip to content

Commit 8d3cbb0

Browse files
committed
Fix multiturret droids trying to look at invalid weapon slots of structures when looking at their targets.
1 parent 0a9b3b4 commit 8d3cbb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ai.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ SDWORD aiBestNearestTarget(DROID *psDroid, BASE_OBJECT **ppsObj, int weapon_slot
327327
psTarget = targetInQuestion;
328328
}
329329
}
330-
else if (psStruct->asWeaps[weapon_slot].nStat > 0)
330+
else if (psStruct->asWeaps[0].nStat > 0)
331331
{
332332
// structure with weapons - go for this
333333
psTarget = targetInQuestion;

0 commit comments

Comments
 (0)