From: MirceaKitsune Date: Sat, 16 Apr 2011 13:43:07 +0000 (+0300) Subject: If we teleported above the ground, require touching the ground again to multi-jump... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d55b0d4835ab889437fcba8adcde9eb5423770a3;p=voretournament%2Fvoretournament.git If we teleported above the ground, require touching the ground again to multi-jump. Else we can multi-jump immediately at the moment of spawning / teleporting. --- diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index f917d8b6..2c284091 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -32,6 +32,7 @@ float sv_warsowbunny_backtosideratio; .float multijump_count; .float multijump_ready; .float prevjumpbutton; +.float prevlastteleporttime; /* ============= @@ -68,7 +69,14 @@ void PlayerJump (void) if (cvar("g_multijump")) { - if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair + if(self.prevlastteleporttime != self.lastteleporttime) + { + // if we teleported above the ground, require touching the ground again to multi-jump + self.multijump_ready = FALSE; + if(self.flags & FL_ONGROUND) + self.prevlastteleporttime = self.lastteleporttime; + } + else if (self.prevjumpbutton == FALSE && !(self.flags & FL_ONGROUND)) // jump button pressed this frame and we are in midair self.multijump_ready = TRUE; // this is necessary to check that we released the jump button and pressed it again else self.multijump_ready = FALSE;