Getting uninitialized variable at idx(bottom of the page). Is this some debugging residue? I compiled without #define debug
static float AIRFIGHT_ProbabilityToHit (aircraft_t *shooter, aircraft_t *target, int slotIdx)
{
int idx;
float probability = 0.0f;
#ifdef DEBUG
idx = shooter->weapons[slotIdx].itemIdx;
if (idx < 0) {
Com_Printf("AIRFIGHT_ProbabilityToHit: no weapon assigned to attacking aircraft\n");
return probability;
}
idx = shooter->weapons[slotIdx].ammoIdx;
if (idx < 0) {
Com_Printf("AIRFIGHT_ProbabilityToHit: no ammo in weapon of attacking aircraft\n");
return probability;
}
#endif
/* Take Base probability from the ammo of the attacking aircraft */
probability = aircraftItems[idx].stats[AIR_STATS_ACCURACY];