bot and humans hate each other, even if the host is on a team.
This commit is contained in:
@@ -38,6 +38,7 @@ namespace OpenRA
|
|||||||
public readonly bool NonCombatant = false;
|
public readonly bool NonCombatant = false;
|
||||||
public readonly int ClientIndex;
|
public readonly int ClientIndex;
|
||||||
public readonly PlayerReference PlayerRef;
|
public readonly PlayerReference PlayerRef;
|
||||||
|
public bool IsBot;
|
||||||
|
|
||||||
public ShroudRenderer Shroud;
|
public ShroudRenderer Shroud;
|
||||||
public World World { get; private set; }
|
public World World { get; private set; }
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ namespace OpenRA.Mods.RA
|
|||||||
if (Game.IsHost)
|
if (Game.IsHost)
|
||||||
foreach (var bot in player.PlayerActor.TraitsImplementing<IBot>())
|
foreach (var bot in player.PlayerActor.TraitsImplementing<IBot>())
|
||||||
bot.Activate(player);
|
bot.Activate(player);
|
||||||
|
|
||||||
|
/* a bit of a hack */
|
||||||
|
player.IsBot = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,6 +89,9 @@ namespace OpenRA.Mods.RA
|
|||||||
// Hack: All map players are neutral wrt everyone else
|
// Hack: All map players are neutral wrt everyone else
|
||||||
if (p.Index < 0 || q.Index < 0) return Stance.Neutral;
|
if (p.Index < 0 || q.Index < 0) return Stance.Neutral;
|
||||||
|
|
||||||
|
if (p.IsBot ^ q.IsBot)
|
||||||
|
return Stance.Enemy; // bots and humans hate each other
|
||||||
|
|
||||||
var pc = GetClientForPlayer(p);
|
var pc = GetClientForPlayer(p);
|
||||||
var qc = GetClientForPlayer(q);
|
var qc = GetClientForPlayer(q);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user