From 3314f1e3f92d4e82df0be4c34e5fc9c39fe51f79 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 23 Jun 2019 15:32:25 +0200 Subject: [PATCH] improvement(actor): ignore by default collision with actor own hitboxes --- gamecore/modules/world/actors/baseactor.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gamecore/modules/world/actors/baseactor.lua b/gamecore/modules/world/actors/baseactor.lua index d395cd6..987fbea 100644 --- a/gamecore/modules/world/actors/baseactor.lua +++ b/gamecore/modules/world/actors/baseactor.lua @@ -87,7 +87,10 @@ end function BaseActor:setFilter() -- Init the bump filter self.filter = function(item, other) - if (other.isSolid) then + if (other.owner == self) then + -- ignore every collision with our own hitboxes + return nil + elseif (other.isSolid) then return "slide" else return "cross"