]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add negative gravity jumppad fix by Player 2
authorMario <mario.mario@y7mail.com>
Thu, 6 Jun 2013 17:52:56 +0000 (03:52 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 6 Jun 2013 17:52:56 +0000 (03:52 +1000)
qcsrc/server/t_jumppads.qc

index fba705c28afd229aa5676ebc329bbff1fdba7ea1..0efb77df276ae2154a8127458e5695b2ecb0b53d 100644 (file)
@@ -71,7 +71,7 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
         */
 
        // push him so high...
-       vz = sqrt(2 * grav * jumpheight); // NOTE: sqrt(positive)!
+       vz = sqrt(fabs(2 * grav * jumpheight)); // NOTE: sqrt(positive)!
 
        // we start with downwards velocity only if it's a downjump and the jump apex should be outside the jump!
        if(ht < 0)