From bbc6636c65326c982fc2e06e2b512fcacbebabb5 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Mon, 6 Mar 2023 00:54:28 +0100 Subject: [PATCH] fix predatorytunicate always spitting out to the left, now it's the facing direction --- files/scripts/entities/predatorytunicate.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/scripts/entities/predatorytunicate.lua b/files/scripts/entities/predatorytunicate.lua index e4f9a20..6017e9b 100644 --- a/files/scripts/entities/predatorytunicate.lua +++ b/files/scripts/entities/predatorytunicate.lua @@ -190,7 +190,11 @@ function exitState(me) elseif entity_isState(me, STATE_TRAPPED) then --entity_addVel(v.trappedEnt, -800, 0) if v.trappedEnt ~= 0 then - entity_push(v.trappedEnt, -800, 0, 1) + local pushx = -800 -- left + if entity_isfh(me) then -- facing right? + pushx = -pushx + end + entity_push(v.trappedEnt, pushx, 0, 1) end v.trappedEnt = 0 if v.trapDelay == 0 then