Commits

Andrew Godwin committed 47d4a55

Few more fixes.

Comments (0)

Files changed (2)

         
         # We use the buffer because TCP is a stream protocol :)
         self.buffer = ""
+        self.loading_world = False
         
         # Load plugins for ourselves
         self.commands = {}
                     self.last_block_changes = [(x, y, z)] + self.last_block_changes[:1]
             
             elif type == TYPE_PLAYERPOS:
+                # If we're loading a world, ignore these.
+                if self.loading_world:
+                    continue
+                
                 naff, x, y, z, h, p = parts
                 pos_change = not (x == self.x and y == self.y and z == self.z)
                 dir_change = not (h == self.h and p == self.p)
     
     def changeToWorld(self, world_id, position=None):
         self.factory.queue.put((self, TASK_WORLDCHANGE, (self.id, self.world)))
+        self.loading_world = True
         world = self.factory.joinWorld(world_id, self)
         self.runHook("newworld", world)
         if not self.isOp():
         
         sx, sy, sz, sh = self.world.spawn
         self.p = 0
+        self.loading_world = False
         
         # If we have a custom point set (teleport, tp), use that
         if self.initial_position:

server.conf.example

 
 [server]
 public: true
-duplicate_logins: true
+duplicate_logins: false
 verify_names: true
 control_password: bingy
 max_clients: 32