Merge pull request #7495 from abcdefg30/placed_overlay
Fix a visual glitch in WithBuildingPlacedOverlay
This commit is contained in:
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.D2k.Traits
|
|||||||
public object Create(ActorInitializer init) { return new WithBuildingPlacedOverlay(init.Self, this); }
|
public object Create(ActorInitializer init) { return new WithBuildingPlacedOverlay(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WithBuildingPlacedOverlay : INotifyBuildComplete, INotifySold, INotifyDamageStateChanged, INotifyBuildingPlaced
|
public class WithBuildingPlacedOverlay : INotifyBuildComplete, INotifySold, INotifyDamageStateChanged, INotifyBuildingPlaced, INotifyTransform
|
||||||
{
|
{
|
||||||
Animation overlay;
|
Animation overlay;
|
||||||
bool buildComplete;
|
bool buildComplete;
|
||||||
@@ -65,6 +65,14 @@ namespace OpenRA.Mods.D2k.Traits
|
|||||||
buildComplete = false;
|
buildComplete = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void BeforeTransform(Actor self)
|
||||||
|
{
|
||||||
|
buildComplete = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnTransform(Actor self) { }
|
||||||
|
public void AfterTransform(Actor self) { }
|
||||||
|
|
||||||
public void DamageStateChanged(Actor self, AttackInfo e)
|
public void DamageStateChanged(Actor self, AttackInfo e)
|
||||||
{
|
{
|
||||||
overlay.ReplaceAnim(RenderSprites.NormalizeSequence(overlay, e.DamageState, overlay.CurrentSequence.Name));
|
overlay.ReplaceAnim(RenderSprites.NormalizeSequence(overlay, e.DamageState, overlay.CurrentSequence.Name));
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ GACNST:
|
|||||||
ProductionType: Building
|
ProductionType: Building
|
||||||
ProductionBar@Defense:
|
ProductionBar@Defense:
|
||||||
ProductionType: Defense
|
ProductionType: Defense
|
||||||
-Sellable:
|
|
||||||
WithIdleOverlay@TOP:
|
WithIdleOverlay@TOP:
|
||||||
Sequence: idle-top
|
Sequence: idle-top
|
||||||
WithIdleOverlay@SIDE:
|
WithIdleOverlay@SIDE:
|
||||||
|
|||||||
Reference in New Issue
Block a user