From 54ffd83cdce59963ac08f5b6357d55c8b4147fd1 Mon Sep 17 00:00:00 2001 From: Mircea Kitsune Date: Tue, 3 Apr 2012 23:51:15 +0300 Subject: [PATCH] Fix cvars --- defaultXonotic.cfg | 3 +++ qcsrc/server/autocvars.qh | 2 ++ qcsrc/server/cl_weapons.qc | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 89edddfe0d..c3b2090dad 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1387,6 +1387,9 @@ alias sethostname "set menu_use_default_hostname 0; hostname $*" set sv_foginterval 1 "force enable fog in regular intervals" +set sv_physics_ode_droppedweapon 1 "use ODE physics instead of simple physics for dropped weapons, requires physics_ode to be enabled" +set sv_physics_ode_droppedweapon_damageforcescale 3 "how affected physical weapons are by damage" + // Audio track names (for old-style "cd loop NUMBER" usage) set _cdtrack_first "1" alias _cdtrack_0 "g_cdtracks_remaplist \"$g_cdtracks_remaplist $1\"" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 002cce3308..8738e04aa2 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -1216,3 +1216,5 @@ float autocvar_g_sandbox_object_material_velocity_min; float autocvar_g_sandbox_object_material_velocity_factor; float autocvar_g_max_info_autoscreenshot; float autocvar_physics_ode; +float autocvar_sv_physics_ode_droppedweapon; +float autocvar_sv_physics_ode_droppedweapon_damageforcescale; diff --git a/qcsrc/server/cl_weapons.qc b/qcsrc/server/cl_weapons.qc index c62067b2c4..031c5d0591 100644 --- a/qcsrc/server/cl_weapons.qc +++ b/qcsrc/server/cl_weapons.qc @@ -312,7 +312,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto wep.pickup_anyway = TRUE; // these are ALWAYS pickable // make the dropped weapon physical - //if(autocvar_sv_ode && autocvar_physics_ode) + if(autocvar_physics_ode && autocvar_sv_physics_ode_droppedweapon) { entity wep2; wep2 = spawn(); @@ -328,7 +328,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto wep2.takedamage = DAMAGE_AIM; wep2.colormap = wep.colormap; wep2.glowmod = wep.glowmod; - wep2.damageforcescale = 3; // FIX!!! + wep2.damageforcescale = autocvar_sv_physics_ode_droppedweapon_damageforcescale; wep2.think = thrown_wep_ode_think; wep2.nextthink = time; -- 2.39.2