From fd5a130b86c08f0b3190c3d81affd4869c139fb7 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Sat, 8 Oct 2016 16:31:22 +0200 Subject: More code cleanup (UNORDERED + RemotePlayer/LocalPlayer) * ClientEnvironment now uses UNORDERED MAP for active objects * Use RemotePlayer and LocalPlayer everywhere it's possible * Minor code style fixes * Drop Client::getBreath() unused function --- src/content_cao.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/content_cao.cpp') diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 207a630d7..a53768149 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -655,12 +655,11 @@ void GenericCAO::initialize(const std::string &data) if(m_is_player) { - Player *player = m_env->getPlayer(m_name.c_str()); - if(player && player->isLocal()) - { + LocalPlayer *player = m_env->getPlayer(m_name.c_str()); + if (player && player->isLocal()) { m_is_local_player = true; m_is_visible = false; - LocalPlayer* localplayer = dynamic_cast(player); + LocalPlayer* localplayer = player; assert( localplayer != NULL ); localplayer->setCAO(this); -- cgit v1.2.3