]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use cvar_string instead of ftos(cvar) for sv_gravity settemp
authorMario <mario.mario@y7mail.com>
Thu, 6 Jun 2013 17:49:59 +0000 (03:49 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 6 Jun 2013 17:49:59 +0000 (03:49 +1000)
qcsrc/server/mutators/mutator_random_gravity.qc

index b17f7e5941946d75c6c06f335e77c885a1e0e87d..e2832ace2dc2f61824ec10dc9df76e16922b0250 100644 (file)
@@ -1,4 +1,10 @@
+// Random Gravity
+//
+// Mutator by Mario
+// Inspired by Player 2
+
 float gravity_delay;
+
 MUTATOR_HOOKFUNCTION(gravity_StartFrame)
 {
        if(gameover || !cvar("g_random_gravity")) return FALSE; 
@@ -38,7 +44,7 @@ MUTATOR_DEFINITION(mutator_random_gravity)
        
        MUTATOR_ONADD
        {
-               cvar_settemp("sv_gravity", ftos(cvar("sv_gravity"))); // settemp current gravity so it's restored on match end
+               cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end
        }
 
        return FALSE;