mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 15:47:46 +00:00
Fix player not being removed upon leaving territory
(cherry picked from commit 1713523e197a225fc5ff5c61a7143dcec091ad59)
This commit is contained in:
parent
49aeb1ec43
commit
36554bf1f3
1 changed files with 2 additions and 1 deletions
|
@ -490,7 +490,8 @@ void Territory::updateSessions( uint64_t tickCount, bool changedWeather )
|
||||||
}
|
}
|
||||||
|
|
||||||
// this session is not linked to this area anymore, remove it from zone session list
|
// this session is not linked to this area anymore, remove it from zone session list
|
||||||
if( pPlayer->getTerritoryId() != m_guId )
|
// TODO: Retrieving the session is expensive, try to find a better method of removing invalid actors
|
||||||
|
if( pPlayer->getTerritoryId() != m_guId || !server.getSession( pPlayer->getId() ) )
|
||||||
{
|
{
|
||||||
Logger::debug( "[{}] removeActor( pPlayer );", pPlayer->getId() );
|
Logger::debug( "[{}] removeActor( pPlayer );", pPlayer->getId() );
|
||||||
removeActor( pPlayer );
|
removeActor( pPlayer );
|
||||||
|
|
Loading…
Add table
Reference in a new issue