From c399e5e246496503fbdd97cf99244ed4b0ae5e07 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 13 Aug 2015 19:53:03 +0200 Subject: [PATCH] Somehow missed some more Scraps :/ --- src/graphics/engine/pyro.cpp | 6 ------ src/object/object_type.h | 5 ----- src/object/task/taskgoto.cpp | 40 +++--------------------------------- 3 files changed, 3 insertions(+), 48 deletions(-) diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 9bbeb15d..1647d4fb 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -169,12 +169,6 @@ bool CPyro::Create(PyroType type, CObject* obj, float force) m_power = true; m_posPower = m_pos; } - if ( oType == OBJECT_SCRAP4 || - oType == OBJECT_SCRAP5 ) // plastic material? - { - m_power = true; - m_posPower = m_pos; - } // Plays the sound of a pyrotechnic effect. if ( type == PT_FRAGT || diff --git a/src/object/object_type.h b/src/object/object_type.h index 1e9d4409..32c03506 100644 --- a/src/object/object_type.h +++ b/src/object/object_type.h @@ -66,11 +66,6 @@ enum ObjectType OBJECT_BULLET = 36, //! < OrgaMatter OBJECT_BBOX = 37, //! < BlackBox OBJECT_TNT = 38, //! < TNT - OBJECT_SCRAP1 = 40, //! < Scrap1 (metal) - OBJECT_SCRAP2 = 41, //! < Scrap2 (metal) - OBJECT_SCRAP3 = 42, //! < Scrap3 (metal) - OBJECT_SCRAP4 = 43, //! < Scrap4 (plastic) - OBJECT_SCRAP5 = 44, //! < Scrap5 (plastic) OBJECT_MARKPOWER = 50, //! < PowerSpot OBJECT_MARKSTONE = 51, //! < TitaniumSpot OBJECT_MARKURANIUM = 52, //! < UraniumSpot diff --git a/src/object/task/taskgoto.cpp b/src/object/task/taskgoto.cpp index d187dd1a..ef150f62 100644 --- a/src/object/task/taskgoto.cpp +++ b/src/object/task/taskgoto.cpp @@ -1033,26 +1033,8 @@ bool CTaskGoto::AdjustTarget(CObject* pObj, Math::Vector &pos, float &distance) type = pObj->GetType(); - if ( type == OBJECT_FRET || - type == OBJECT_STONE || - type == OBJECT_URANIUM || - type == OBJECT_METAL || - type == OBJECT_POWER || - type == OBJECT_ATOMIC || - type == OBJECT_BULLET || - type == OBJECT_BBOX || - type == OBJECT_KEYa || - type == OBJECT_KEYb || - type == OBJECT_KEYc || - type == OBJECT_KEYd || - type == OBJECT_TNT || - type == OBJECT_SCRAP1 || - type == OBJECT_SCRAP2 || - type == OBJECT_SCRAP3 || - type == OBJECT_SCRAP4 || - type == OBJECT_SCRAP5 || - type == OBJECT_BOMB || - type == OBJECT_RUINmobilew1 || + if ( pObj->Implements(ObjectInterfaceType::Transportable) || + type == OBJECT_RUINmobilew1 || // TODO: CRecoverableObject? type == OBJECT_RUINmobilew2 || type == OBJECT_RUINmobilet1 || type == OBJECT_RUINmobilet2 || @@ -1426,23 +1408,7 @@ void CTaskGoto::ComputeRepulse(Math::Point &dir) if ( bAlien ) { - if ( oType == OBJECT_STONE || - oType == OBJECT_URANIUM || - oType == OBJECT_METAL || - oType == OBJECT_POWER || - oType == OBJECT_ATOMIC || - oType == OBJECT_BULLET || - oType == OBJECT_BBOX || - oType == OBJECT_KEYa || - oType == OBJECT_KEYb || - oType == OBJECT_KEYc || - oType == OBJECT_KEYd || - oType == OBJECT_TNT || - oType == OBJECT_SCRAP1 || - oType == OBJECT_SCRAP2 || - oType == OBJECT_SCRAP3 || - oType == OBJECT_SCRAP4 || - oType == OBJECT_SCRAP5 || + if ( pObj->Implements(ObjectInterfaceType::Transportable) || oType == OBJECT_BOMB || (oType >= OBJECT_PLANT0 && oType <= OBJECT_PLANT19 ) ||