Skip to content

Commit

Permalink
Add check for server init being completed before allowing onNotify to…
Browse files Browse the repository at this point in the history
… run

Weird issue happens when arriving in Gahreesen from the bahro pole book
  • Loading branch information
Hazado committed Aug 16, 2023
1 parent d863078 commit 2502a04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Scripts/Python/grsnNexusBookMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
kElevMoving = 1
kElevUp = 2
elevatorStatus = kElevDown
serverInitDone = False

class grsnNexusBookMachine(ptResponder):

Expand All @@ -105,6 +106,8 @@ def GetPlayersInChatDistance(self, minPlayers=8):
return plyrList

def OnServerInitComplete(self):
global serverInitDone
serverInitDone = True
bookPillarSpinning.run(self.key,netPropagate=False)
if not PtIsSolo():
return
Expand Down Expand Up @@ -151,6 +154,8 @@ def OnNotify(self,state,id,events):
global elevatorStatus

#PtDebugPrint("id ",id)
if not serverInitDone:
return

avatar=PtFindAvatar(events)
local = PtGetLocalAvatar()
Expand Down

0 comments on commit 2502a04

Please sign in to comment.