mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00: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:
parent
067766eec2
commit
fd5a130b86
10 changed files with 124 additions and 152 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue