From: Mario Date: Thu, 1 Feb 2018 16:34:08 +0000 (+1000) Subject: Fix debris changing the func_breakable's velocity instead of its own when multiplying... X-Git-Tag: xonotic-v0.8.5~2360 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=26648226848f0586cf9100135d3a9d3ad2d53269;p=xonotic%2Fxonotic-data.pk3dir.git Fix debris changing the func_breakable's velocity instead of its own when multiplying by force --- diff --git a/qcsrc/common/triggers/func/breakable.qc b/qcsrc/common/triggers/func/breakable.qc index 6e0c2b3a3..84e5581c8 100644 --- a/qcsrc/common/triggers/func/breakable.qc +++ b/qcsrc/common/triggers/func/breakable.qc @@ -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;