home · contact · privacy
Introduce SpawnPoint things, and their Spawners.
[plomrogue2] / plomrogue / commands.py
index 3a10a4c24e182aa6b72dd6a41ac575bcb2664d0e..6532b72bbe027ebb65d0805025140a49da8145d4 100644 (file)
@@ -88,6 +88,10 @@ def cmd_LOGIN(game, nick, connection_id):
     t.name = nick
     game.io.send('CHAT ' + quote(t.name + ' entered the map.'))
     game.io.send('PLAYER_ID %s' % t.id_, connection_id)
+    for s in [s for s in game.things
+              if s.type_ == 'SpawnPoint' and s.name == t.name]:
+        t.position = s.position
+        break
     game.changed = True
 cmd_LOGIN.argtypes = 'string'