aboutsummaryrefslogtreecommitdiff
path: root/src/content_cao.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content_cao.cpp')
-rw-r--r--src/content_cao.cpp7
1 files changed, 3 insertions, 4 deletions
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<LocalPlayer*>(player);
+ LocalPlayer* localplayer = player;
assert( localplayer != NULL );
localplayer->setCAO(this);