From 9c2ea5f488883d16fc433f92f86f2053a017858c Mon Sep 17 00:00:00 2001 From: DavivaD Date: Mon, 22 Jul 2019 17:04:15 +0200 Subject: [PATCH] Undo some changes + space fixes --- src/graphics/engine/pyro.cpp | 6 ++-- src/graphics/engine/pyro_type.h | 6 ++-- src/object/task/taskterraform.cpp | 57 ++++++++++--------------------- 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 5ab995cc..c4d31dd9 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -1425,8 +1425,7 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part) if (total < 50) percent = 0.25f; if (total < 20) percent = 0.50f; - if (m_type == PT_FRAGV || - m_type == PT_EGG) + if ( m_type == PT_FRAGV || m_type == PT_EGG ) { percent = 0.30f; } @@ -1520,8 +1519,7 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part) Math::Matrix* mat = obj->GetWorldMatrix(part); Math::Vector pos = Math::Transform(*mat, offset); - if ( m_type == PT_FRAGV || - m_type == PT_EGG ) + if ( m_type == PT_FRAGV || m_type == PT_EGG ) { speed.x = (Math::Rand()-0.5f)*10.0f; speed.z = (Math::Rand()-0.5f)*10.0f; diff --git a/src/graphics/engine/pyro_type.h b/src/graphics/engine/pyro_type.h index 9693cbde..a4fc4158 100644 --- a/src/graphics/engine/pyro_type.h +++ b/src/graphics/engine/pyro_type.h @@ -37,9 +37,9 @@ enum PyroType PT_FRAGT = 1, //! < fragmentation of technical object PT_FRAGO = 2, //! < fragmentation of organic object PT_FRAGW = 4, //! < fragmentation of object under water - PT_FRAGV = 27, //! < fragmentation of plant object - PT_EXPLOT = 5, //! < explosion of technical object - PT_EXPLOO = 6, //! < explosion of organic object + PT_FRAGV = 5, //! < fragmentation of plant object + PT_EXPLOT = 6, //! < explosion of technical object + PT_EXPLOO = 7, //! < explosion of organic object PT_EXPLOW = 8, //! < explosion of object under water PT_SHOTT = 9, //! < hit technical object PT_SHOTH = 10, //! < hit human diff --git a/src/object/task/taskterraform.cpp b/src/object/task/taskterraform.cpp index 1883ea30..9fdfda0d 100644 --- a/src/object/task/taskterraform.cpp +++ b/src/object/task/taskterraform.cpp @@ -376,7 +376,6 @@ bool CTaskTerraform::Terraform() type == OBJECT_METAL || type == OBJECT_BULLET || type == OBJECT_BBOX || - type == OBJECT_WAYPOINT || type == OBJECT_KEYa || type == OBJECT_KEYb || type == OBJECT_KEYc || @@ -384,13 +383,6 @@ bool CTaskTerraform::Terraform() type == OBJECT_TNT || type == OBJECT_NEST || type == OBJECT_BOMB || - type == OBJECT_MARKPOWER || - type == OBJECT_MARKSTONE || - type == OBJECT_MARKURANIUM || - type == OBJECT_MARKKEYa || - type == OBJECT_MARKKEYb || - type == OBJECT_MARKKEYc || - type == OBJECT_MARKKEYd || type == OBJECT_WINFIRE || type == OBJECT_BAG || type == OBJECT_PLANT0 || @@ -406,7 +398,6 @@ bool CTaskTerraform::Terraform() type == OBJECT_PLANT17 || type == OBJECT_PLANT18 || type == OBJECT_PLANT19 || - type == OBJECT_QUARTZ0 || type == OBJECT_EGG || type == OBJECT_RUINmobilew1 || type == OBJECT_RUINmobilew2 || @@ -423,45 +414,33 @@ bool CTaskTerraform::Terraform() { dist = Math::Distance(m_terraPos, pObj->GetPosition()); - if (type == OBJECT_BULLET || - type == OBJECT_NEST || - type == OBJECT_EGG) // Alien Organic? + if ( type == OBJECT_BULLET || + type == OBJECT_NEST || + type == OBJECT_EGG ) // Alien Organic? { if ( dist > 5.0f ) continue; m_engine->GetPyroManager()->Create(Gfx::PT_FRAGO, pObj); } - else if (type == OBJECT_TNT || - type == OBJECT_BOMB) // Explosives? + else if ( type == OBJECT_TNT || + type == OBJECT_BOMB ) // Explosives? { if ( dist > 5.0f ) continue; m_engine->GetPyroManager()->Create(Gfx::PT_EXPLOT, pObj); dynamic_cast(m_object)->DamageObject(DamageType::Explosive, 0.9f); } - else if (type == OBJECT_WAYPOINT || - type == OBJECT_MARKPOWER || - type == OBJECT_MARKSTONE || - type == OBJECT_MARKURANIUM || - type == OBJECT_MARKKEYa || - type == OBJECT_MARKKEYb || - type == OBJECT_MARKKEYc || - type == OBJECT_MARKKEYd) // Marks? - { - if ( dist > 5.0f ) continue; - CObjectManager::GetInstancePointer()->DeleteObject(pObj); - } - else if (type == OBJECT_PLANT0 || - type == OBJECT_PLANT1 || - type == OBJECT_PLANT2 || - type == OBJECT_PLANT3 || - type == OBJECT_PLANT4 || - type == OBJECT_PLANT5 || - type == OBJECT_PLANT6 || - type == OBJECT_PLANT7 || - type == OBJECT_PLANT15 || - type == OBJECT_PLANT16 || - type == OBJECT_PLANT17 || - type == OBJECT_PLANT18 || - type == OBJECT_PLANT19) // Plants? + else if ( type == OBJECT_PLANT0 || + type == OBJECT_PLANT1 || + type == OBJECT_PLANT2 || + type == OBJECT_PLANT3 || + type == OBJECT_PLANT4 || + type == OBJECT_PLANT5 || + type == OBJECT_PLANT6 || + type == OBJECT_PLANT7 || + type == OBJECT_PLANT15 || + type == OBJECT_PLANT16 || + type == OBJECT_PLANT17 || + type == OBJECT_PLANT18 || + type == OBJECT_PLANT19 ) // Plants? { if ( dist > 7.5f ) continue; m_engine->GetPyroManager()->Create(Gfx::PT_FRAGV, pObj);