Merge pull request #7269 from abcdefg30/general-polish
Some general polish
This commit is contained in:
@@ -147,8 +147,8 @@ namespace OpenRA.Graphics
|
||||
var bounds = actor.Bounds;
|
||||
bounds.Offset(screenPos.X, screenPos.Y);
|
||||
|
||||
var start = new float2(bounds.Left, bounds.Top);
|
||||
var end = new float2(bounds.Right, bounds.Top);
|
||||
var start = new float2(bounds.Left + 1, bounds.Top);
|
||||
var end = new float2(bounds.Right - 1, bounds.Top);
|
||||
|
||||
DrawHealthBar(wr, health, start, end);
|
||||
DrawExtraBars(wr, start, end);
|
||||
|
||||
@@ -150,8 +150,9 @@ namespace OpenRA.Traits
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var a in currentActors)
|
||||
onActorExited(a);
|
||||
if (onActorExited != null)
|
||||
foreach (var a in currentActors)
|
||||
onActorExited(a);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -572,6 +572,9 @@ namespace OpenRA.Mods.Common.Server
|
||||
{ "difficulty",
|
||||
s =>
|
||||
{
|
||||
if (!server.Map.Options.Difficulties.Any())
|
||||
return true;
|
||||
|
||||
if (!client.IsAdmin)
|
||||
{
|
||||
server.SendOrderTo(conn, "Message", "Only the host can set that option.");
|
||||
|
||||
@@ -387,23 +387,28 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
try
|
||||
{
|
||||
var parts = s.Value.Split(',');
|
||||
var loc = Exts.ParseIntegerInvariant(parts[3]);
|
||||
if (parts[0] == "")
|
||||
parts[0] = "Neutral";
|
||||
|
||||
if (!players.Contains(parts[0]))
|
||||
players.Add(parts[0]);
|
||||
|
||||
var loc = Exts.ParseIntegerInvariant(parts[3]);
|
||||
var health = float.Parse(parts[2], NumberFormatInfo.InvariantInfo) / 256;
|
||||
var facing = (section == "INFANTRY") ? Exts.ParseIntegerInvariant(parts[6]) : Exts.ParseIntegerInvariant(parts[4]);
|
||||
|
||||
var actor = new ActorReference(parts[1].ToLowerInvariant())
|
||||
{
|
||||
new LocationInit(new CPos(loc % mapSize, loc / mapSize)),
|
||||
new OwnerInit(parts[0]),
|
||||
new HealthInit(float.Parse(parts[2], NumberFormatInfo.InvariantInfo) / 256),
|
||||
new FacingInit((section == "INFANTRY")
|
||||
? Exts.ParseIntegerInvariant(parts[6])
|
||||
: Exts.ParseIntegerInvariant(parts[4])),
|
||||
};
|
||||
|
||||
var initDict = actor.InitDict;
|
||||
if (health != 1)
|
||||
initDict.Add(new HealthInit(health));
|
||||
if (facing != 0)
|
||||
initDict.Add(new FacingInit(facing));
|
||||
|
||||
if (section == "INFANTRY")
|
||||
actor.Add(new SubCellInit(Exts.ParseIntegerInvariant(parts[4])));
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
disconnectButton.OnClick = () => { CloseWindow(); onExit(); };
|
||||
|
||||
if (skirmishMode)
|
||||
disconnectButton.Text = "Cancel";
|
||||
disconnectButton.Text = "Back";
|
||||
|
||||
chatLabel = lobby.Get<LabelWidget>("LABEL_CHATTYPE");
|
||||
var chatTextField = lobby.Get<TextFieldWidget>("CHAT_TEXTFIELD");
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
menuType = MenuType.None;
|
||||
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs
|
||||
{
|
||||
{ "onExit", () => { Game.Disconnect(); menuType = MenuType.Main; } },
|
||||
{ "onExit", () => { Game.Disconnect(); menuType = MenuType.Singleplayer; } },
|
||||
{ "onStart", RemoveShellmapUI },
|
||||
{ "skirmishMode", true }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user