Update grid system. Try to fix some crashes and transport passengers (now they are despawned after a while).

This commit is contained in:
megamage
2011-12-20 17:07:09 -05:00
parent e1afd79b1e
commit 8cf2062c1f
24 changed files with 117 additions and 87 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ void ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32
info.UpdateTimeTracker(t_diff);
if (info.getTimeTracker().Passed())
{
if (grid.ActiveObjectsInGrid() == 0 && !m.ActiveObjectsNearGrid(grid))
if (!grid.GetWorldObjectCountInNGrid<Player>() && !m.ActiveObjectsNearGrid(grid))
{
ObjectGridStoper worker;
TypeContainerVisitor<ObjectGridStoper, GridTypeMapContainer> visitor(worker);