From: Mario Date: Thu, 6 Jun 2013 17:49:59 +0000 (+1000) Subject: Use cvar_string instead of ftos(cvar) for sv_gravity settemp X-Git-Tag: xonotic-v0.8.0~366^2~31 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cebc09d3ec57ac5f09532f9cc891df92eefa0956;p=xonotic%2Fxonotic-data.pk3dir.git Use cvar_string instead of ftos(cvar) for sv_gravity settemp --- diff --git a/qcsrc/server/mutators/mutator_random_gravity.qc b/qcsrc/server/mutators/mutator_random_gravity.qc index b17f7e594..e2832ace2 100644 --- a/qcsrc/server/mutators/mutator_random_gravity.qc +++ b/qcsrc/server/mutators/mutator_random_gravity.qc @@ -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;