]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Freezetag: apply spawnshield for 1 second after you've been revived (spawnshield...
authorterencehill <piuntn@gmail.com>
Mon, 1 Feb 2021 16:25:58 +0000 (17:25 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 1 Feb 2021 16:34:09 +0000 (17:34 +0100)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh

index c15baaf9d101150e0fba283fe39422860894168e..c0889f3ae09cd3cc95293bd34dea517858a3d5e9 100644 (file)
@@ -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"
index ea00927abd908ae3856092f51b8d81d4ab80301b..35cc473bceacdff41bee85811fec8133fb334caa 100644 (file)
@@ -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)
index 4c88b20de448ebafc0d8aa6195e4da21e0404c2a..067d2d64050d4b358fd76a14057a87b07eec6a5d 100644 (file)
@@ -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;