Pass player_info to CyclePrimary
This commit is contained in:
parent
2c37514235
commit
3f27b6daac
|
@ -223,10 +223,10 @@ extern fix64 Seismic_disturbance_end_time;
|
|||
#ifdef dsx
|
||||
namespace dsx {
|
||||
void InitWeaponOrdering();
|
||||
void CyclePrimary(player_info &);
|
||||
void CycleSecondary(player_info &);
|
||||
}
|
||||
#endif
|
||||
void CyclePrimary();
|
||||
void ReorderPrimary();
|
||||
void ReorderSecondary();
|
||||
#ifdef dsx
|
||||
|
|
|
@ -255,7 +255,7 @@ static void do_weapon_n_item_stuff()
|
|||
if (Controls.state.cycle_primary > 0)
|
||||
{
|
||||
for (uint_fast32_t i = exchange(Controls.state.cycle_primary, 0); i--;)
|
||||
CyclePrimary ();
|
||||
CyclePrimary(player_info);
|
||||
}
|
||||
if (Controls.state.cycle_secondary > 0)
|
||||
{
|
||||
|
|
|
@ -414,16 +414,13 @@ void CycleWeapon(T t, const uint_fast32_t effective_weapon)
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void CyclePrimary ()
|
||||
void CyclePrimary(player_info &player_info)
|
||||
{
|
||||
auto &player_info = get_local_plrobj().ctype.player_info;
|
||||
CycleWeapon(cycle_primary_state(player_info), get_mapped_weapon_index(player_info, player_info.Primary_weapon));
|
||||
}
|
||||
|
||||
namespace dsx {
|
||||
void CycleSecondary(player_info &player_info)
|
||||
{
|
||||
CycleWeapon(cycle_secondary_state(player_info), player_info.Secondary_weapon);
|
||||
|
|
Loading…
Reference in a new issue