[-] Fixed assert for transformaed units

This commit is contained in:
cybermind 2015-02-17 21:34:39 +05:00
parent 16ab7b89f4
commit cb5b7d32bc

View file

@ -729,6 +729,9 @@ void CommandUpgradeTo(CUnit &unit, CUnitType &type, int flush)
*/
void CommandTransformIntoType(CUnit &unit, CUnitType &type)
{
if (unit.CriticalOrder && unit.CriticalOrder->Action == UnitActionTransformInto) {
return;
}
Assert(unit.CriticalOrder == NULL);
unit.CriticalOrder = COrder::NewActionTransformInto(type);