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
|
#ifdef dsx
|
||||||
namespace dsx {
|
namespace dsx {
|
||||||
void InitWeaponOrdering();
|
void InitWeaponOrdering();
|
||||||
|
void CyclePrimary(player_info &);
|
||||||
void CycleSecondary(player_info &);
|
void CycleSecondary(player_info &);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
void CyclePrimary();
|
|
||||||
void ReorderPrimary();
|
void ReorderPrimary();
|
||||||
void ReorderSecondary();
|
void ReorderSecondary();
|
||||||
#ifdef dsx
|
#ifdef dsx
|
||||||
|
|
|
@ -255,7 +255,7 @@ static void do_weapon_n_item_stuff()
|
||||||
if (Controls.state.cycle_primary > 0)
|
if (Controls.state.cycle_primary > 0)
|
||||||
{
|
{
|
||||||
for (uint_fast32_t i = exchange(Controls.state.cycle_primary, 0); i--;)
|
for (uint_fast32_t i = exchange(Controls.state.cycle_primary, 0); i--;)
|
||||||
CyclePrimary ();
|
CyclePrimary(player_info);
|
||||||
}
|
}
|
||||||
if (Controls.state.cycle_secondary > 0)
|
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));
|
CycleWeapon(cycle_primary_state(player_info), get_mapped_weapon_index(player_info, player_info.Primary_weapon));
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace dsx {
|
|
||||||
void CycleSecondary(player_info &player_info)
|
void CycleSecondary(player_info &player_info)
|
||||||
{
|
{
|
||||||
CycleWeapon(cycle_secondary_state(player_info), player_info.Secondary_weapon);
|
CycleWeapon(cycle_secondary_state(player_info), player_info.Secondary_weapon);
|
||||||
|
|
Loading…
Reference in a new issue