]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean it up a tiny bit
authorMario <zacjardine@y7mail.com>
Thu, 25 Dec 2014 10:24:33 +0000 (21:24 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 25 Dec 2014 10:24:33 +0000 (21:24 +1100)
qcsrc/server/cl_physics.qc

index dc7c62aed537d96b79ef4a9d8665ac1988a6e88b..48d20f82a72deb19dd066b3f6b18c80d17ea1114 100644 (file)
@@ -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));
 }
 
 /*