From 8a9288bcb34f1116abef92b02b4de7d5f673d941 Mon Sep 17 00:00:00 2001 From: bonnibel Date: Fri, 20 Dec 2024 14:27:01 -0800 Subject: [PATCH] Do not check for collision on deactivated entities. --- src/Murder/Systems/Physics/TriggerPhysicsSystem.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Murder/Systems/Physics/TriggerPhysicsSystem.cs b/src/Murder/Systems/Physics/TriggerPhysicsSystem.cs index 02a7603b..4b85a9c9 100644 --- a/src/Murder/Systems/Physics/TriggerPhysicsSystem.cs +++ b/src/Murder/Systems/Physics/TriggerPhysicsSystem.cs @@ -5,7 +5,6 @@ using Bang.Systems; using Murder.Components; using Murder.Core.Physics; -using Murder.Helpers; using Murder.Services; using Murder.Utilities; using System.Collections.Immutable; @@ -120,9 +119,11 @@ public void OnAfterTrigger(World world) } } } - - // Check for active entities. - CheckCollision(entity, qt, world); + else + { + // Check for active entities. + CheckCollision(entity, qt, world); + } } // Clear the list for the next frame.