From: Dr. Jaska Date: Wed, 17 Nov 2021 18:36:03 +0000 (+0000) Subject: update to CA/FT SetStartItems hookfunction X-Git-Tag: xonotic-v0.8.5~291^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6710e7b716387657787e86b8054f4f3e8c3843dc;p=xonotic%2Fxonotic-data.pk3dir.git update to CA/FT SetStartItems hookfunction --- diff --git a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc index 99b2055a3..d40c04c0b 100644 --- a/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc +++ b/qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc @@ -3,6 +3,15 @@ float autocvar_g_ca_damage2score_multiplier; bool autocvar_g_ca_spectate_enemies; +float autocvar_g_ca_start_health = 200; +float autocvar_g_ca_start_armor = 200; +float autocvar_g_ca_start_ammo_shells = 60; +float autocvar_g_ca_start_ammo_nails = 320; +float autocvar_g_ca_start_ammo_rockets = 160; +float autocvar_g_ca_start_ammo_cells = 180; +float autocvar_g_ca_start_ammo_plasma = 180; +float autocvar_g_ca_start_ammo_fuel = 0; + void CA_count_alive_players() { total_players = 0; @@ -331,14 +340,14 @@ MUTATOR_HOOKFUNCTION(ca, SetStartItems) if(!cvar("g_use_ammunition")) start_items |= IT_UNLIMITED_AMMO; - start_health = warmup_start_health = cvar("g_ca_start_health"); - start_armorvalue = warmup_start_armorvalue = cvar("g_ca_start_armor"); - start_ammo_shells = warmup_start_ammo_shells = cvar("g_ca_start_ammo_shells"); - start_ammo_nails = warmup_start_ammo_nails = cvar("g_ca_start_ammo_nails"); - start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_ca_start_ammo_rockets"); - start_ammo_cells = warmup_start_ammo_cells = cvar("g_ca_start_ammo_cells"); - start_ammo_plasma = warmup_start_ammo_plasma = cvar("g_ca_start_ammo_plasma"); - start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_ca_start_ammo_fuel"); + start_health = warmup_start_health = autocvar_g_ca_start_health; + start_armorvalue = warmup_start_armorvalue = autocvar_g_ca_start_armor; + start_ammo_shells = warmup_start_ammo_shells = autocvar_g_ca_start_ammo_shells; + start_ammo_nails = warmup_start_ammo_nails = autocvar_g_ca_start_ammo_nails; + start_ammo_rockets = warmup_start_ammo_rockets = autocvar_g_ca_start_ammo_rockets; + start_ammo_cells = warmup_start_ammo_cells = autocvar_g_ca_start_ammo_cells; + start_ammo_plasma = warmup_start_ammo_plasma = autocvar_g_ca_start_ammo_plasma; + start_ammo_fuel = warmup_start_ammo_fuel = autocvar_g_ca_start_ammo_fuel; } MUTATOR_HOOKFUNCTION(ca, Damage_Calculate) diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc index 8cb056375..5712c82c9 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc @@ -10,6 +10,15 @@ float autocvar_g_freezetag_round_timelimit; int autocvar_g_freezetag_teams_override; float autocvar_g_freezetag_warmup; +float autocvar_g_ft_start_health = 100; +float autocvar_g_ft_start_armor = 100; +float autocvar_g_ft_start_ammo_shells = 60; +float autocvar_g_ft_start_ammo_nails = 320; +float autocvar_g_ft_start_ammo_rockets = 160; +float autocvar_g_ft_start_ammo_cells = 180; +float autocvar_g_ft_start_ammo_plasma = 180; +float autocvar_g_ft_start_ammo_fuel = 0; + void freezetag_count_alive_players() { total_players = 0; @@ -698,14 +707,14 @@ MUTATOR_HOOKFUNCTION(ft, SetStartItems) if(!cvar("g_use_ammunition")) start_items |= IT_UNLIMITED_AMMO; - start_health = warmup_start_health = cvar("g_ft_start_health"); - start_armorvalue = warmup_start_armorvalue = cvar("g_ft_start_armor"); - start_ammo_shells = warmup_start_ammo_shells = cvar("g_ft_start_ammo_shells"); - start_ammo_nails = warmup_start_ammo_nails = cvar("g_ft_start_ammo_nails"); - start_ammo_rockets = warmup_start_ammo_rockets = cvar("g_ft_start_ammo_rockets"); - start_ammo_cells = warmup_start_ammo_cells = cvar("g_ft_start_ammo_cells"); - start_ammo_plasma = warmup_start_ammo_plasma = cvar("g_ft_start_ammo_plasma"); - start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_ft_start_ammo_fuel"); + start_health = warmup_start_health = autocvar_g_ft_start_health; + start_armorvalue = warmup_start_armorvalue = autocvar_g_ft_start_armor; + start_ammo_shells = warmup_start_ammo_shells = autocvar_g_ft_start_ammo_shells; + start_ammo_nails = warmup_start_ammo_nails = autocvar_g_ft_start_ammo_nails; + start_ammo_rockets = warmup_start_ammo_rockets = autocvar_g_ft_start_ammo_rockets; + start_ammo_cells = warmup_start_ammo_cells = autocvar_g_ft_start_ammo_cells; + start_ammo_plasma = warmup_start_ammo_plasma = autocvar_g_ft_start_ammo_plasma; + start_ammo_fuel = warmup_start_ammo_fuel = autocvar_g_ft_start_ammo_fuel; } MUTATOR_HOOKFUNCTION(ft, HavocBot_ChooseRole)