git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1336 993157c7-ee19-0410-b2c4-bb4e9862e678

This commit is contained in:
(no author)
2007-07-24 06:28:44 +00:00
parent a5cc26df09
commit 51bc9aa134
4 changed files with 59 additions and 9 deletions

View File

@@ -47,16 +47,19 @@ namespace OpenRa.Game
{ {
return new Refinery( location, palette ); return new Refinery( location, palette );
} ); } );
buildingCreation.Add( "powr",
delegate( int2 location, int palette ) string[] buildings = { "powr", "apwr", "weap", "barr", "atek", "stek", "dome" };
foreach (string s in buildings)
AddBuilding(s);
}
void AddBuilding(string name)
{
buildingCreation.Add(name,
delegate(int2 location, int palette)
{ {
return new Building( "powr", location, palette ); return new Building(name, location, palette);
} ); });
buildingCreation.Add( "apwr",
delegate( int2 location, int palette )
{
return new Building( "apwr", location, palette );
} );
} }
public void Tick() public void Tick()

View File

@@ -8,6 +8,7 @@ namespace OpenRa.Game
static class Log static class Log
{ {
static StreamWriter writer = File.CreateText("../../../log.txt"); static StreamWriter writer = File.CreateText("../../../log.txt");
static Log() static Log()
{ {
writer.AutoFlush = true; writer.AutoFlush = true;

View File

@@ -17,6 +17,9 @@ namespace OpenRa.Game
int nextSyncTime = 0; int nextSyncTime = 0;
int currentFrame = 0; int currentFrame = 0;
public int CurrentFrame { get { return currentFrame; } }
public int RemainingNetSyncTime { get { return Math.Min(0, Environment.TickCount - nextSyncTime); } }
Queue<Packet> incomingPackets = new Queue<Packet>(); Queue<Packet> incomingPackets = new Queue<Packet>();
public Network() public Network()
@@ -39,6 +42,9 @@ namespace OpenRa.Game
} }
} }
}); });
receiveThread.IsBackground = true;
receiveThread.Start();
} }
public void Send(byte[] data) public void Send(byte[] data)

View File

@@ -63,6 +63,46 @@
<sequence name="damaged-idle" start="1"/> <sequence name="damaged-idle" start="1"/>
<sequence name="make" start="0" length="*" src="apwrmake" /> <sequence name="make" start="0" length="*" src="apwrmake" />
</unit> </unit>
<!-- soviet barracks -->
<unit name="barr">
<sequence name="idle" start="0"/>
<sequence name="damaged-idle" start="1"/>
<sequence name="make" start="0" length="*" src="barrmake" />
</unit>
<!-- radar dome -->
<unit name="dome">
<sequence name="idle" start="0"/>
<sequence name="damaged-idle" start="1"/>
<sequence name="make" start="0" length="*" src="domemake" />
</unit>
<!-- allied tech center -->
<unit name="atek">
<sequence name="idle" start="0"/>
<sequence name="damaged-idle" start="1"/>
<sequence name="make" start="0" length="*" src="atekmake" />
</unit>
<!-- soviet tech center -->
<unit name="stek">
<sequence name="idle" start="0"/>
<sequence name="damaged-idle" start="1"/>
<sequence name="make" start="0" length="*" src="stekmake" />
</unit>
<!-- war factory -->
<unit name="weap">
<sequence name="idle" start="0"/>
<sequence name="damaged-idle" start="1"/>
<sequence name="make" start="0" length="*" src="weapmake" />
</unit>
<!-- mcv --> <!-- mcv -->