]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix debris changing the func_breakable's velocity instead of its own when multiplying...
authorMario <mario@smbclan.net>
Thu, 1 Feb 2018 16:34:08 +0000 (02:34 +1000)
committerMario <mario@smbclan.net>
Thu, 1 Feb 2018 16:34:08 +0000 (02:34 +1000)
qcsrc/common/triggers/func/breakable.qc

index 6e0c2b3a3119fd690aa4bc54ef3f2a2009883a47..84e5581c8d7e521d7e6aa7e61f2a9fb4508a4d67 100644 (file)
@@ -67,7 +67,8 @@ void LaunchDebris (entity this, string debrisname, vector force)
        dbr.velocity_x = this.debrisvelocity.x + this.debrisvelocityjitter.x * crandom();
        dbr.velocity_y = this.debrisvelocity.y + this.debrisvelocityjitter.y * crandom();
        dbr.velocity_z = this.debrisvelocity.z + this.debrisvelocityjitter.z * crandom();
-       this.velocity = this.velocity + force * this.debrisdamageforcescale;
+       dbr.velocity = dbr.velocity + force * this.debrisdamageforcescale;
+       dbr.angles = this.angles;
        dbr.avelocity_x = random()*this.debrisavelocityjitter.x;
        dbr.avelocity_y = random()*this.debrisavelocityjitter.y;
        dbr.avelocity_z = random()*this.debrisavelocityjitter.z;