From: terencehill Date: Mon, 1 Feb 2021 16:25:58 +0000 (+0100) Subject: Freezetag: apply spawnshield for 1 second after you've been revived (spawnshield... X-Git-Tag: xonotic-v0.8.5~405^2~32^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e6c046b6f80400eb978cda771583ed53beea58c6;p=xonotic%2Fxonotic-data.pk3dir.git Freezetag: apply spawnshield for 1 second after you've been revived (spawnshield is lost after you fire) --- diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index c15baaf9d..c0889f3ae 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -377,6 +377,7 @@ set g_freezetag_revive_auto 1 "automatically revive frozen players after some ti set g_freezetag_revive_auto_progress 1 "start the automatic reviving progress as soon as the player gets frozen" set g_freezetag_revive_auto_reducible 1 "reduce auto-revival time when frozen players are hit by enemies; set to -1 to reduce it even when they are hit by teammates" set g_freezetag_revive_auto_reducible_forcefactor 0.025 "hit force to time reduction conversion factor" +set g_freezetag_revive_spawnshield 1 "apply spawnshield for this time in seconds after the player has been revived" set g_freezetag_frozen_maxtime 60 "frozen players will be automatically unfrozen after this time in seconds" set g_freezetag_teams_override 0 set g_freezetag_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any" diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc index ea00927ab..35cc473bc 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc @@ -569,6 +569,7 @@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink, CBC_ORDER_FIRST) float frozen_time = time - player.freezetag_frozen_time; Unfreeze(player, false); SetResourceExplicit(player, RES_HEALTH, ((warmup_stage) ? warmup_start_health : start_health)); + player.spawnshieldtime = time + autocvar_g_freezetag_revive_spawnshield; freezetag_count_alive_players(); if(n == -1) diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh index 4c88b20de..067d2d640 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh @@ -43,3 +43,4 @@ float autocvar_g_freezetag_revive_speed; float autocvar_g_freezetag_revive_time_to_score = 1.5; bool autocvar_g_freezetag_revive_nade; float autocvar_g_freezetag_revive_nade_health; +float autocvar_g_freezetag_revive_spawnshield = 1;