1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-12 16:18:00 -05:00

Add dvars to disable HUD elems

This commit is contained in:
Jbleezy
2023-04-30 13:59:48 -07:00
parent 6f5340cb54
commit 78fb5928b6
2 changed files with 55 additions and 5 deletions

View File

@ -23,10 +23,10 @@
* In-game menu no longer disabled instantly when the game ends * In-game menu no longer disabled instantly when the game ends
## HUD ## HUD
* Enemy counter displayed on top left of screen * Enemy counter displayed on top left of screen (`hud_enemy_counter`)
* Timer displayed on top right of screen * Timer displayed on top right of screen (`hud_timer`)
* Health bar displayed on bottom left of screen * Health bar displayed on bottom left of screen (`hud_health_bar`)
* Current zone displayed on bottom left of screen * Zone name displayed on bottom left of screen (`hud_zone_name`)
* Increased waypoint offset from top of screen * Increased waypoint offset from top of screen
* Changed player waypoint location to be center of player instead of top of player * Changed player waypoint location to be center of player instead of top of player
* Increased distance between revive waypoint arrow and icon * 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 * Decreased friendly player name fade out time from 1.5 seconds to 0.25 seconds
* Removed enemy player name fade in time * 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 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 ## Zombies
* Health capped at 100,000 * Health capped at 100,000

View File

@ -445,6 +445,26 @@ set_dvars()
setDvar( "sv_cheats", 0 ); 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") == "" ) if ( getDvar("disable_character_dialog") == "" )
{ {
setDvar( "disable_character_dialog", 0 ); setDvar( "disable_character_dialog", 0 );
@ -500,6 +520,11 @@ health_bar_hud()
flag_wait( "hud_visible" ); flag_wait( "hud_visible" );
if ( !getDvarInt("hud_health_bar") )
{
return;
}
x = 5; x = 5;
y = -104; y = -104;
if (level.script == "zm_buried") if (level.script == "zm_buried")
@ -585,6 +610,11 @@ shield_bar_hud()
flag_wait( "hud_visible" ); flag_wait( "hud_visible" );
if ( !getDvarInt("hud_health_bar") )
{
return;
}
x = 5; x = 5;
y = -104; y = -104;
if (level.script == "zm_buried") if (level.script == "zm_buried")
@ -719,6 +749,11 @@ enemy_counter_hud()
flag_wait( "hud_visible" ); flag_wait( "hud_visible" );
if ( !getDvarInt("hud_enemy_counter") )
{
return;
}
hud.alpha = 1; hud.alpha = 1;
while (1) while (1)
@ -786,6 +821,11 @@ timer_hud()
flag_wait( "hud_visible" ); flag_wait( "hud_visible" );
if ( !getDvarInt("hud_timer") )
{
return;
}
hud.alpha = 1; hud.alpha = 1;
if ( !flag( "initial_blackscreen_passed" ) ) if ( !flag( "initial_blackscreen_passed" ) )
@ -831,6 +871,11 @@ round_timer_hud()
flag_wait( "hud_visible" ); flag_wait( "hud_visible" );
if ( !getDvarInt("hud_timer") )
{
return;
}
hud.alpha = 1; hud.alpha = 1;
if ( !flag( "initial_blackscreen_passed" ) ) if ( !flag( "initial_blackscreen_passed" ) )
@ -943,6 +988,11 @@ zone_hud()
flag_wait( "hud_visible" ); flag_wait( "hud_visible" );
if ( !getDvarInt("hud_zone_name") )
{
return;
}
vars = []; vars = [];
vars["zone"] = self get_current_zone(); vars["zone"] = self get_current_zone();