Fix #897.
This commit is contained in:
@@ -61,7 +61,7 @@ namespace OpenRA
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Map player
|
// Map player
|
||||||
ClientIndex = 0; /* it's a map player, "owned" by host */
|
ClientIndex = 0; // Owned by the host (todo: fix this)
|
||||||
ColorRamp = pr.ColorRamp;
|
ColorRamp = pr.ColorRamp;
|
||||||
PlayerName = pr.Name;
|
PlayerName = pr.Name;
|
||||||
NonCombatant = pr.NonCombatant;
|
NonCombatant = pr.NonCombatant;
|
||||||
|
|||||||
@@ -60,12 +60,17 @@ namespace OpenRA.Mods.RA
|
|||||||
if (p.PlayerReference.Enemies.Contains(q.InternalName))
|
if (p.PlayerReference.Enemies.Contains(q.InternalName))
|
||||||
return Stance.Enemy;
|
return Stance.Enemy;
|
||||||
|
|
||||||
|
// Hack: Map players share a ClientID with the host, so would
|
||||||
|
// otherwise take the host's team stance instead of being neutral
|
||||||
|
if (p.PlayerReference.Playable && q.PlayerReference.Playable)
|
||||||
|
{
|
||||||
// Stances set via lobby teams
|
// Stances set via lobby teams
|
||||||
var pc = GetClientForPlayer(p);
|
var pc = GetClientForPlayer(p);
|
||||||
var qc = GetClientForPlayer(q);
|
var qc = GetClientForPlayer(q);
|
||||||
if (pc != null && qc != null)
|
if (pc != null && qc != null)
|
||||||
return pc.Team != 0 && pc.Team == qc.Team
|
return pc.Team != 0 && pc.Team == qc.Team
|
||||||
? Stance.Ally : Stance.Enemy;
|
? Stance.Ally : Stance.Enemy;
|
||||||
|
}
|
||||||
|
|
||||||
// Otherwise, default to neutral
|
// Otherwise, default to neutral
|
||||||
return Stance.Neutral;
|
return Stance.Neutral;
|
||||||
|
|||||||
Reference in New Issue
Block a user