diff options
Diffstat (limited to 'src/game/base/platform.cc')
-rw-r--r-- | src/game/base/platform.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/game/base/platform.cc b/src/game/base/platform.cc index 77059ae..bfad7ef 100644 --- a/src/game/base/platform.cc +++ b/src/game/base/platform.cc @@ -88,17 +88,15 @@ void Platform::frame(const unsigned long elapsed) // platforms do not need weapons in inventory to fire if (enemylist.size()) { - const float modelscale = radius() / (model() ? model()->radius() : 1.0f); - - for (core::Slots::iterator it = slots()->begin(); it != slots()->end(); it++) { - core::Slot *slot = (*it); + for (core::Slots::iterator slit = slots()->begin(); slit != slots()->end(); slit++) { + core::Slot *slot = (*slit); // found out if this slot is a cannon or a turret const Weapon *weapon = 0; - if (slot->type() == model::Weapon::Cannon) { + if (slot->type() == model::Slot::Cannon) { weapon = cannon(); - } else if (slot->type() == model::Weapon::Turret) { + } else if (slot->type() == model::Slot::Turret) { weapon = turret(); } @@ -111,7 +109,7 @@ void Platform::frame(const unsigned long elapsed) } // location of the slot in world coordinates - const math::Vector3f slot_location(location() + (axis() * slot->location() * modelscale)); + const math::Vector3f slot_location(location() + (axis() * slot->location())); // find a target for this slot Ship *current_enemy = 0; |