]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Cvar resetting of picked up items
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 14:16:32 +0000 (17:16 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 14:16:32 +0000 (17:16 +0300)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/mutators/mutator_physical_weapons.qc

index adafe307006c775b394704b874c3a5957c6fa700..5e7d41eea49646c12597bc5320b3127983454487 100644 (file)
@@ -1389,6 +1389,7 @@ set sv_foginterval 1 "force enable fog in regular intervals"
 
 set g_ode_items 2 "1 uses ODE physics for dropped weapons, 2 for all items, requires physics_ode to be enabled"
 set g_ode_items_damageforcescale 3 "how affected physical weapons are by damage"
+set g_ode_items_reset 1 "return map items to their original lotation after being picked up"
 
 // Audio track names (for old-style "cd loop NUMBER" usage)
 set _cdtrack_first "1"
index 0e77e6091c38f5b6a6245c97dce952203c6f969d..8ec28c0f7a39eb9f576cdc112b677c19ec9a1e49 100644 (file)
@@ -1218,3 +1218,4 @@ float autocvar_g_max_info_autoscreenshot;
 float autocvar_physics_ode;
 float autocvar_g_ode_items;
 float autocvar_g_ode_items_damageforcescale;
+float autocvar_g_ode_items_reset;
index 88cf9c5d3b2a33eb89225498a1c31dcb2912f101..37c9c7c8dd52f6bff220cfec93fa990eb6d5e427 100644 (file)
@@ -14,17 +14,20 @@ void thrown_wep_ode_think()
                self.glowmod = self.owner.glowmod;
 
                // if the item is not spawned, make sure the invisible / ghost item returns to its origin and stays there
-               if(self.owner.nextthink > time) // awaiting respawn
+               if(autocvar_g_ode_items_reset)
                {
-                       setorigin(self, self.spawn_origin);
-                       self.angles = self.spawn_angles;
-                       self.solid = SOLID_NOT;
-                       self.movetype = MOVETYPE_NONE;
-               }
-               else
-               {
-                       self.solid = SOLID_CORPSE;
-                       self.movetype = MOVETYPE_PHYSICS;
+                       if(self.owner.nextthink > time) // awaiting respawn
+                       {
+                               setorigin(self, self.spawn_origin);
+                               self.angles = self.spawn_angles;
+                               self.solid = SOLID_NOT;
+                               self.movetype = MOVETYPE_NONE;
+                       }
+                       else
+                       {
+                               self.solid = SOLID_CORPSE;
+                               self.movetype = MOVETYPE_PHYSICS;
+                       }
                }
        }