1
This commit is contained in:
parent
f1099980ed
commit
97aff06caa
@ -29,32 +29,29 @@ void MoveableEntity::OnGridListChange(std::set<GridCell*>& old_grids,
|
||||
std::set<GridCell*>& dec_grids
|
||||
)
|
||||
{
|
||||
{
|
||||
room->grid_service->TraverseAllLayerHumanList
|
||||
(
|
||||
room->GetRoomIdx(),
|
||||
inc_grids,
|
||||
[this, &old_grids] (Human* hum, bool& stop)
|
||||
{
|
||||
if (!room->grid_service->CreatureInGridList(hum, old_grids)) {
|
||||
hum->AddToNewObjects(this);
|
||||
hum->AddToPartObjects(this);
|
||||
hum->RemoveOutObjects(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
{
|
||||
room->grid_service->TraverseAllLayerHumanList
|
||||
(
|
||||
room->GetRoomIdx(),
|
||||
dec_grids,
|
||||
[this] (Human* hum, bool& stop)
|
||||
{
|
||||
if (!room->grid_service->CreatureInGridList(hum, GetGridList())) {
|
||||
hum->AddOutObjects(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
room->grid_service->TraverseAllLayerHumanList
|
||||
(
|
||||
room->GetRoomIdx(),
|
||||
inc_grids,
|
||||
[this, &old_grids] (Human* hum, bool& stop)
|
||||
{
|
||||
if (!room->grid_service->CreatureInGridList(hum, old_grids)) {
|
||||
hum->AddToNewObjects(this);
|
||||
hum->AddToPartObjects(this);
|
||||
hum->RemoveOutObjects(this);
|
||||
}
|
||||
});
|
||||
|
||||
room->grid_service->TraverseAllLayerHumanList
|
||||
(
|
||||
room->GetRoomIdx(),
|
||||
dec_grids,
|
||||
[this] (Human* hum, bool& stop)
|
||||
{
|
||||
if (!room->grid_service->CreatureInGridList(hum, GetGridList())) {
|
||||
hum->AddOutObjects(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void MoveableEntity::SyncAroundPlayers(const char* file, int line, const char* func)
|
||||
|
Loading…
x
Reference in New Issue
Block a user