]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix cvars
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Apr 2012 20:51:15 +0000 (23:51 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 Apr 2012 20:51:15 +0000 (23:51 +0300)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/cl_weapons.qc

index 89edddfe0d7fc8d194872bef6babbc2feb034c71..c3b2090dada4aced277169e105d04f88b1055d09 100644 (file)
@@ -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\""
index 002cce33082a26cd1b68b0862d6065fb7fc3db3c..8738e04aa21606ecc0c28718e16c98241cfdcdd7 100644 (file)
@@ -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;
index c62067b2c4f71ea8f2d5042e4d1ccf6b1318c84c..031c5d0591940130b0c474edc41c6b655508c7bb 100644 (file)
@@ -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;