solved problems, that came after 6b22e47d1c

--HG--
branch : trunk
This commit is contained in:
silver1ce
2010-01-07 04:05:26 +02:00
parent b0e7dc95a4
commit de414a2b19
+7 -10
View File
@@ -687,46 +687,43 @@ template<class NOTIFIER>
inline void inline void
Map::VisitAll(const float &x, const float &y, float radius, NOTIFIER &notifier) Map::VisitAll(const float &x, const float &y, float radius, NOTIFIER &notifier)
{ {
float x_off, y_off; CellPair p(Trinity::ComputeCellPair(x, y));
CellPair p(Trinity::ComputeCellPair(x, y, x_off, y_off));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier); TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier);
cell_lock->Visit(cell_lock, world_object_notifier, *this, radius, x_off, y_off); cell_lock->Visit(cell_lock, world_object_notifier, *this, radius, x, y);
TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier); TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier);
cell_lock->Visit(cell_lock, grid_object_notifier, *this, radius, x_off, y_off); cell_lock->Visit(cell_lock, grid_object_notifier, *this, radius, x, y);
} }
template<class NOTIFIER> template<class NOTIFIER>
inline void inline void
Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier) Map::VisitWorld(const float &x, const float &y, float radius, NOTIFIER &notifier)
{ {
float x_off, y_off; CellPair p(Trinity::ComputeCellPair(x, y));
CellPair p(Trinity::ComputeCellPair(x, y, x_off, y_off));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier); TypeContainerVisitor<NOTIFIER, WorldTypeMapContainer> world_object_notifier(notifier);
cell_lock->Visit(cell_lock, world_object_notifier, *this, radius, x_off, y_off); cell_lock->Visit(cell_lock, world_object_notifier, *this, radius, x, y);
} }
template<class NOTIFIER> template<class NOTIFIER>
inline void inline void
Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier) Map::VisitGrid(const float &x, const float &y, float radius, NOTIFIER &notifier)
{ {
float x_off, y_off; CellPair p(Trinity::ComputeCellPair(x, y));
CellPair p(Trinity::ComputeCellPair(x, y, x_off, y_off));
Cell cell(p); Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT; cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate(); cell.SetNoCreate();
CellLock<GridReadGuard> cell_lock(cell, p); CellLock<GridReadGuard> cell_lock(cell, p);
TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier); TypeContainerVisitor<NOTIFIER, GridTypeMapContainer > grid_object_notifier(notifier);
cell_lock->Visit(cell_lock, grid_object_notifier, *this, radius, x_off, y_off); cell_lock->Visit(cell_lock, grid_object_notifier, *this, radius, x, y);
} }
#endif #endif