diff --git a/OpenRa.Game/Controller.cs b/OpenRa.Game/Controller.cs index 7a3a8b31f4..d47b69949a 100644 --- a/OpenRa.Game/Controller.cs +++ b/OpenRa.Game/Controller.cs @@ -17,12 +17,16 @@ namespace OpenRa.Game this.game = game; } - public void WorldClicked(object sender, MouseEventArgs e) + public void WorldClicked( object sender, MouseEventArgs e ) { - var xy = (1 / 24.0f) * (new float2(e.Location) + game.viewport.Location); - if (orderGenerator != null) - orderGenerator.Order(game, new int2((int)xy.X, (int)xy.Y)).Apply(game); // todo: route all orders through netcode + var xy = ( 1 / 24.0f ) * ( new float2( e.Location ) + game.viewport.Location ); + if( orderGenerator != null ) + { + var order = orderGenerator.Order( game, new int2( (int)xy.X, (int)xy.Y ) ); + if( order != null ) + order.Apply( game ); + } } } } diff --git a/OpenRa.Game/Graphics/Sequence.cs b/OpenRa.Game/Graphics/Sequence.cs index c9fe749d10..ecce1b57b5 100644 --- a/OpenRa.Game/Graphics/Sequence.cs +++ b/OpenRa.Game/Graphics/Sequence.cs @@ -32,7 +32,7 @@ namespace OpenRa.Game.Graphics public Sprite GetSprite(int frame) { - return UnitSheetBuilder.sprites[frame + start]; + return UnitSheetBuilder.sprites[ ( frame % length ) + start ]; } } } diff --git a/sequences.xml b/sequences.xml index 7fd1819920..d424f04aa7 100644 --- a/sequences.xml +++ b/sequences.xml @@ -13,7 +13,7 @@ also, creates a sequence that includes all frames after `start`. - + one day, we might support inheritance here too. standard sequence names: @@ -104,6 +104,14 @@ + + + + + + + + @@ -128,8 +136,23 @@ + + + + + + + + + + + + + + + @@ -137,6 +160,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -144,6 +188,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +