From 2b2998d645c92fa3eeb18fbbf11444532f15b5ee Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 9 Sep 2023 16:41:01 +0200 Subject: [PATCH] Ensure Flak Chunks Dont Cause Damage On The Ground --- Classes/ST_UTChunk.uc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Classes/ST_UTChunk.uc b/Classes/ST_UTChunk.uc index f0c3d424..56edf687 100644 --- a/Classes/ST_UTChunk.uc +++ b/Classes/ST_UTChunk.uc @@ -11,10 +11,18 @@ var int ChunkIndex; function ProcessTouch (Actor Other, vector HitLocation) { + // Physics for chunks is split into 3 phases: + // PHYS_Projectile -- immediately after being fired, default physics + // PHYS_Falling -- after hitting surface while in PHYS_Projectile + // PHYS_None -- after touching standable ground while in PHYS_Falling + + if (Physics == PHYS_None) + return; + if ( (Chunk(Other) == None) && ((Physics == PHYS_Falling) || (Other != Instigator)) ) { speed = VSize(Velocity); - If ( speed > 200 ) + if ( speed > 200 ) { if ( Role == ROLE_Authority ) {