+void CheckPlayerJump()
+{
+ if(self.flags & FL_ONGROUND)
+ {
+ if (autocvar_g_multijump > 0)
+ self.multijump_count = 0;
+ else
+ self.multijump_count = -2; // the cvar value for infinite jumps is -1, so this needs to be smaller
+ }
+
+ if (self.BUTTON_JUMP)
+ PlayerJump ();
+ else
+ self.flags |= FL_JUMPRELEASED;
+
+ if (self.waterlevel == WATERLEVEL_SWIMMING)
+ CheckWaterJump ();
+ self.prevjumpbutton = self.BUTTON_JUMP;
+}