From af65d6be57cc21d4609edd764fe413d8742a3fdc Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 12 Jan 2012 13:03:26 +0100 Subject: [PATCH] Arena: block players before the round start in a MUCH better way, like frozen players in freezetag except that it's allowed to jump --- qcsrc/server/arena.qc | 11 ++++------- qcsrc/server/cl_physics.qc | 6 ++++++ qcsrc/server/defs.qh | 2 ++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index a51da69ff0..d9bcf5c3e1 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -256,10 +256,7 @@ void Arena_Warmup() FOR_EACH_CLIENT(e) { if(e.spawned && e.classname == "player") - e.movetype = MOVETYPE_NONE; - e.velocity = '0 0 0'; - e.avelocity = '0 0 0'; - e.movement = '0 0 0'; + e.blocked = 1; } } } @@ -278,10 +275,10 @@ void Arena_Warmup() } if(g_arena) { - FOR_EACH_PLAYER(e) + FOR_EACH_CLIENT(e) { - if(e.health > 0 && e.movetype == MOVETYPE_NONE) - e.movetype = MOVETYPE_WALK; + if(e.blocked) + e.blocked = 0; } } } diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index 79087eb8a3..2f714869a2 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -875,6 +875,12 @@ void SV_PlayerPhysics() MUTATOR_CALLHOOK(PlayerPhysics); + if(self.blocked) + { + self.movement = '0 0 0'; + self.disableclientprediction = 1; + } + maxspd_mod = 1; swampspd_mod = 1; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 865d39b10e..f24cf2a4db 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -641,6 +641,8 @@ float serverflags; .float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator +.float blocked; + .float freezetag_frozen; .float freezetag_revive_progress; -- 2.39.2