Simplify do_weapon_select call
This commit is contained in:
parent
0a1d643442
commit
f74f879145
|
@ -250,9 +250,8 @@ static void do_weapon_n_item_stuff()
|
||||||
}
|
}
|
||||||
if (Controls.state.select_weapon > 0)
|
if (Controls.state.select_weapon > 0)
|
||||||
{
|
{
|
||||||
Controls.state.select_weapon--;
|
const auto select_weapon = exchange(Controls.state.select_weapon, 0) - 1;
|
||||||
do_weapon_select(Controls.state.select_weapon>4?Controls.state.select_weapon-5:Controls.state.select_weapon,Controls.state.select_weapon>4?1:0);
|
do_weapon_select(select_weapon > 4 ? select_weapon - 5 : select_weapon, select_weapon > 4);
|
||||||
Controls.state.select_weapon = 0;
|
|
||||||
}
|
}
|
||||||
#if defined(DXX_BUILD_DESCENT_II)
|
#if defined(DXX_BUILD_DESCENT_II)
|
||||||
if (auto &headlight = Controls.state.headlight)
|
if (auto &headlight = Controls.state.headlight)
|
||||||
|
|
Loading…
Reference in a new issue