Commit 1fcb2d36 authored by Eiko Oltmanns's avatar Eiko Oltmanns

manually triggered mine explosions now make correct damage

parent 9e307ad3
......@@ -45,5 +45,14 @@ void cActionSelfDestroy::execute(cModel& model) const
if (b->isBeeingAttacked()) return;
model.destroyUnit(*b);
// special case: when a land/sea mine explodes, it makes damage according to
// its attack points. So start an attack job instead of just destoying it.
if (b->getStaticUnitData().explodesOnContact)
{
model.addAttackJob(*b, b->getPosition());
}
else
{
model.destroyUnit(*b);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment