]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a couple of setorigin pains
authorMario <mario@smbclan.net>
Wed, 23 Dec 2015 07:45:32 +0000 (17:45 +1000)
committerMario <mario@smbclan.net>
Wed, 23 Dec 2015 07:45:32 +0000 (17:45 +1000)
qcsrc/common/triggers/func/breakable.qc
qcsrc/server/cheats.qc

index 6305c534025650da0dabb4a41adc43b14d7737c6..b8b79975e41b97ac873a96bd249b8786c54f5806 100644 (file)
@@ -50,10 +50,11 @@ void func_breakable_damage(entity inflictor, entity attacker, float damage, int
 void LaunchDebris (string debrisname, vector force)
 {SELFPARAM();
        entity dbr = spawn();
-       setorigin(dbr, self.absmin
+       dbr.origin = self.absmin
                   + '1 0 0' * random() * (self.absmax.x - self.absmin.x)
                   + '0 1 0' * random() * (self.absmax.y - self.absmin.y)
-                  + '0 0 1' * random() * (self.absmax.z - self.absmin.z));
+                  + '0 0 1' * random() * (self.absmax.z - self.absmin.z);
+       setorigin(dbr, dbr.origin);
        _setmodel (dbr, debrisname );
        dbr.skin = self.debrisskin;
        dbr.colormap = self.colormap; // inherit team colors
index 7718f96fb59b0684ac4101f58652f270aab2c4c3..cdad6d9fea184ca1a8aaa5d484b9cf476b38bedc 100644 (file)
@@ -1067,7 +1067,8 @@ void DragBox_Think()
                self.maxs_y = fabs(self.aiment.origin.y - self.enemy.origin.y) * 0.5;
                self.maxs_z = fabs(self.aiment.origin.z - self.enemy.origin.z) * 0.5;
                self.mins = -1 * self.maxs;
-               setorigin(self, self.origin); setsize(self, self.mins, self.maxs); // link edict
+               setorigin(self, self.origin);
+               setsize(self, self.mins, self.maxs); // link edict
        }
 
        if(self.cnt == -1) // actually race_place -1