From: Mario Date: Wed, 10 Dec 2014 00:00:12 +0000 (+1100) Subject: Failed attempt to make CheckWaterJump work with CSQC X-Git-Tag: xonotic-v0.8.1~38^2~99 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6cd2df9ec40fdc51dc462d93f440dc225beb37ba;p=xonotic%2Fxonotic-data.pk3dir.git Failed attempt to make CheckWaterJump work with CSQC --- diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index 2ebfbd9fb..19d6692da 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -613,10 +613,8 @@ void PlayerJump (void) void CheckWaterJump() { -#ifdef SVQC - // check for a jump-out-of-water - makevectors(self.angles); + makevectors(PHYS_INPUT_ANGLES(self)); vector start = self.origin; start_z += 8; v_forward_z = 0; @@ -631,13 +629,14 @@ void CheckWaterJump() traceline(start, end, TRUE, self); if (trace_fraction == 1) { // open at eye level - self.flags |= FL_WATERJUMP; self.velocity_z = 225; +#ifdef SVQC + self.flags |= FL_WATERJUMP; self.flags &= ~FL_JUMPRELEASED; self.teleport_time = time + 2; // safety net +#endif } } -#endif } void CheckPlayerJump() @@ -648,9 +647,9 @@ void CheckPlayerJump() else self.flags |= FL_JUMPRELEASED; +#endif if (self.waterlevel == WATERLEVEL_SWIMMING) CheckWaterJump(); -#endif } float racecar_angle(float forward, float down) @@ -1731,8 +1730,9 @@ void PM_Main() #ifdef SVQC if (IS_PLAYER(self)) - CheckPlayerJump(); #endif + CheckPlayerJump(); + if (self.flags & /* FL_WATERJUMP */ 2048) {