Fix dock animation continuing after refinery died
OnStateDock would always be triggered, even if the refinery was killed before the harvester would finish docking.
This commit is contained in:
@@ -62,10 +62,15 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
|
|
||||||
case DockingState.Dock:
|
case DockingState.Dock:
|
||||||
if (Refinery.IsInWorld && !Refinery.IsDead)
|
if (Refinery.IsInWorld && !Refinery.IsDead)
|
||||||
|
{
|
||||||
foreach (var nd in Refinery.TraitsImplementing<INotifyDocking>())
|
foreach (var nd in Refinery.TraitsImplementing<INotifyDocking>())
|
||||||
nd.Docked(Refinery, self);
|
nd.Docked(Refinery, self);
|
||||||
|
|
||||||
OnStateDock(self);
|
OnStateDock(self);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
dockingState = DockingState.Undock;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case DockingState.Loop:
|
case DockingState.Loop:
|
||||||
|
|||||||
Reference in New Issue
Block a user