Undo some changes + space fixes

modernize-cmake-1
DavivaD 2019-07-22 17:04:15 +02:00
parent b8b2d32bc1
commit 9c2ea5f488
3 changed files with 23 additions and 46 deletions
src
graphics/engine

View File

@ -1425,8 +1425,7 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part)
if (total < 50) percent = 0.25f; if (total < 50) percent = 0.25f;
if (total < 20) percent = 0.50f; if (total < 20) percent = 0.50f;
if (m_type == PT_FRAGV || if ( m_type == PT_FRAGV || m_type == PT_EGG )
m_type == PT_EGG)
{ {
percent = 0.30f; percent = 0.30f;
} }
@ -1520,8 +1519,7 @@ void CPyro::CreateTriangle(CObject* obj, ObjectType oType, int part)
Math::Matrix* mat = obj->GetWorldMatrix(part); Math::Matrix* mat = obj->GetWorldMatrix(part);
Math::Vector pos = Math::Transform(*mat, offset); Math::Vector pos = Math::Transform(*mat, offset);
if ( m_type == PT_FRAGV || if ( m_type == PT_FRAGV || m_type == PT_EGG )
m_type == PT_EGG )
{ {
speed.x = (Math::Rand()-0.5f)*10.0f; speed.x = (Math::Rand()-0.5f)*10.0f;
speed.z = (Math::Rand()-0.5f)*10.0f; speed.z = (Math::Rand()-0.5f)*10.0f;

View File

@ -37,9 +37,9 @@ enum PyroType
PT_FRAGT = 1, //! < fragmentation of technical object PT_FRAGT = 1, //! < fragmentation of technical object
PT_FRAGO = 2, //! < fragmentation of organic object PT_FRAGO = 2, //! < fragmentation of organic object
PT_FRAGW = 4, //! < fragmentation of object under water PT_FRAGW = 4, //! < fragmentation of object under water
PT_FRAGV = 27, //! < fragmentation of plant object PT_FRAGV = 5, //! < fragmentation of plant object
PT_EXPLOT = 5, //! < explosion of technical object PT_EXPLOT = 6, //! < explosion of technical object
PT_EXPLOO = 6, //! < explosion of organic object PT_EXPLOO = 7, //! < explosion of organic object
PT_EXPLOW = 8, //! < explosion of object under water PT_EXPLOW = 8, //! < explosion of object under water
PT_SHOTT = 9, //! < hit technical object PT_SHOTT = 9, //! < hit technical object
PT_SHOTH = 10, //! < hit human PT_SHOTH = 10, //! < hit human

View File

@ -376,7 +376,6 @@ bool CTaskTerraform::Terraform()
type == OBJECT_METAL || type == OBJECT_METAL ||
type == OBJECT_BULLET || type == OBJECT_BULLET ||
type == OBJECT_BBOX || type == OBJECT_BBOX ||
type == OBJECT_WAYPOINT ||
type == OBJECT_KEYa || type == OBJECT_KEYa ||
type == OBJECT_KEYb || type == OBJECT_KEYb ||
type == OBJECT_KEYc || type == OBJECT_KEYc ||
@ -384,13 +383,6 @@ bool CTaskTerraform::Terraform()
type == OBJECT_TNT || type == OBJECT_TNT ||
type == OBJECT_NEST || type == OBJECT_NEST ||
type == OBJECT_BOMB || 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_WINFIRE ||
type == OBJECT_BAG || type == OBJECT_BAG ||
type == OBJECT_PLANT0 || type == OBJECT_PLANT0 ||
@ -406,7 +398,6 @@ bool CTaskTerraform::Terraform()
type == OBJECT_PLANT17 || type == OBJECT_PLANT17 ||
type == OBJECT_PLANT18 || type == OBJECT_PLANT18 ||
type == OBJECT_PLANT19 || type == OBJECT_PLANT19 ||
type == OBJECT_QUARTZ0 ||
type == OBJECT_EGG || type == OBJECT_EGG ||
type == OBJECT_RUINmobilew1 || type == OBJECT_RUINmobilew1 ||
type == OBJECT_RUINmobilew2 || type == OBJECT_RUINmobilew2 ||
@ -423,45 +414,33 @@ bool CTaskTerraform::Terraform()
{ {
dist = Math::Distance(m_terraPos, pObj->GetPosition()); dist = Math::Distance(m_terraPos, pObj->GetPosition());
if (type == OBJECT_BULLET || if ( type == OBJECT_BULLET ||
type == OBJECT_NEST || type == OBJECT_NEST ||
type == OBJECT_EGG) // Alien Organic? type == OBJECT_EGG ) // Alien Organic?
{ {
if ( dist > 5.0f ) continue; if ( dist > 5.0f ) continue;
m_engine->GetPyroManager()->Create(Gfx::PT_FRAGO, pObj); m_engine->GetPyroManager()->Create(Gfx::PT_FRAGO, pObj);
} }
else if (type == OBJECT_TNT || else if ( type == OBJECT_TNT ||
type == OBJECT_BOMB) // Explosives? type == OBJECT_BOMB ) // Explosives?
{ {
if ( dist > 5.0f ) continue; if ( dist > 5.0f ) continue;
m_engine->GetPyroManager()->Create(Gfx::PT_EXPLOT, pObj); m_engine->GetPyroManager()->Create(Gfx::PT_EXPLOT, pObj);
dynamic_cast<CDamageableObject*>(m_object)->DamageObject(DamageType::Explosive, 0.9f); dynamic_cast<CDamageableObject*>(m_object)->DamageObject(DamageType::Explosive, 0.9f);
} }
else if (type == OBJECT_WAYPOINT || else if ( type == OBJECT_PLANT0 ||
type == OBJECT_MARKPOWER || type == OBJECT_PLANT1 ||
type == OBJECT_MARKSTONE || type == OBJECT_PLANT2 ||
type == OBJECT_MARKURANIUM || type == OBJECT_PLANT3 ||
type == OBJECT_MARKKEYa || type == OBJECT_PLANT4 ||
type == OBJECT_MARKKEYb || type == OBJECT_PLANT5 ||
type == OBJECT_MARKKEYc || type == OBJECT_PLANT6 ||
type == OBJECT_MARKKEYd) // Marks? type == OBJECT_PLANT7 ||
{ type == OBJECT_PLANT15 ||
if ( dist > 5.0f ) continue; type == OBJECT_PLANT16 ||
CObjectManager::GetInstancePointer()->DeleteObject(pObj); type == OBJECT_PLANT17 ||
} type == OBJECT_PLANT18 ||
else if (type == OBJECT_PLANT0 || type == OBJECT_PLANT19 ) // Plants?
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; if ( dist > 7.5f ) continue;
m_engine->GetPyroManager()->Create(Gfx::PT_FRAGV, pObj); m_engine->GetPyroManager()->Create(Gfx::PT_FRAGV, pObj);