mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user