world.NeutralPlayer has been defeated

This commit is contained in:
Paul Chote
2010-05-23 20:26:30 +12:00
parent bbbd65a6eb
commit a6f5b12a55
13 changed files with 20 additions and 17 deletions

View File

@@ -29,7 +29,6 @@ namespace OpenRA.Widgets.Delegates
bg.Children.RemoveAll(w => controls.Contains(w));
controls.Clear();
var unwantedPlayers = new[] { Game.world.NeutralPlayer, Game.world.LocalPlayer };
var y = 50;
var margin = 20;
var labelWidth = (bg.Bounds.Width - 3 * margin) / 3;
@@ -58,7 +57,7 @@ namespace OpenRA.Widgets.Delegates
y += 35;
foreach (var p in Game.world.players.Values.Except(unwantedPlayers))
foreach (var p in Game.world.players.Values.Where(a => a != Game.world.LocalPlayer && !a.isSpecial))
{
var pp = p;
var label = new LabelWidget

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Widgets
if (world.players.Count > 2) /* more than just us + neutral */
{
var conds = world.Queries.WithTrait<IVictoryConditions>()
.Where(c => c.Actor.Owner != world.NeutralPlayer);
.Where(c => !c.Actor.Owner.isSpecial);
if (conds.Any(c => c.Actor.Owner == world.LocalPlayer && c.Trait.HasLost))
DrawText("YOU ARE DEFEATED");

View File

@@ -48,7 +48,7 @@ namespace OpenRA.Widgets
? actor.Info.Traits.Get<ValuedInfo>().Description
: actor.Info.Name;
var text2 = (actor.Owner == world.LocalPlayer)
? "" : (actor.Owner == world.NeutralPlayer ? "{0}" : "{0} ({1})").F(actor.Owner.PlayerName, world.LocalPlayer.Stances[actor.Owner]);
? "" : (actor.Owner.isSpecial ? "{0}" : "{0} ({1})").F(actor.Owner.PlayerName, world.LocalPlayer.Stances[actor.Owner]);
var renderer = Game.chrome.renderer;