1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Correctly removes players from their cells when leaving zone, fixes mob-in-city problem.

This commit is contained in:
collett 2021-09-11 00:52:59 +09:00
parent 95df885a86
commit 46ce78aa45

View file

@ -269,12 +269,7 @@ void Sapphire::Territory::pushActor( Entity::ActorPtr pActor )
void Sapphire::Territory::removeActor( Entity::ActorPtr pActor )
{
float mx = pActor->getPos().x;
float my = pActor->getPos().z;
uint32_t cx = getPosX( mx );
uint32_t cy = getPosY( my );
Cell* pCell = getCellPtr( cx, cy );
Cell* pCell = pActor->getCellPtr();
if( pCell && pCell->hasActor( pActor ) )
pCell->removeActorFromCell( pActor );