Skip to content

Commit

Permalink
allow user_of override falling actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Matroftt authored Sep 25, 2024
1 parent 7586bd3 commit 0f52c39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CorsixTH/Lua/entities/humanoids/patient.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ function Patient:onClick(ui, button)
ui:addWindow(UIPatient(ui, self))
end
end
elseif self.user_of then
-- The object we're using is made invisible, as the animation contains both
-- the humanoid and the object. Hence send the click onto the object.
self.user_of:onClick(ui, button)
elseif TheApp.config.debug_falling and button == "right" then
-- Attempt to push patient over
-- Currently debug-only, enable in config file for testing.
Expand All @@ -80,10 +84,6 @@ function Patient:onClick(ui, button)
and math.random(1, 2) == 2 then
self:falling(true)
end
elseif self.user_of then
-- The object we're using is made invisible, as the animation contains both
-- the humanoid and the object. Hence send the click onto the object.
self.user_of:onClick(ui, button)
end
Humanoid.onClick(self, ui, button)
end
Expand Down

0 comments on commit 0f52c39

Please sign in to comment.