Skip to content

Commit b45a5ce

Browse files
committed
Make gift package playable
1 parent 745df38 commit b45a5ce

File tree

5 files changed

+147
-258
lines changed

5 files changed

+147
-258
lines changed

src/items/item_manager.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,10 +532,9 @@ bool ItemManager::randomItemsForArena(const AlignedArray<btTransform>& pos)
532532
for (unsigned int j = 0; j < used_location.size(); j++)
533533
{
534534
if (!found) continue;
535-
Vec3 d = BattleGraph::get()
536-
->getPolyOfNode(used_location[j]).getCenter() -
537-
BattleGraph::get()->getPolyOfNode(node).getCenter();
538-
found = d.length_2d() > MIN_DIST;
535+
float test_distance = BattleGraph::get()
536+
->getDistance(used_location[j], node);
537+
found = test_distance > MIN_DIST;
539538
}
540539
if (found)
541540
{

0 commit comments

Comments
 (0)