3 #include "../../../../server/antilag.qh"
5 #include "../../../physics.qh"
7 REGISTER_MUTATOR(doublejump, true);
9 #define PHYS_DOUBLEJUMP(s) STAT(DOUBLEJUMP, s)
12 MUTATOR_HOOKFUNCTION(doublejump, PlayerJump)
14 if (PHYS_DOUBLEJUMP(self))
16 tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
17 if (trace_fraction < 1 && trace_plane_normal_z > 0.7)
19 player_multijump = true;
21 // we MUST clip velocity here!
22 float f = self.velocity * trace_plane_normal;
24 self.velocity -= f * trace_plane_normal;
32 MUTATOR_HOOKFUNCTION(doublejump, BuildMutatorsString)
34 ret_string = strcat(ret_string, ":doublejump");
38 MUTATOR_HOOKFUNCTION(doublejump, BuildMutatorsPrettyString)
40 ret_string = strcat(ret_string, ", Double jump");