Pass player object to draw_hud
This commit is contained in:
parent
83043ebd72
commit
6fbcef75b1
|
@ -55,6 +55,7 @@ void add_points_to_score(player_info &, int points);
|
|||
void add_bonus_points_to_score(player_info &, int points);
|
||||
void render_gauges(void);
|
||||
void init_gauges(void);
|
||||
void draw_hud(const object &); // draw all the HUD stuff
|
||||
}
|
||||
#endif
|
||||
void close_gauges(void);
|
||||
|
@ -66,12 +67,6 @@ void show_HUD_names();
|
|||
#endif
|
||||
void show_mousefs_indicator(int mx, int my, int mz, int x, int y, int size);
|
||||
|
||||
#ifdef dsx
|
||||
namespace dsx {
|
||||
extern void draw_hud(); // draw all the HUD stuff
|
||||
|
||||
}
|
||||
#endif
|
||||
extern void player_dead_message(void);
|
||||
//extern void say_afterburner_status(void);
|
||||
|
||||
|
|
|
@ -380,7 +380,8 @@ static void game_draw_hud_stuff()
|
|||
if (Newdemo_state == ND_STATE_PLAYBACK)
|
||||
Game_mode = Newdemo_game_mode;
|
||||
|
||||
draw_hud();
|
||||
auto &plrobj = get_local_plrobj();
|
||||
draw_hud(plrobj);
|
||||
|
||||
if (Newdemo_state == ND_STATE_PLAYBACK)
|
||||
Game_mode = GM_NORMAL;
|
||||
|
|
|
@ -3219,12 +3219,12 @@ void show_HUD_names()
|
|||
|
||||
//draw all the things on the HUD
|
||||
namespace dsx {
|
||||
void draw_hud()
|
||||
void draw_hud(const object &plrobj)
|
||||
{
|
||||
auto &player_info = plrobj.ctype.player_info;
|
||||
if (Newdemo_state == ND_STATE_RECORDING)
|
||||
{
|
||||
int ammo;
|
||||
auto &player_info = get_local_plrobj().ctype.player_info;
|
||||
auto &Primary_weapon = player_info.Primary_weapon;
|
||||
if ((Primary_weapon == primary_weapon_index_t::VULCAN_INDEX && (ammo = player_info.vulcan_ammo, true))
|
||||
#if defined(DXX_BUILD_DESCENT_II)
|
||||
|
@ -3289,7 +3289,6 @@ void draw_hud()
|
|||
|
||||
const local_multires_gauge_graphic multires_gauge_graphic = {};
|
||||
if (PlayerCfg.CockpitMode[1]==CM_FULL_SCREEN) {
|
||||
auto &player_info = get_local_plrobj().ctype.player_info;
|
||||
hud_show_energy(player_info);
|
||||
hud_show_shield();
|
||||
hud_show_afterburner(player_info);
|
||||
|
|
Loading…
Reference in a new issue