@@ -22,6 +22,7 @@ NEW:
|
|||||||
Removed the ability of commandos to plant C4 on walls.
|
Removed the ability of commandos to plant C4 on walls.
|
||||||
Order lines are now shown on unit selection.
|
Order lines are now shown on unit selection.
|
||||||
Fixed chat synchronization in replays.
|
Fixed chat synchronization in replays.
|
||||||
|
Added a combined shroud view of every player to the replay viewer and spectator mode.
|
||||||
Fixed the game sometimes crashing when deploying and activating the guard cursor at the same time.
|
Fixed the game sometimes crashing when deploying and activating the guard cursor at the same time.
|
||||||
Build time is now set when an item reaches the front of a queue, instead of immediately when queued.
|
Build time is now set when an item reaches the front of a queue, instead of immediately when queued.
|
||||||
The attack cursor now changes if the target is out of range.
|
The attack cursor now changes if the target is out of range.
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace OpenRA.FileFormats
|
|||||||
public bool OwnsWorld = false;
|
public bool OwnsWorld = false;
|
||||||
public bool NonCombatant = false;
|
public bool NonCombatant = false;
|
||||||
public bool Playable = false;
|
public bool Playable = false;
|
||||||
|
public bool Spectating = false;
|
||||||
public string Bot = null;
|
public string Bot = null;
|
||||||
public string StartingUnitsClass = null;
|
public string StartingUnitsClass = null;
|
||||||
public bool AllowBots = true;
|
public bool AllowBots = true;
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ namespace OpenRA
|
|||||||
public readonly string InternalName;
|
public readonly string InternalName;
|
||||||
public readonly CountryInfo Country;
|
public readonly CountryInfo Country;
|
||||||
public readonly bool NonCombatant = false;
|
public readonly bool NonCombatant = false;
|
||||||
|
public readonly bool Spectating = false;
|
||||||
|
public readonly bool Playable = true;
|
||||||
public readonly int ClientIndex;
|
public readonly int ClientIndex;
|
||||||
public readonly PlayerReference PlayerReference;
|
public readonly PlayerReference PlayerReference;
|
||||||
public bool IsBot;
|
public bool IsBot;
|
||||||
@@ -70,6 +72,8 @@ namespace OpenRA
|
|||||||
Color = pr.Color;
|
Color = pr.Color;
|
||||||
PlayerName = pr.Name;
|
PlayerName = pr.Name;
|
||||||
NonCombatant = pr.NonCombatant;
|
NonCombatant = pr.NonCombatant;
|
||||||
|
Playable = pr.Playable;
|
||||||
|
Spectating = pr.Spectating;
|
||||||
botType = pr.Bot;
|
botType = pr.Bot;
|
||||||
Country = ChooseCountry(world, pr.Race);
|
Country = ChooseCountry(world, pr.Race);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,13 +36,13 @@ namespace OpenRA.Mods.RA
|
|||||||
if (self.Owner.WinState != WinState.Undefined || self.Owner.NonCombatant) return;
|
if (self.Owner.WinState != WinState.Undefined || self.Owner.NonCombatant) return;
|
||||||
|
|
||||||
var hasAnything = self.World.ActorsWithTrait<MustBeDestroyed>()
|
var hasAnything = self.World.ActorsWithTrait<MustBeDestroyed>()
|
||||||
.Any( a => a.Actor.Owner == self.Owner );
|
.Any(a => a.Actor.Owner == self.Owner);
|
||||||
|
|
||||||
if (!hasAnything && !self.Owner.NonCombatant)
|
if (!hasAnything && !self.Owner.NonCombatant)
|
||||||
Lose(self);
|
Lose(self);
|
||||||
|
|
||||||
var others = self.World.Players.Where( p => !p.NonCombatant
|
var others = self.World.Players.Where(p => !p.NonCombatant
|
||||||
&& p != self.Owner && p.Stances[self.Owner] != Stance.Ally );
|
&& p != self.Owner && p.Stances[self.Owner] != Stance.Ally);
|
||||||
|
|
||||||
if (!others.Any()) return;
|
if (!others.Any()) return;
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using OpenRA.FileFormats;
|
||||||
using OpenRA.Network;
|
using OpenRA.Network;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -43,6 +44,15 @@ namespace OpenRA.Mods.RA
|
|||||||
w.SetLocalPlayer(player.InternalName);
|
w.SetLocalPlayer(player.InternalName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create a player that is allied with everyone for shared observer shroud
|
||||||
|
w.AddPlayer(new Player(w, null, null, new PlayerReference
|
||||||
|
{
|
||||||
|
Name = "Everyone",
|
||||||
|
NonCombatant = true,
|
||||||
|
Spectating = true,
|
||||||
|
Allies = w.Players.Where(p => !p.NonCombatant && p.Playable).Select(p => p.InternalName).ToArray()
|
||||||
|
}));
|
||||||
|
|
||||||
foreach (var p in w.Players)
|
foreach (var p in w.Players)
|
||||||
foreach (var q in w.Players)
|
foreach (var q in w.Players)
|
||||||
if (!p.Stances.ContainsKey(q))
|
if (!p.Stances.ContainsKey(q))
|
||||||
@@ -51,7 +61,11 @@ namespace OpenRA.Mods.RA
|
|||||||
|
|
||||||
static Stance ChooseInitialStance(Player p, Player q)
|
static Stance ChooseInitialStance(Player p, Player q)
|
||||||
{
|
{
|
||||||
if (p == q) return Stance.Ally;
|
if (p == q)
|
||||||
|
return Stance.Ally;
|
||||||
|
|
||||||
|
if (q.Spectating && !p.NonCombatant && p.Playable)
|
||||||
|
return Stance.Ally;
|
||||||
|
|
||||||
// Stances set via PlayerReference
|
// Stances set via PlayerReference
|
||||||
if (p.PlayerReference.Allies.Contains(q.InternalName))
|
if (p.PlayerReference.Allies.Contains(q.InternalName))
|
||||||
|
|||||||
@@ -32,17 +32,18 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
static string LabelForPlayer(Player p)
|
static string LabelForPlayer(Player p)
|
||||||
{
|
{
|
||||||
return p != null ? "{0}'s view".F(p.PlayerName) : "World view";
|
return p != null ? p.PlayerName == "Everyone" ? "Combined view" : "{0}'s view".F(p.PlayerName) : "World view";
|
||||||
}
|
}
|
||||||
|
|
||||||
[ObjectCreator.UseCtor]
|
[ObjectCreator.UseCtor]
|
||||||
public ObserverShroudSelectorLogic(Widget widget, World world)
|
public ObserverShroudSelectorLogic(Widget widget, World world)
|
||||||
{
|
{
|
||||||
var views = world.Players.Where(p => !p.NonCombatant).Concat(new[] { (Player)null }).Select(
|
var views = world.Players.Where(p => (p.NonCombatant && p.Spectating)
|
||||||
p => new CameraOption(LabelForPlayer(p),
|
|| !p.NonCombatant).Concat(new[] { (Player)null }).Select(
|
||||||
() => world.RenderPlayer == p,
|
p => new CameraOption(LabelForPlayer(p),
|
||||||
() => world.RenderPlayer = p
|
() => world.RenderPlayer == p,
|
||||||
)).ToArray();
|
() => world.RenderPlayer = p
|
||||||
|
)).ToArray();
|
||||||
|
|
||||||
var shroudSelector = widget.Get<DropDownButtonWidget>("SHROUD_SELECTOR");
|
var shroudSelector = widget.Get<DropDownButtonWidget>("SHROUD_SELECTOR");
|
||||||
shroudSelector.GetText = () => LabelForPlayer(world.RenderPlayer);
|
shroudSelector.GetText = () => LabelForPlayer(world.RenderPlayer);
|
||||||
|
|||||||
Reference in New Issue
Block a user