mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 07:26:49 +01:00
close channel event
This commit is contained in:
@@ -291,9 +291,13 @@ void Map::setCentralPosition(const Position& centralPosition)
|
||||
} else {
|
||||
for(const auto& pair : m_knownCreatures) {
|
||||
const CreaturePtr& creature = pair.second;
|
||||
if(!isAwareOfPosition(creature->getPosition())) {
|
||||
removeThing(creature);
|
||||
if(creature) {
|
||||
if(!isAwareOfPosition(creature->getPosition())) {
|
||||
removeThing(creature);
|
||||
}
|
||||
}
|
||||
else
|
||||
logTraceError("invalid creature");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user