git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1297 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -45,10 +45,17 @@ namespace OpenRa.Game
|
||||
};
|
||||
}
|
||||
|
||||
double timeUntilNextFrame;
|
||||
|
||||
Action<double> tickFunc;
|
||||
public void Tick( double t )
|
||||
{
|
||||
tickFunc( t );
|
||||
timeUntilNextFrame -= t;
|
||||
while( timeUntilNextFrame <= 0 )
|
||||
{
|
||||
tickFunc( t );
|
||||
timeUntilNextFrame += ( 40.0 / 1000.0 ); // 25 fps == 40 ms
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace OpenRa.Game
|
||||
world.Add( new Refinery( new int2( 7, 5 ), 2 ) );
|
||||
|
||||
sidebar = new Sidebar(Race.Soviet, renderer, viewport);
|
||||
|
||||
}
|
||||
|
||||
void PrecacheStructure(string name)
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
<Compile Include="Animation.cs" />
|
||||
<Compile Include="Building.cs" />
|
||||
<Compile Include="Log.cs" />
|
||||
<Compile Include="PathFinder.cs" />
|
||||
<Compile Include="Sequence.cs" />
|
||||
<Compile Include="ConstructionYard.cs" />
|
||||
<Compile Include="float2.cs" />
|
||||
|
||||
@@ -21,8 +21,9 @@ namespace OpenRa.Game
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
File.WriteAllText( "error.log", e.ToString() );
|
||||
throw;
|
||||
File.WriteAllText( "error.log", e.ToString() );
|
||||
Log.Write( "{0}", e.ToString() );
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user