[nexuiz-commits] r7193 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Jul 11 11:38:23 EDT 2009
Author: div0
Date: 2009-07-11 11:38:23 -0400 (Sat, 11 Jul 2009)
New Revision: 7193
Modified:
trunk/data/qcsrc/server/cl_client.qc
trunk/data/qcsrc/server/cl_physics.qc
Log:
fix "randomly stuck at spawn" bug
Modified: trunk/data/qcsrc/server/cl_client.qc
===================================================================
--- trunk/data/qcsrc/server/cl_client.qc 2009-07-11 15:27:00 UTC (rev 7192)
+++ trunk/data/qcsrc/server/cl_client.qc 2009-07-11 15:38:23 UTC (rev 7193)
@@ -2837,23 +2837,6 @@
//if (TetrisPostFrame()) return;
- // restart countdown
- if (!cvar("sv_ready_restart_after_countdown"))
- {
- if(time < game_starttime)
- {
- self.movetype = MOVETYPE_NONE;
- self.velocity = '0 0 0';
- self.avelocity = '0 0 0';
- self.movement = '0 0 0';
- }
- else
- {
- //allow the player to move again if sv_ready_restart_after_countdown is not used and countdown is over
- if(self.movetype == MOVETYPE_NONE)
- self.movetype = MOVETYPE_WALK;
- }
- }
GetPressedKeys();
} else if (self.classname == "observer") {
//do nothing
Modified: trunk/data/qcsrc/server/cl_physics.qc
===================================================================
--- trunk/data/qcsrc/server/cl_physics.qc 2009-07-11 15:27:00 UTC (rev 7192)
+++ trunk/data/qcsrc/server/cl_physics.qc 2009-07-11 15:38:23 UTC (rev 7193)
@@ -471,6 +471,7 @@
local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod, shtest_score, buttons;
string temps;
float buttons_prev;
+ float not_allowed_to_move;
if(self.PlayerPhysplug)
if(self.PlayerPhysplug())
@@ -527,24 +528,28 @@
self.items &~= IT_USING_JETPACK;
if(self.race_penalty)
- {
if(time > self.race_penalty)
- {
- if(self.disableclientprediction == 2)
- {
- self.movetype = MOVETYPE_WALK;
- self.disableclientprediction = 0;
- }
self.race_penalty = 0;
- }
- }
+ not_allowed_to_move = 0;
if(self.race_penalty)
+ not_allowed_to_move = 1;
+ if(!cvar("sv_ready_restart_after_countdown"))
+ if(time < game_starttime)
+ not_allowed_to_move = 1;
+
+ if(not_allowed_to_move)
{
self.velocity = '0 0 0';
self.movetype = MOVETYPE_NONE;
self.disableclientprediction = 2;
}
+ else if(self.disableclientprediction == 2)
+ {
+ if(self.movetype == MOVETYPE_NONE)
+ self.movetype = MOVETYPE_WALK;
+ self.disableclientprediction = 0;
+ }
if (self.movetype == MOVETYPE_NONE)
return;
More information about the nexuiz-commits
mailing list