r3516 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Mar 17 17:44:16 EDT 2008
Author: blub0
Date: 2008-03-17 17:44:14 -0400 (Mon, 17 Mar 2008)
New Revision: 3516
Modified:
trunk/data/qcsrc/server/g_tetris.qc
Log:
Finally tetris key handling is in it's perfect state. If not, then it's div's fault :P because he remote-controlled me :P
Modified: trunk/data/qcsrc/server/g_tetris.qc
===================================================================
--- trunk/data/qcsrc/server/g_tetris.qc 2008-03-17 21:16:27 UTC (rev 3515)
+++ trunk/data/qcsrc/server/g_tetris.qc 2008-03-17 21:44:14 UTC (rev 3516)
@@ -726,20 +726,14 @@
if (self.origin != self.tet_org)
{
self.origin = self.tet_org;
- makevectors(self.v_angle);
- norm = self.velocity*v_forward;
- if(norm < -0.1)
+ if(self.movement_x < 0)
keysa |= TETKEY_DOWN;
- else if(norm > 0.1)
+ else if(self.movement_x > 0)
keysa |= TETKEY_UP;
-
- norm = self.velocity*v_right;
- if(norm < -0.1)
+ if(self.movement_y < 0)
keysa |= TETKEY_LEFT;
- else if(norm > 0.1)
+ else if(self.movement_y > 0)
keysa |= TETKEY_RIGHT;
-
- self.velocity_x = self.velocity_y = self.velocity_z = 0;
}
if (self.button0)
keysa = keysa | TETKEY_ROTRIGHT;
More information about the nexuiz-commits
mailing list