Fixed event queue not clearing on level changes, and causing weirdness.

This commit is contained in:
Patrick Marsee 2019-10-15 19:57:17 -04:00
parent 963c77f77c
commit ee5c4da549

View file

@ -360,6 +360,8 @@ Object can be the name of the object, or its coordinates."""
preLoaded = False preLoaded = False
if args[0] in self.persist: if args[0] in self.persist:
preLoaded = True preLoaded = True
self.clearEvents()
# load the new level # load the new level
if len(args) == 2: if len(args) == 2:
@ -659,7 +661,7 @@ Object can be the name of the object, or its coordinates."""
if a != 'n' and a != 'N': if a != 'n' and a != 'N':
self.loadMap((thing.destination, thing.exitid)) self.loadMap((thing.destination, thing.exitid))
else: else:
print('{0} went {1}.'.format(actor.name, str(thing))) print('{0} went {1}.'.format(actor.name, str(thing)), file = self.outstream)
self.level.removeThing(actor.name) self.level.removeThing(actor.name)
else: else:
e.action() e.action()