Ints are 4 bytes always (apparently), and Order's ToString is no longer broken
This commit is contained in:
@@ -134,9 +134,9 @@ namespace OpenRA
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "OrderString: \"{0}\" \n\t Subject: \"{0}\"." +
|
||||
"\n\t TargetActor: \"{0}\" \n\t TargetLocation: {0}.\n\t TargetString: \"{0}\".\n\t IsImmediate: {0}.\n".F(
|
||||
OrderString, Subject, TargetActor, TargetLocation, TargetString, IsImmediate);
|
||||
return "OrderString: \"{0}\" \n\t Subject: \"{1}\". \n\t TargetActor: \"{2}\" \n\t TargetLocation: {3}." +
|
||||
"\n\t TargetString: \"{4}\".\n\t IsImmediate: {5}.\n\t Player(PlayerName): {6}\n".F(
|
||||
OrderString, Subject, TargetActor.Info.Name , TargetLocation, TargetString, IsImmediate, Player.PlayerName);
|
||||
}
|
||||
|
||||
static uint UIntFromActor(Actor a)
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Network
|
||||
public bool GameStarted { get { return FrameNumber != 0; } }
|
||||
public IConnection Connection { get; private set; }
|
||||
|
||||
public readonly int SyncHeaderSize = 5;
|
||||
public readonly int SyncHeaderSize = 9;
|
||||
|
||||
Dictionary<int, int> clientQuitTimes = new Dictionary<int, int>();
|
||||
|
||||
@@ -123,10 +123,10 @@ namespace OpenRA.Network
|
||||
{
|
||||
if( packet[ i ] != existingSync[ i ] )
|
||||
{
|
||||
if ( i < SyncHeaderSize + sizeof(int) )
|
||||
if ( i < SyncHeaderSize )
|
||||
OutOfSync(frame, "Tick");
|
||||
else
|
||||
OutOfSync( frame , (i - SyncHeaderSize - sizeof(int)) / 4);
|
||||
OutOfSync( frame , (i - SyncHeaderSize) / 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user