From 607dbe972f1b31b6c1be9b5f92eeb29a42913ac9 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Wed, 9 Oct 2019 00:01:05 +0200 Subject: [PATCH] Hotfix to prevent trees and stuff from being knocked around by projectiles. --- zscript/utcommon.zsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zscript/utcommon.zsc b/zscript/utcommon.zsc index a6d81d3..f4a932c 100644 --- a/zscript/utcommon.zsc +++ b/zscript/utcommon.zsc @@ -2951,7 +2951,7 @@ Class UTMainHandler : EventHandler while ( bi.Next() ) { Actor a = bi.Thing; - if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) || (Source.Distance3D(a) > ExplosionRadius) ) + if ( !a || !a.bSHOOTABLE || !Source.CheckSight(a,0xf) || (a == Source) || (Source.Distance3D(a) > ExplosionRadius) || a.bCANNOTPUSH || (a.Mass >= 10000000) ) continue; Vector3 midpoint = a.Vec3Offset(0,0,a.height*0.5); Vector3 dir = Level.Vec3Diff(Source.pos,midpoint); @@ -2967,7 +2967,7 @@ Class UTMainHandler : EventHandler // Same for this static void DoKnockback( Actor Victim, Vector3 HitDirection, double MomentumTransfer ) { - if ( !Victim ) return; + if ( !Victim || !Victim.bSHOOTABLE || Victim.bCANNOTPUSH || (Victim.Mass >= 10000000) ) return; if ( (Victim is 'ShredCorpseHitbox') && Victim.target ) Victim.target.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.target.Mass)); else Victim.vel += HitDirection*(MomentumTransfer/(Thinker.TICRATE*Victim.Mass));