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:
parent
95df885a86
commit
46ce78aa45
1 changed files with 1 additions and 6 deletions
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue