put NextAutoTargetScanTime into syncreport.log

This commit is contained in:
Matthias Mailänder
2013-03-21 19:04:30 +01:00
parent 43bb75c135
commit 6307e51991

View File

@@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA
readonly AutoTargetInfo Info;
readonly AttackBase attack;
[Sync] int nextScanTime = 0;
[Sync] public int nextScanTime = 0;
public UnitStance stance;
[Sync] public int stanceNumber { get { return (int)stance; } }
public UnitStance predictedStance; /* NOT SYNCED: do not refer to this anywhere other than UI code */
@@ -149,4 +149,16 @@ namespace OpenRA.Mods.RA
public DebugRetiliateAgainstAggressor(Actor self){ a = self.Trait<AutoTarget>(); }
[Sync] public int Aggressor { get { return a.AggressorID; } }
}
public class DebugNextAutoTargetScanTimeInfo : ITraitInfo, Requires<AutoTargetInfo>
{
public object Create(ActorInitializer init) { return new DebugNextAutoTargetScanTime(init.self); }
}
public class DebugNextAutoTargetScanTime : ISync
{
readonly AutoTarget a;
public DebugNextAutoTargetScanTime(Actor self){ a = self.Trait<AutoTarget>(); }
[Sync] public int NextAutoTargetScanTime { get { return a.nextScanTime; } }
}
}