X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qc;h=3f220e84d9cf42f559c23882b45377939b7dd03c;hp=572bee349f205ca81caac2d23d0ff6da1d839696;hb=31cefbf89224b89cec59dc8c54ea4cdc4c4b870b;hpb=076f788ca65b63db5515d4b62ad2fc14d46686fe diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 572bee349..3f220e84d 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -10,19 +10,23 @@ // client side physics bool Physics_Valid(string thecvar) { - return autocvar_g_physics_clientselect && thecvar != "" && thecvar && thecvar != "default" && strhasword(autocvar_g_physics_clientselect_options, thecvar); + return thecvar != "" && thecvar && thecvar != "default" && strhasword(autocvar_g_physics_clientselect_options, thecvar); } float Physics_ClientOption(entity this, string option, float defaultval) { + if(!autocvar_g_physics_clientselect) + return defaultval; + if(IS_REAL_CLIENT(this) && Physics_Valid(CS(this).cvar_cl_physics)) { string s = strcat("g_physics_", CS(this).cvar_cl_physics, "_", option); if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS) return cvar(s); } - if(autocvar_g_physics_clientselect && autocvar_g_physics_clientselect_default && autocvar_g_physics_clientselect_default != "") + if(autocvar_g_physics_clientselect_default && autocvar_g_physics_clientselect_default != "" && autocvar_g_physics_clientselect_default != "default") { + // NOTE: not using Physics_Valid here, so the default can be forced to something normally unavailable string s = strcat("g_physics_", autocvar_g_physics_clientselect_default, "_", option); if(cvar_type(s) & CVAR_TYPEFLAG_EXISTS) return cvar(s);