Skip to content

Commit

Permalink
Fix: [Building] Figures can again get kicked out of rooms while inter…
Browse files Browse the repository at this point in the history
…acting in it. Report: jorgaeff
  • Loading branch information
GWRon committed Mar 21, 2018
1 parent 148ce34 commit 2db3c4a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/game.figure.bmx
Expand Up @@ -858,7 +858,7 @@ endrem

'=== CHECK IF LEAVING IS ALLOWED ===
'skip leaving if not allowed to do so
if not forceLeave and not CanLeaveroom(inroom) then return False
if not forceLeave and not CanLeaveRoom(inroom) then return False

'ask if somebody is against leaving that room
if not TryLeaveRoom( forceLeave )
Expand All @@ -878,11 +878,11 @@ endrem


Method TryLeaveRoom:int(forceLeave:int = False)
'but ignore the result if figure is forced to leave
'inform others but ignore the result if figure is forced to leave
local event:TEventSimple = TEventSimple.Create("figure.onTryLeaveRoom", new TData.Add("door", usedDoor) , self, inroom )
EventManager.triggerEvent(event)
'stop leaving
if event.IsVeto() then return False
if not forceLeave and event.IsVeto() then return False

return True
End Method
Expand Down

0 comments on commit 2db3c4a

Please sign in to comment.