returns true if handled
=============
*/
-float PlayerJump (void)
+bool PlayerJump (void)
{
if (PHYS_FROZEN(self))
return true; // no jumping in freezetag when frozen
self.velocity_z = 225;
self.flags |= FL_WATERJUMP;
SET_JUMP_HELD(self);
+#ifdef SVQC
self.teleport_time = time + 2; // safety net
+#elif defined(CSQC)
+ pmove_waterjumptime = time + 2;
+#endif
}
}
}
void PM_Main()
{
- float buttons = PHYS_INPUT_BUTTON_MASK(self);
+ int buttons = PHYS_INPUT_BUTTON_MASK(self);
#ifdef CSQC
self.items = getstati(STAT_ITEMS, 0, 24);
self.parm_idlesince = time;
}
#endif
- float buttons_prev = self.buttons_old;
+ int buttons_prev = self.buttons_old;
self.buttons_old = buttons;
self.movement_old = self.movement;
self.v_angle_old = self.v_angle;
self.race_penalty = 0;
#endif
- float not_allowed_to_move = 0;
+ bool not_allowed_to_move = false;
#ifdef SVQC
if (self.race_penalty)
- not_allowed_to_move = 1;
+ not_allowed_to_move = true;
#endif
#ifdef SVQC
if (time < game_starttime)
- not_allowed_to_move = 1;
+ not_allowed_to_move = true;
#endif
if (not_allowed_to_move)
// door constants
-const float DOOR_START_OPEN = 1;
-const float DOOR_DONT_LINK = 4;
-const float DOOR_TOGGLE = 32;
+const int DOOR_START_OPEN = 1;
+const int DOOR_DONT_LINK = 4;
+const int DOOR_TOGGLE = 32;
-const float DOOR_NOSPLASH = 256; // generic anti-splashdamage spawnflag
+const int DOOR_NOSPLASH = 256; // generic anti-splashdamage spawnflag
-const float SPAWNFLAGS_GOLD_KEY = 8;
-const float SPAWNFLAGS_SILVER_KEY = 16;
+const int SPAWNFLAGS_GOLD_KEY = 8;
+const int SPAWNFLAGS_SILVER_KEY = 16;
#ifdef CSQC
// stuff for preload