UIM.Tick is no longer necessary. - Bugfix in move. - Speed up production even more (to encourage someone to fix unit production)

This commit is contained in:
Bob
2009-11-12 13:58:07 +13:00
parent c96d41b82f
commit a71e36688c
3 changed files with 8 additions and 6 deletions

View File

@@ -107,6 +107,8 @@ namespace OpenRa.Game.Traits.Activities
[Conditional( "SANITY_CHECKS")] [Conditional( "SANITY_CHECKS")]
void SanityCheckPath( Mobile mobile ) void SanityCheckPath( Mobile mobile )
{ {
if( path.Count == 0 )
return;
var d = path[path.Count-1] - mobile.toCell; var d = path[path.Count-1] - mobile.toCell;
if( d.LengthSquared > 2 ) if( d.LengthSquared > 2 )
throw new InvalidOperationException( "(Move) Sanity check failed" ); throw new InvalidOperationException( "(Move) Sanity check failed" );

View File

@@ -18,13 +18,13 @@ namespace OpenRa.Game
public void Tick() public void Tick()
{ {
SanityCheck(); //SanityCheck();
var units = Game.world.Actors //var units = Game.world.Actors
.Select( a => a.traits.GetOrDefault<Traits.Mobile>() ).Where( m => m != null ); // .Select( a => a.traits.GetOrDefault<Traits.Mobile>() ).Where( m => m != null );
foreach (var u in units) //foreach (var u in units)
Update(u); // Update(u);
SanityCheck(); SanityCheck();
} }

View File

@@ -99,7 +99,7 @@ namespace OpenRa.Game
* ( 25 * 60 ) /* frames per min */ /* todo: build acceleration, if we do that */ * ( 25 * 60 ) /* frames per min */ /* todo: build acceleration, if we do that */
/ 1000; / 1000;
time = .05f * time; /* temporary hax so we can build stuff fast for test */ time = .01f * time; /* temporary hax so we can build stuff fast for test */
order.Player.BeginProduction(group, order.Player.BeginProduction(group,
new ProductionItem(order.TargetString, (int)time, ui.Cost, new ProductionItem(order.TargetString, (int)time, ui.Cost,