.float multijump_count;\r
.float multijump_ready;\r
.float prevjumpbutton;\r
+.float prevlastteleporttime;\r
\r
/*\r
=============\r
\r
if (cvar("g_multijump"))\r
{\r
- if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair\r
+ if(self.prevlastteleporttime != self.lastteleporttime)\r
+ {\r
+ // if we teleported above the ground, require touching the ground again to multi-jump\r
+ self.multijump_ready = FALSE;\r
+ if(self.flags & FL_ONGROUND)\r
+ self.prevlastteleporttime = self.lastteleporttime;\r
+ }\r
+ else if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair\r
self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again\r
else\r
self.multijump_ready = FALSE;\r