Fixed a bug in CTaskShield
parent
9ad513550b
commit
f9abeb21ec
|
@ -442,7 +442,7 @@ void COldObject::DestroyObject(DestructionType type)
|
|||
SetShield(0.0f);
|
||||
}
|
||||
|
||||
Gfx::PyroType pyroType;
|
||||
Gfx::PyroType pyroType = Gfx::PT_NULL;
|
||||
if ( type == DestructionType::Explosion ) // explosion?
|
||||
{
|
||||
if ( m_type == OBJECT_ANT ||
|
||||
|
@ -525,6 +525,7 @@ void COldObject::DestroyObject(DestructionType type)
|
|||
{
|
||||
pyroType = Gfx::PT_DEADW;
|
||||
}
|
||||
assert(pyroType != Gfx::PT_NULL);
|
||||
m_engine->GetPyroManager()->Create(pyroType, this);
|
||||
|
||||
if ( Implements(ObjectInterfaceType::Programmable) )
|
||||
|
|
|
@ -544,7 +544,7 @@ void CTaskShield::IncreaseShield()
|
|||
for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())
|
||||
{
|
||||
if (!obj->Implements(ObjectInterfaceType::Shielded));
|
||||
CShieldedObject* shielded = dynamic_cast<CShieldedObject*>(shielded);
|
||||
CShieldedObject* shielded = dynamic_cast<CShieldedObject*>(obj);
|
||||
if (!shielded->IsRepairable()) continue; // NOTE: Looks like the original code forgot to check that
|
||||
|
||||
Math::Vector oPos = obj->GetPosition();
|
||||
|
|
Loading…
Reference in New Issue