]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Partial fix for multijump
authorMario <zacjardine@y7mail.com>
Fri, 12 Dec 2014 04:34:55 +0000 (15:34 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 12 Dec 2014 04:34:55 +0000 (15:34 +1100)
qcsrc/common/physics.qh
qcsrc/server/mutators/mutator_multijump.qc

index 0afd9aeddb25ceaa4a90bf1b30a36d102d13a78e..0691e7a29eb24f85837eed5199483ace37d051a2 100644 (file)
        #define SET_DUCKED(s)                                           s.crouch = TRUE
        #define UNSET_DUCKED(s)                                         s.crouch = FALSE
 
-       #define IS_JUMP_HELD(s)                                         (s.flags & FL_JUMPRELEASED == 0)
+       #define IS_JUMP_HELD(s)                                         !(s.flags & FL_JUMPRELEASED)
        #define SET_JUMP_HELD(s)                                        s.flags &= ~FL_JUMPRELEASED
        #define UNSET_JUMP_HELD(s)                                      s.flags |= FL_JUMPRELEASED
 
index 92d4ef7a2872322b3a6e5679ead5b1e4294ab82f..439552f25977f0f5c001ee2b99f7ab987bf40990 100644 (file)
@@ -64,7 +64,7 @@ float PM_multijump_checkjump()
 
        if(!PHYS_MOVE_MULTIJUMP && self.multijump_ready && self.multijump_count < PHYS_MULTIJUMP && self.velocity_z > PHYS_MULTIJUMP_SPEED)
        {
-               if (PHYS_MOVE_MULTIJUMP)
+               if (PHYS_MULTIJUMP)
                {
                        if (!PHYS_MULTIJUMP_ADD) // in this case we make the z velocity == jumpvelocity
                        {
@@ -84,10 +84,6 @@ float PM_multijump_checkjump()
                                        float curspeed = vlen(vec2(self.velocity));
                                        vector wishvel, wishdir;
 
-                                       /*curspeed = max(
-                                               vlen(vec2(self.velocity)), // current xy speed
-                                               vlen(vec2(antilag_takebackavgvelocity(self, max(self.lastteleporttime + sys_frametime, time - 0.25), time))) // average xy topspeed over the last 0.25 secs
-                                       );*/
                                        makevectors(PHYS_INPUT_ANGLES(self)_y * '0 1 0');
                                        wishvel = v_forward * PHYS_INPUT_MOVEVALUES(self)_x + v_right * PHYS_INPUT_MOVEVALUES(self)_y;
                                        wishdir = normalize(wishvel);