From b6695d5279dad729e94a4f9fe5f26d2992da62ff Mon Sep 17 00:00:00 2001 From: SilverIce Date: Mon, 8 Nov 2010 02:23:43 +0200 Subject: [PATCH] [10698] Compute cell area bounds for active objects in the same way like it done for players --- src/game/Map.cpp | 4 ++-- src/shared/revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 532b3b4e6..dc26fec6e 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -606,8 +606,8 @@ void Map::Update(uint32 time_, uint32 diff) // the overloaded operators handle range checking // so ther's no need for range checking inside the loop CellPair begin_cell(standing_cell), end_cell(standing_cell); - begin_cell << 1; begin_cell -= 1; // upper left - end_cell >> 1; end_cell += 1; // lower right + CellArea area = Cell::CalculateCellArea(obj->GetPositionX(), obj->GetPositionY(), GetVisibilityDistance()); + area.ResizeBorders(begin_cell, end_cell); for(uint32 x = begin_cell.x_coord; x <= end_cell.x_coord; ++x) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 99b803f28..ddd0ec38e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10697" + #define REVISION_NR "10698" #endif // __REVISION_NR_H__