Added int2.Clamp(Rectangle). All queries for map geometry use map.Bounds.

This commit is contained in:
Paul Chote
2010-11-24 12:24:48 +13:00
parent 1dfe437641
commit fc5830a687
14 changed files with 63 additions and 52 deletions

View File

@@ -35,7 +35,8 @@ namespace OpenRA.Mods.Cnc
Map = w.Map;
Players = w.players.Values.ToDictionary(p => p.InternalName);
Actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
Game.MoveViewport((.5f * (w.Map.TopLeft + w.Map.BottomRight).ToFloat2()).ToInt2());
var b = w.Map.Bounds;
Game.MoveViewport(new int2(b.Left + b.Width/2, b.Top + b.Height/2));
Scripting.Media.PlayFMVFullscreen(w, "gdi1.vqa",
() => Scripting.Media.PlayFMVFullscreen(w, "landing.vqa", () =>