Use map-defined stances

This commit is contained in:
Paul Chote
2010-08-15 19:45:34 +12:00
parent d43781c604
commit 02a7b092dc
6 changed files with 40 additions and 20 deletions

View File

@@ -18,21 +18,12 @@ namespace OpenRA.Mods.RA
class DefaultShellmapScript: ILoadWorldHook, ITick
{
Player goodguy;
Player greece;
Dictionary<string, Actor> MapActors;
public void WorldLoaded(World w)
{
Game.MoveViewport((.5f * (w.Map.TopLeft + w.Map.BottomRight).ToFloat2()).ToInt2());
// Sound.PlayMusic("hell226m.aud");
goodguy = w.players.Values.Where(x => x.InternalName == "GoodGuy").FirstOrDefault();
greece = w.players.Values.Where(x => x.InternalName == "Greece").FirstOrDefault();
MapActors = w.WorldActor.Trait<SpawnMapActors>().MapActors;
goodguy.Stances[greece] = Stance.Enemy;
greece.Stances[goodguy] = Stance.Enemy;
}
int ticks = 0;