From: Mario Date: Thu, 25 Dec 2014 10:24:33 +0000 (+1100) Subject: Clean it up a tiny bit X-Git-Tag: xonotic-v0.8.1~48^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6db763e92ae2ee91df95cd1aefe90c2e20a7dddd;p=xonotic%2Fxonotic-data.pk3dir.git Clean it up a tiny bit --- diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index dc7c62aed5..48d20f82a7 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -25,10 +25,13 @@ float Physics_Valid(string thecvar) float Physics_ClientOption(entity pl, string option) { - if(Physics_Valid(pl.cvar_cl_physics) && (cvar_type(sprintf("g_physics_%s_%s", pl.cvar_cl_physics, option)) & 1)) - return cvar(sprintf("g_physics_%s_%s", pl.cvar_cl_physics, option)); - else - return cvar(strcat("sv_", option)); + if (Physics_Valid(pl.cvar_cl_physics)) + { + string var = sprintf("g_physics_%s_%s", pl.cvar_cl_physics, option); + if (cvar_type(var) & 1) + return cvar(var); + } + return cvar(strcat("sv_", option)); } /*