From: terencehill Date: Sat, 23 Mar 2019 14:10:38 +0000 (+0100) Subject: Freeze Tag: instantly respawn players who died when round hasn't started yet X-Git-Tag: xonotic-v0.8.5~1404^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=40b1e961873c2d9fc984f7cc0787e49a27c1c0ea;p=xonotic%2Fxonotic-data.pk3dir.git Freeze Tag: instantly respawn players who died when round hasn't started yet --- diff --git a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc index d38becd73..2dfcf4811 100644 --- a/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc +++ b/qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc @@ -361,7 +361,9 @@ MUTATOR_HOOKFUNCTION(ft, PlayerDies) if (STAT(FROZEN, frag_target) == FROZEN_NORMAL) Unfreeze(frag_target, true); freezetag_count_alive_players(); - return true; // let the player die so that he can respawn whenever he wants + frag_target.respawn_time = time; + frag_target.respawn_flags |= RESPAWN_FORCE; + return true; } // Cases DEATH_TEAMCHANGE and DEATH_AUTOTEAMCHANGE are needed to fix a bug whe diff --git a/qcsrc/server/constants.qh b/qcsrc/server/constants.qh index f98d586fb..62a15f680 100644 --- a/qcsrc/server/constants.qh +++ b/qcsrc/server/constants.qh @@ -10,9 +10,9 @@ const int FL_PICKUPITEMS = BIT(19); const int SVC_SETVIEW = 5; -const int RESPAWN_FORCE = 1; -const int RESPAWN_SILENT = 2; -const int RESPAWN_DENY = 4; +const int RESPAWN_FORCE = BIT(0); +const int RESPAWN_SILENT = BIT(1); +const int RESPAWN_DENY = BIT(2); #define EFMASK_CHEAP (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NODRAW | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT)