2013-09-26 17:14:40 +02:00

32 lines
1002 B
Plaintext

$NetBSD: patch-af,v 1.2 2011/12/20 10:35:03 wiz Exp $
--- boson/unit.cpp.orig 2003-03-29 11:42:04.000000000 +0000
+++ boson/unit.cpp
@@ -1083,7 +1083,7 @@ BoItemList* Unit::unitsInRange(unsigned
QRect rect;
rect.setCoords(left - range, top - range, right + range, bottom + range);
BoItemList* items = collisions()->collisionsAtCells(rect, (BosonItem*)this, false);
- items->remove((BosonItem*)this);
+ items->removeItem((BosonItem*)this);
BoItemList* inRange = new BoItemList();
BoItemList::Iterator it = items->begin();
@@ -1101,7 +1101,7 @@ BoItemList* Unit::unitsInRange(unsigned
}
// TODO: remove the items from inRange which are not actually in range (hint:
// pythagoras)
- inRange->append(*it);
+ inRange->appendItem(*it);
}
return inRange;
}
@@ -1115,7 +1115,7 @@ BoItemList* Unit::enemyUnitsInRange(unsi
for (; it != units->end(); ++it) {
u = (Unit*)*it;
if (owner()->isEnemy(u->owner())) {
- enemy->append(u);
+ enemy->appendItem(u);
}
}
return enemy;