From 26648226848f0586cf9100135d3a9d3ad2d53269 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 2 Feb 2018 02:34:08 +1000 Subject: [PATCH] Fix debris changing the func_breakable's velocity instead of its own when multiplying by force --- qcsrc/common/triggers/func/breakable.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.2