diff --git a/README.md b/README.md index 283dde08..1cd194b3 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,10 @@ * In-game menu no longer disabled instantly when the game ends ## HUD -* Enemy counter displayed on top left of screen -* Timer displayed on top right of screen -* Health bar displayed on bottom left of screen -* Current zone displayed on bottom left of screen +* Enemy counter displayed on top left of screen (`hud_enemy_counter`) +* Timer displayed on top right of screen (`hud_timer`) +* Health bar displayed on bottom left of screen (`hud_health_bar`) +* Zone name displayed on bottom left of screen (`hud_zone_name`) * Increased waypoint offset from top of screen * Changed player waypoint location to be center of player instead of top of player * Increased distance between revive waypoint arrow and icon @@ -69,7 +69,7 @@ * Decreased friendly player name fade out time from 1.5 seconds to 0.25 seconds * Removed enemy player name fade in time * Added icons on scoreboard when player is downed, bled out, in Who's Who mode, or in afterlife -* Added option to disable character dialog (`disable_character_dialog 1`) +* Added option to disable character dialog (`disable_character_dialog`) ## Zombies * Health capped at 100,000 diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index 33c24d00..520854a3 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -445,6 +445,26 @@ set_dvars() setDvar( "sv_cheats", 0 ); + if ( getDvar("hud_timer") == "" ) + { + setDvar( "hud_timer", 1 ); + } + + if ( getDvar("hud_enemy_counter") == "" ) + { + setDvar( "hud_enemy_counter", 1 ); + } + + if ( getDvar("hud_health_bar") == "" ) + { + setDvar( "hud_health_bar", 1 ); + } + + if ( getDvar("hud_zone_name") == "" ) + { + setDvar( "hud_zone_name", 1 ); + } + if ( getDvar("disable_character_dialog") == "" ) { setDvar( "disable_character_dialog", 0 ); @@ -500,6 +520,11 @@ health_bar_hud() flag_wait( "hud_visible" ); + if ( !getDvarInt("hud_health_bar") ) + { + return; + } + x = 5; y = -104; if (level.script == "zm_buried") @@ -585,6 +610,11 @@ shield_bar_hud() flag_wait( "hud_visible" ); + if ( !getDvarInt("hud_health_bar") ) + { + return; + } + x = 5; y = -104; if (level.script == "zm_buried") @@ -719,6 +749,11 @@ enemy_counter_hud() flag_wait( "hud_visible" ); + if ( !getDvarInt("hud_enemy_counter") ) + { + return; + } + hud.alpha = 1; while (1) @@ -786,6 +821,11 @@ timer_hud() flag_wait( "hud_visible" ); + if ( !getDvarInt("hud_timer") ) + { + return; + } + hud.alpha = 1; if ( !flag( "initial_blackscreen_passed" ) ) @@ -831,6 +871,11 @@ round_timer_hud() flag_wait( "hud_visible" ); + if ( !getDvarInt("hud_timer") ) + { + return; + } + hud.alpha = 1; if ( !flag( "initial_blackscreen_passed" ) ) @@ -943,6 +988,11 @@ zone_hud() flag_wait( "hud_visible" ); + if ( !getDvarInt("hud_zone_name") ) + { + return; + } + vars = []; vars["zone"] = self get_current_zone();