Route viewport centering via WorldRenderer.

This commit is contained in:
Paul Chote
2013-09-27 17:13:54 +12:00
parent b3d608092c
commit f575c20d38
21 changed files with 77 additions and 70 deletions

View File

@@ -448,10 +448,9 @@ namespace OpenRA.Mods.RA.Missions
paradropBox = new Rectangle(topLeft.Location.X, topLeft.Location.Y, bottomRight.Location.X - topLeft.Location.X, bottomRight.Location.Y - topLeft.Location.Y);
if (w.LocalPlayer == null || w.LocalPlayer == allies1)
Game.MoveViewport(allies1EntryPoint.Location.ToFloat2());
wr.Viewport.Center(allies1EntryPoint.CenterPosition);
else
Game.MoveViewport(allies2EntryPoint.Location.ToFloat2());
wr.Viewport.Center(allies2EntryPoint.CenterPosition);
OnObjectivesUpdated(false);
MissionUtils.PlayMissionMusic();