Clear custom player HUDs when emerging players. Fixes #711.
authorAaron Suen <warr1024@gmail.com>
Fri, 10 May 2013 01:10:33 +0000 (21:10 -0400)
committerAaron Suen <warr1024@gmail.com>
Fri, 10 May 2013 23:25:50 +0000 (19:25 -0400)
src/server.cpp

index bf48a40d55fa33b2244834595700365afef5b4f1..40a4f8a024bd675bfc70d9d091cf580be38add00 100644 (file)
@@ -5077,6 +5077,9 @@ PlayerSAO* Server::emergePlayer(const char *name, u16 peer_id)
                        getPlayerEffectivePrivs(player->getName()),
                        isSingleplayer());
 
+       /* Clean up old HUD elements from previous sessions */
+       player->hud.clear();
+
        /* Add object to environment */
        m_env->addActiveObject(playersao);