remove path debug; convert all other chat abuses to Game.Debug()
This commit is contained in:
@@ -132,7 +132,7 @@ namespace OpenRA
|
|||||||
Timer.Time( "chrome: {0}" );
|
Timer.Time( "chrome: {0}" );
|
||||||
|
|
||||||
Timer.Time( "----end ChangeMap" );
|
Timer.Time( "----end ChangeMap" );
|
||||||
chat.AddLine(Color.White, "Debug", "Map change {0} -> {1}".F(Game.mapName, mapName));
|
Debug("Map change {0} -> {1}".F(Game.mapName, mapName));
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void Initialize(string mapName, Renderer renderer, int2 clientSize, int localPlayer, Controller controller)
|
internal static void Initialize(string mapName, Renderer renderer, int2 clientSize, int localPlayer, Controller controller)
|
||||||
@@ -272,8 +272,7 @@ namespace OpenRA
|
|||||||
&& !Game.orderManager.GameStarted)
|
&& !Game.orderManager.GameStarted)
|
||||||
{
|
{
|
||||||
Game.orderManager.FramesAhead = LobbyInfo.GlobalSettings.OrderLatency;
|
Game.orderManager.FramesAhead = LobbyInfo.GlobalSettings.OrderLatency;
|
||||||
Game.chat.AddLine(Color.White, "Server",
|
Debug("Order lag is now {0} frames.".F(LobbyInfo.GlobalSettings.OrderLatency));
|
||||||
"Order lag is now {0} frames.".F(LobbyInfo.GlobalSettings.OrderLatency));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PackageDownloader.SetPackageList(LobbyInfo.GlobalSettings.Packages)
|
if (PackageDownloader.SetPackageList(LobbyInfo.GlobalSettings.Packages)
|
||||||
@@ -283,7 +282,7 @@ namespace OpenRA
|
|||||||
if (string.Join(",", oldLobbyInfo.GlobalSettings.Mods)
|
if (string.Join(",", oldLobbyInfo.GlobalSettings.Mods)
|
||||||
!= string.Join(",", LobbyInfo.GlobalSettings.Mods))
|
!= string.Join(",", LobbyInfo.GlobalSettings.Mods))
|
||||||
{
|
{
|
||||||
chat.AddLine(Color.White, "Debug", "Mods list changed, reloading.");
|
Debug("Mods list changed, reloading: {0}".F(string.Join(",", LobbyInfo.GlobalSettings.Mods)));
|
||||||
changePending = true;
|
changePending = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -473,14 +472,8 @@ namespace OpenRA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Exit()
|
public static void Exit() { quit = true; }
|
||||||
{
|
|
||||||
quit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Debug(string s)
|
public static void Debug(string s) { chat.AddLine(Color.White, "Debug", s); }
|
||||||
{
|
|
||||||
chat.AddLine(Color.White, "Debug", s);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
content = new MemoryStream();
|
content = new MemoryStream();
|
||||||
|
|
||||||
Game.chat.AddLine(Color.White, "Debug", "Requesting package: {0}".F(currentPackage));
|
Game.Debug("Requesting package: {0}".F(currentPackage));
|
||||||
|
|
||||||
Game.IssueOrder(
|
Game.IssueOrder(
|
||||||
new Order("RequestFile", null, currentPackage) { IsImmediate = true });
|
new Order("RequestFile", null, currentPackage) { IsImmediate = true });
|
||||||
@@ -102,7 +102,7 @@ namespace OpenRA
|
|||||||
if (CalculateSHA1(parts[0]) != parts[1])
|
if (CalculateSHA1(parts[0]) != parts[1])
|
||||||
throw new InvalidOperationException("Broken download");
|
throw new InvalidOperationException("Broken download");
|
||||||
|
|
||||||
Game.chat.AddLine(Color.White, "Debug", "Finished receiving package: {0}".F(currentPackage));
|
Game.Debug("Finished receiving package: {0}".F(currentPackage));
|
||||||
|
|
||||||
currentPackage = null;
|
currentPackage = null;
|
||||||
|
|
||||||
@@ -120,17 +120,17 @@ namespace OpenRA
|
|||||||
var parts = p.Split(':');
|
var parts = p.Split(':');
|
||||||
if (!File.Exists(parts[0]))
|
if (!File.Exists(parts[0]))
|
||||||
{
|
{
|
||||||
Game.chat.AddLine(Color.White, "Debug", "Missing package: {0}".F(p));
|
Game.Debug("Missing package: {0}".F(p));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CalculateSHA1(parts[0]) != parts[1])
|
if (CalculateSHA1(parts[0]) != parts[1])
|
||||||
{
|
{
|
||||||
Game.chat.AddLine(Color.White, "Debug", "Bad SHA1 for package; redownloading: {0}".F(p));
|
Game.Debug("Bad SHA1 for package; redownloading: {0}".F(p));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Game.chat.AddLine(Color.White, "Debug", "Verified package: {0}".F(p));
|
Game.Debug("Verified package: {0}".F(p));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ namespace OpenRA
|
|||||||
return new List<int2>(cached.result);
|
return new List<int2>(cached.result);
|
||||||
}
|
}
|
||||||
|
|
||||||
Game.Debug("FindUnitPath {0} -> {1}".F(from, target));
|
|
||||||
|
|
||||||
var pb = FindBidiPath(
|
var pb = FindBidiPath(
|
||||||
PathSearch.FromPoint(world, target, from, umt, false).WithCustomBlocker(AvoidUnitsNear(from, 4)),
|
PathSearch.FromPoint(world, target, from, umt, false).WithCustomBlocker(AvoidUnitsNear(from, 4)),
|
||||||
PathSearch.FromPoint(world, from, target, umt, false).WithCustomBlocker(AvoidUnitsNear(from, 4)));
|
PathSearch.FromPoint(world, from, target, umt, false).WithCustomBlocker(AvoidUnitsNear(from, 4)));
|
||||||
@@ -85,7 +83,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
public List<int2> FindUnitPathToRange( int2 src, int2 target, UnitMovementType umt, int range )
|
public List<int2> FindUnitPathToRange( int2 src, int2 target, UnitMovementType umt, int range )
|
||||||
{
|
{
|
||||||
//using( new PerfSample( "find_unit_path_multiple_src" ) )
|
using( new PerfSample( "find_unit_path_multiple_src" ) )
|
||||||
{
|
{
|
||||||
var tilesInRange = world.FindTilesInCircle(target, range)
|
var tilesInRange = world.FindTilesInCircle(target, range)
|
||||||
.Where( t => world.IsPathableCell( t, umt ) );
|
.Where( t => world.IsPathableCell( t, umt ) );
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace OpenRA.Traits.AI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Game.chat.AddLine(Color.White, "Debug", "Plane has nowhere to land; flying away");
|
Game.Debug("Plane has nowhere to land; flying away");
|
||||||
self.QueueActivity(new FlyOffMap());
|
self.QueueActivity(new FlyOffMap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user