mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 07:07:45 +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 )
|
void Sapphire::Territory::removeActor( Entity::ActorPtr pActor )
|
||||||
{
|
{
|
||||||
float mx = pActor->getPos().x;
|
Cell* pCell = pActor->getCellPtr();
|
||||||
float my = pActor->getPos().z;
|
|
||||||
uint32_t cx = getPosX( mx );
|
|
||||||
uint32_t cy = getPosY( my );
|
|
||||||
|
|
||||||
Cell* pCell = getCellPtr( cx, cy );
|
|
||||||
if( pCell && pCell->hasActor( pActor ) )
|
if( pCell && pCell->hasActor( pActor ) )
|
||||||
pCell->removeActorFromCell( pActor );
|
pCell->removeActorFromCell( pActor );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue