From 6db763e92ae2ee91df95cd1aefe90c2e20a7dddd Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Dec 2014 21:24:33 +1100 Subject: [PATCH] Clean it up a tiny bit --- qcsrc/server/cl_physics.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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)); } /* -- 2.39.2