]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Some final fixes to the physical weapons. Since the current implementation was declar...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 11:47:00 +0000 (14:47 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Apr 2012 11:47:00 +0000 (14:47 +0300)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/cl_weapons.qc

index 0f1e4184f124e95d09ebe2a2affbf2c90c9543cc..f32a19948412380c5136cd9f7f2a1100eeb89917 100644 (file)
@@ -1389,7 +1389,6 @@ set sv_foginterval 1 "force enable fog in regular intervals"
 
 set physics_ode_droppedweapon 1 "use ODE physics instead of simple physics for dropped weapons, requires physics_ode to be enabled"
 set physics_ode_droppedweapon_damageforcescale 3 "how affected physical weapons are by damage"
-set physics_ode_droppedweapon_avelocity 2 "randomized anagular velocity given to the weapon when dropping"
 
 // Audio track names (for old-style "cd loop NUMBER" usage)
 set _cdtrack_first "1"
index 399bb2f1fb94fced4f6b5622d57a1fa0a8eb5328..9ff8b038f476f8ffdb87e2eda9b62292ef19b17d 100644 (file)
@@ -1218,4 +1218,3 @@ float autocvar_g_max_info_autoscreenshot;
 float autocvar_physics_ode;
 float autocvar_physics_ode_droppedweapon;
 float autocvar_physics_ode_droppedweapon_damageforcescale;
-float autocvar_physics_ode_droppedweapon_avelocity;
index 938228ff4d4a39eb12aaf72cd8bbd0ab9ed3c0c1..dcd9d16f15434b56bf9a5a31217c233d708af8f2 100644 (file)
@@ -189,7 +189,6 @@ void thrown_wep_think()
 void thrown_wep_ode_think()
 {
        self.nextthink = time;
-       self.alpha = self.owner.alpha; // apply fading of the original weapon
        if(!self.owner.modelindex)
                remove(self); // the real weapon is gone, remove this
 }
@@ -316,28 +315,22 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
                {
                        entity wep2;
                        wep2 = spawn();
+                       setsize(wep2, wep.mins, wep.maxs);
                        setorigin(wep2, wep.origin);
-                       setmodel(wep2, wep.model);
                        wep2.angles = wep.angles;
                        wep2.velocity = velo;
-                       wep2.avelocity_x = random() * autocvar_physics_ode_droppedweapon_avelocity;
-                       wep2.avelocity_y = random() * autocvar_physics_ode_droppedweapon_avelocity;
-                       wep2.avelocity_z = random() * autocvar_physics_ode_droppedweapon_avelocity;
 
                        wep2.classname = "droppedweapon2";
                        wep2.owner = wep;
-                       wep2.solid = SOLID_BBOX;
+                       wep2.solid = SOLID_CORPSE;
                        wep2.movetype = MOVETYPE_PHYSICS;
                        wep2.takedamage = DAMAGE_AIM;
-                       wep2.colormap = wep.colormap;
-                       wep2.glowmod = wep.glowmod;
                        wep2.damageforcescale = autocvar_physics_ode_droppedweapon_damageforcescale;
-                       wep2.effects |= EF_NOMODELFLAGS; // disable the spinning
 
                        wep2.think = thrown_wep_ode_think;
                        wep2.nextthink = time;
 
-                       wep.model = "null"; // don't use setmodel, we want to keep the size
+                       wep.effects |= EF_NOMODELFLAGS; // disable the spinning
                        wep.movetype = MOVETYPE_FOLLOW;
                        wep.aiment = wep2;
                }