Unify robot-next-gun logic

Old code:

if (condition) {
	x;
	y;
} else {
	y;
}

Change it to be:

if (condition) {
	x;
}
y;
This commit is contained in:
Kp 2016-08-25 23:31:37 +00:00
parent d75de6e705
commit 35928f942c

View file

@ -2712,17 +2712,11 @@ static void ai_do_actual_firing_stuff(const vobjptridx_t obj, ai_static *aip, ai
aip->GOAL_STATE = AIS_RECO;
ailp->goal_state[aip->CURRENT_GUN] = AIS_RECO;
// Switch to next gun for next fire.
aip->CURRENT_GUN++;
if (aip->CURRENT_GUN >= robptr->n_guns)
aip->CURRENT_GUN = 0;
} else {
// Switch to next gun for next fire.
aip->CURRENT_GUN++;
if (aip->CURRENT_GUN >= robptr->n_guns)
aip->CURRENT_GUN = 0;
}
// Switch to next gun for next fire.
aip->CURRENT_GUN++;
if (aip->CURRENT_GUN >= robptr->n_guns)
aip->CURRENT_GUN = 0;
} else {