]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't use .origin directly
authorMario <mario@smbclan.net>
Wed, 23 Dec 2015 08:34:09 +0000 (18:34 +1000)
committerMario <mario@smbclan.net>
Wed, 23 Dec 2015 08:34:09 +0000 (18:34 +1000)
qcsrc/common/triggers/func/breakable.qc

index b8b79975e41b97ac873a96bd249b8786c54f5806..7f17de515e59b733379973348af49f48bad141f2 100644 (file)
@@ -50,11 +50,11 @@ void func_breakable_damage(entity inflictor, entity attacker, float damage, int
 void LaunchDebris (string debrisname, vector force)
 {SELFPARAM();
        entity dbr = spawn();
-       dbr.origin = self.absmin
+       vector org = 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);
-       setorigin(dbr, dbr.origin);
+       setorigin(dbr, org);
        _setmodel (dbr, debrisname );
        dbr.skin = self.debrisskin;
        dbr.colormap = self.colormap; // inherit team colors