mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 23:47:16 +02:00
Added a check for multiple connected sessions to avoid moving disconnected object more than once. Resolves issue 145.
This commit is contained in:
parent
8288534cf6
commit
2f78bacd97
6 changed files with 26 additions and 19 deletions
|
|
@ -113,9 +113,10 @@ class Character(BaseCharacter):
|
|||
We stove away the character when logging off, otherwise they will remain where
|
||||
they are, 'headless', so to say.
|
||||
"""
|
||||
self.location.msg_contents("%s has left the game." % self.name)
|
||||
self.db.prelogout_location = self.location
|
||||
self.location = None
|
||||
if self.location: # have to check, in case of multiple connections
|
||||
self.location.msg_contents("%s has left the game." % self.name)
|
||||
self.db.prelogout_location = self.location
|
||||
self.location = None
|
||||
|
||||
def at_post_login(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue