diff --git a/src/object/old_object.cpp b/src/object/old_object.cpp index 0550b80d..4804b907 100644 --- a/src/object/old_object.cpp +++ b/src/object/old_object.cpp @@ -356,12 +356,18 @@ bool COldObject::DamageObject(DamageType type, float force, CObject* killer) } else if ( Implements(ObjectInterfaceType::Fragile) ) { - if ((m_type == OBJECT_BOMB || - m_type == OBJECT_RUINfactory || - m_type == OBJECT_RUINdoor || - m_type == OBJECT_RUINsupport || - m_type == OBJECT_RUINradar || - m_type == OBJECT_RUINconvert ) && type != DamageType::Explosive ) return false; // Mines and ruins can't be destroyed by shooting + if ((m_type == OBJECT_BOMB || + m_type == OBJECT_RUINmobilew1 || + m_type == OBJECT_RUINmobilew2 || + m_type == OBJECT_RUINmobilet1 || + m_type == OBJECT_RUINmobilet2 || + m_type == OBJECT_RUINmobiler1 || + m_type == OBJECT_RUINmobiler2 || + m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) && type != DamageType::Explosive ) return false; // Mines and ruins can't be destroyed by shooting if ( m_type == OBJECT_URANIUM ) return false; // UraniumOre is not destroyable (see #777) DestroyObject(DestructionType::Explosion, killer); @@ -840,11 +846,17 @@ void COldObject::SetType(ObjectType type) m_implementedInterfaces[static_cast(ObjectInterfaceType::Fragile)] = false; m_implementedInterfaces[static_cast(ObjectInterfaceType::Shielded)] = false; } - else if (m_type == OBJECT_RUINfactory || - m_type == OBJECT_RUINdoor || - m_type == OBJECT_RUINsupport || - m_type == OBJECT_RUINradar || - m_type == OBJECT_RUINconvert ) + else if (m_type == OBJECT_RUINmobilew1 || + m_type == OBJECT_RUINmobilew2 || + m_type == OBJECT_RUINmobilet1 || + m_type == OBJECT_RUINmobilet2 || + m_type == OBJECT_RUINmobiler1 || + m_type == OBJECT_RUINmobiler2 || + m_type == OBJECT_RUINfactory || + m_type == OBJECT_RUINdoor || + m_type == OBJECT_RUINsupport || + m_type == OBJECT_RUINradar || + m_type == OBJECT_RUINconvert ) { m_implementedInterfaces[static_cast(ObjectInterfaceType::Damageable)] = true; m_implementedInterfaces[static_cast(ObjectInterfaceType::Destroyable)] = true; diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index afbb0db3..c481c20e 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -2720,7 +2720,7 @@ bool CPhysics::ExploOther(ObjectType iType, if (pObj->GetType() == OBJECT_STONE ) { destructionForce = 25.0f; } // TitaniumOre if (pObj->GetType() == OBJECT_URANIUM ) { destructionForce = 25.0f; } // UraniumOre if (pObj->GetType() == OBJECT_MOBILEtg) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TargetBot (something running into it) - if (iType == OBJECT_MOBILEtg) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TargetBot (it running into something) + if (iType == OBJECT_MOBILEtg) { destructionForce = 0.0f; damageType = DamageType::Explosive; } // TargetBot (it running into something) if (pObj->GetType() == OBJECT_TNT ) { destructionForce = 10.0f; damageType = DamageType::Explosive; } // TNT if (pObj->GetType() == OBJECT_BOMB ) { destructionForce = 0.0f; damageType = DamageType::Explosive; } // Mine @@ -2810,7 +2810,7 @@ int CPhysics::ExploHimself(ObjectType iType, ObjectType oType, float force) float destructionForce = -1.0f; // minimal force required to destroy an object using this explosive, default: not explosive if ( oType == OBJECT_TNT ) destructionForce = 10.0f; // TNT if ( oType == OBJECT_MOBILEtg ) destructionForce = 10.0f; // TargetBot (something running into it) - if ( iType == OBJECT_MOBILEtg ) destructionForce = 10.0f; // TargetBot (it running into something) + if ( iType == OBJECT_MOBILEtg ) destructionForce = 0.0f; // TargetBot (it running into something) if ( oType == OBJECT_BOMB ) destructionForce = 0.0f; // Mine if ( force > destructionForce && destructionForce >= 0.0f )