summaryrefslogtreecommitdiffhomepage
path: root/StarsEx
diff options
context:
space:
mode:
Diffstat (limited to 'StarsEx')
-rw-r--r--StarsEx/Ship.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/StarsEx/Ship.cpp b/StarsEx/Ship.cpp
index 4f10eeb..bc30e88 100644
--- a/StarsEx/Ship.cpp
+++ b/StarsEx/Ship.cpp
@@ -1452,15 +1452,13 @@ Ship::CollidesWith(Physical& o)
if (!o.Rep())
return 1;
- for (int i = 0; i < detail.NumModels(detail_level); i++) {
- Graphic* g = detail.GetRep(detail_level, i);
+ for (int i = 0; i < detail.NumModels(detail.NumLevels() - 1); i++) {
+ Graphic* g = detail.GetRep(detail.NumLevels() - 1, i);
if (o.Type() == SimObject::SIM_SHIP) {
Ship* o_ship = (Ship*) &o;
- int o_det = o_ship->detail_level;
-
- for (int j = 0; j < o_ship->detail.NumModels(o_det); j++) {
- Graphic* o_g = o_ship->detail.GetRep(o_det, j);
+ for (int j = 0; j < o_ship->detail.NumModels(o_ship->detail.NumLevels() - 1); j++) {
+ Graphic* o_g = o_ship->detail.GetRep(o_ship->detail.NumLevels() - 1, j);
if (g->CollidesWith(*o_g))
return 1;