Removed unused OBJECT_FIX and OBJECT_FRET
parent
a63a959dbe
commit
a5c84b9a1e
|
@ -960,8 +960,6 @@ bool CCamera::IsCollisionBack(Math::Vector &eye, Math::Vector lookat)
|
|||
if ( oType == OBJECT_HUMAN ||
|
||||
oType == OBJECT_TECH ||
|
||||
oType == OBJECT_TOTO ||
|
||||
oType == OBJECT_FIX ||
|
||||
oType == OBJECT_FRET ||
|
||||
oType == OBJECT_ANT ||
|
||||
oType == OBJECT_SPIDER ||
|
||||
oType == OBJECT_BEE ||
|
||||
|
@ -1011,7 +1009,6 @@ bool CCamera::IsCollisionFix(Math::Vector &eye, Math::Vector lookat)
|
|||
|
||||
ObjectType type = obj->GetType();
|
||||
if ( type == OBJECT_TOTO ||
|
||||
type == OBJECT_FRET ||
|
||||
type == OBJECT_STONE ||
|
||||
type == OBJECT_URANIUM ||
|
||||
type == OBJECT_METAL ||
|
||||
|
|
|
@ -4421,8 +4421,6 @@ bool CRobotMain::IOIsBusy()
|
|||
//! Writes an object into the backup file
|
||||
void CRobotMain::IOWriteObject(CLevelParserLine* line, CObject* obj, const std::string& programDir, int objRank)
|
||||
{
|
||||
if (obj->GetType() == OBJECT_FIX) return;
|
||||
|
||||
line->AddParam("type", MakeUnique<CLevelParserParam>(obj->GetType()));
|
||||
line->AddParam("id", MakeUnique<CLevelParserParam>(obj->GetID()));
|
||||
line->AddParam("pos", MakeUnique<CLevelParserParam>(obj->GetPosition()/g_unit));
|
||||
|
@ -4566,7 +4564,6 @@ bool CRobotMain::IOWriteScene(std::string filename, std::string filecbot, std::s
|
|||
for (CObject* obj : m_objMan->GetAllObjects())
|
||||
{
|
||||
if (obj->GetType() == OBJECT_TOTO) continue;
|
||||
if (obj->GetType() == OBJECT_FIX) continue;
|
||||
if (IsObjectBeingTransported(obj)) continue;
|
||||
if (obj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast<CDestroyableObject*>(obj)->IsDying()) continue;
|
||||
|
||||
|
@ -4620,7 +4617,6 @@ bool CRobotMain::IOWriteScene(std::string filename, std::string filecbot, std::s
|
|||
for (CObject* obj : m_objMan->GetAllObjects())
|
||||
{
|
||||
if (obj->GetType() == OBJECT_TOTO) continue;
|
||||
if (obj->GetType() == OBJECT_FIX) continue;
|
||||
if (IsObjectBeingTransported(obj)) continue;
|
||||
if (obj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast<CDestroyableObject*>(obj)->IsDying()) continue;
|
||||
|
||||
|
@ -4819,7 +4815,6 @@ CObject* CRobotMain::IOReadScene(std::string filename, std::string filecbot)
|
|||
for (CObject* obj : m_objMan->GetAllObjects())
|
||||
{
|
||||
if (obj->GetType() == OBJECT_TOTO) continue;
|
||||
if (obj->GetType() == OBJECT_FIX) continue;
|
||||
if (IsObjectBeingTransported(obj)) continue;
|
||||
if (obj->Implements(ObjectInterfaceType::Destroyable) && dynamic_cast<CDestroyableObject*>(obj)->IsDying()) continue;
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void CAutoDerrick::Init()
|
|||
res == Gfx::TR_KEY_C ||
|
||||
res == Gfx::TR_KEY_D )
|
||||
{
|
||||
m_type = OBJECT_FRET;
|
||||
m_type = OBJECT_NULL;
|
||||
if ( res == Gfx::TR_STONE ) m_type = OBJECT_STONE;
|
||||
if ( res == Gfx::TR_URANIUM ) m_type = OBJECT_URANIUM;
|
||||
if ( res == Gfx::TR_KEY_A ) m_type = OBJECT_KEYa;
|
||||
|
|
|
@ -110,7 +110,6 @@ CObjectUPtr CObjectFactory::CreateObject(const ObjectCreateParams& params)
|
|||
case OBJECT_END:
|
||||
return CBaseBuilding::Create(params, m_oldModelManager, m_engine);
|
||||
|
||||
case OBJECT_FRET:
|
||||
case OBJECT_STONE:
|
||||
case OBJECT_URANIUM:
|
||||
case OBJECT_METAL:
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
*/
|
||||
enum ObjectType
|
||||
{
|
||||
OBJECT_NULL = 0, //! < object destroyed
|
||||
OBJECT_FIX = 1, //! < stationary scenery
|
||||
OBJECT_NULL = 0,
|
||||
OBJECT_PORTICO = 2, //! < Portico
|
||||
OBJECT_BASE = 3, //! < SpaceShip
|
||||
OBJECT_DERRICK = 4, //! < Derrick
|
||||
|
@ -57,7 +56,6 @@ enum ObjectType
|
|||
OBJECT_SAFE = 22, //! < Vault
|
||||
OBJECT_HUSTON = 23, //! < Houston
|
||||
OBJECT_DESTROYER = 24, //! < Destroyer
|
||||
OBJECT_FRET = 30, //! < transportable (unused)
|
||||
OBJECT_STONE = 31, //! < TitaniumOre
|
||||
OBJECT_URANIUM = 32, //! < UraniumOre
|
||||
OBJECT_METAL = 33, //! < Titanium
|
||||
|
|
|
@ -109,7 +109,7 @@ COldObject::COldObject(int id)
|
|||
m_terrain = m_main->GetTerrain();
|
||||
m_camera = m_main->GetCamera();
|
||||
|
||||
m_type = OBJECT_FIX;
|
||||
m_type = OBJECT_NULL;
|
||||
m_option = 0;
|
||||
m_name = "";
|
||||
m_shadowLight = -1;
|
||||
|
@ -799,8 +799,7 @@ void COldObject::SetType(ObjectType type)
|
|||
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::ShieldedAutoRegen)] = (m_type == OBJECT_HUMAN);
|
||||
|
||||
// TODO: Hacking in progress...
|
||||
if ( m_type == OBJECT_FRET ||
|
||||
m_type == OBJECT_STONE ||
|
||||
if ( m_type == OBJECT_STONE ||
|
||||
m_type == OBJECT_URANIUM ||
|
||||
m_type == OBJECT_BULLET ||
|
||||
m_type == OBJECT_METAL ||
|
||||
|
@ -2424,30 +2423,7 @@ void COldObject::SetShield(float level)
|
|||
|
||||
float COldObject::GetShield()
|
||||
{
|
||||
if ( m_type == OBJECT_FRET ||
|
||||
m_type == OBJECT_STONE ||
|
||||
m_type == OBJECT_URANIUM ||
|
||||
m_type == OBJECT_BULLET ||
|
||||
m_type == OBJECT_METAL ||
|
||||
m_type == OBJECT_BBOX ||
|
||||
m_type == OBJECT_KEYa ||
|
||||
m_type == OBJECT_KEYb ||
|
||||
m_type == OBJECT_KEYc ||
|
||||
m_type == OBJECT_KEYd ||
|
||||
m_type == OBJECT_TNT ||
|
||||
m_type == OBJECT_BOMB ||
|
||||
m_type == OBJECT_WAYPOINT ||
|
||||
m_type == OBJECT_FLAGb ||
|
||||
m_type == OBJECT_FLAGr ||
|
||||
m_type == OBJECT_FLAGg ||
|
||||
m_type == OBJECT_FLAGy ||
|
||||
m_type == OBJECT_FLAGv ||
|
||||
m_type == OBJECT_POWER ||
|
||||
m_type == OBJECT_ATOMIC ||
|
||||
m_type == OBJECT_ANT ||
|
||||
m_type == OBJECT_SPIDER ||
|
||||
m_type == OBJECT_BEE ||
|
||||
m_type == OBJECT_WORM ) return 0.0f;
|
||||
if (Implements(ObjectInterfaceType::Fragile)) return 0.0f;
|
||||
return m_shield;
|
||||
}
|
||||
|
||||
|
|
|
@ -930,11 +930,6 @@ CObject* CTaskManip::SearchOtherObject(bool bAdvance, Math::Vector &pos,
|
|||
{
|
||||
if (power->GetLock()) continue;
|
||||
if (power->GetScaleY() != 1.0f) continue;
|
||||
|
||||
// TODO: this is probably redundant
|
||||
ObjectType powerType = power->GetType();
|
||||
if ( powerType == OBJECT_NULL ||
|
||||
powerType == OBJECT_FIX ) continue;
|
||||
}
|
||||
|
||||
mat = pObj->GetWorldMatrix(0);
|
||||
|
|
|
@ -133,8 +133,7 @@ Error CTaskTake::Start()
|
|||
{
|
||||
type = dynamic_cast<CPoweredObject*>(other)->GetPower()->GetType();
|
||||
if ( type == OBJECT_URANIUM ) return ERR_MANIP_RADIO;
|
||||
if ( type != OBJECT_FRET &&
|
||||
type != OBJECT_STONE &&
|
||||
if ( type != OBJECT_STONE &&
|
||||
type != OBJECT_BULLET &&
|
||||
type != OBJECT_METAL &&
|
||||
type != OBJECT_POWER &&
|
||||
|
@ -315,8 +314,7 @@ CObject* CTaskTake::SearchTakeObject(float &angle,
|
|||
{
|
||||
type = pObj->GetType();
|
||||
|
||||
if ( type != OBJECT_FRET &&
|
||||
type != OBJECT_STONE &&
|
||||
if ( type != OBJECT_STONE &&
|
||||
type != OBJECT_URANIUM &&
|
||||
type != OBJECT_BULLET &&
|
||||
type != OBJECT_METAL &&
|
||||
|
@ -414,10 +412,6 @@ CObject* CTaskTake::SearchFriendObject(float &angle,
|
|||
{
|
||||
if ( power->GetLock() ) continue;
|
||||
if ( power->GetScaleY() != 1.0f ) continue;
|
||||
|
||||
ObjectType powerType = power->GetType();
|
||||
if ( powerType == OBJECT_NULL ||
|
||||
powerType == OBJECT_FIX ) continue;
|
||||
}
|
||||
|
||||
Math::Matrix* mat = pObj->GetWorldMatrix(0);
|
||||
|
|
|
@ -2866,8 +2866,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force)
|
|||
force /= 400.0f;
|
||||
}
|
||||
else
|
||||
if ( oType == OBJECT_FRET ||
|
||||
oType == OBJECT_STONE ||
|
||||
if ( oType == OBJECT_STONE ||
|
||||
oType == OBJECT_METAL )
|
||||
{
|
||||
force /= 500.0f;
|
||||
|
|
Loading…
Reference in New Issue