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

Merge pull request #724 from collett8192/patch

Correctly removes players from their cells when leaving zone, fixes mob-in-city problem.
This commit is contained in:
Adam 2021-09-11 10:13:56 +10:00 committed by GitHub
commit 384f86c55c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 );