fixing crap perf while viewing the lobby.
This commit is contained in:
@@ -148,12 +148,6 @@ namespace OpenRa
|
||||
{
|
||||
DrawDownloadBar();
|
||||
|
||||
if (!Game.orderManager.GameStarted)
|
||||
{
|
||||
DrawLobby();
|
||||
return;
|
||||
}
|
||||
|
||||
chromeCollection = (Game.LocalPlayer.Race == Race.Allies) ? "chrome-allies" : "chrome-soviet";
|
||||
radarCollection = (Game.LocalPlayer.Race == Race.Allies) ? "radar-allies" : "radar-soviet";
|
||||
paletteCollection = (Game.LocalPlayer.Race == Race.Allies) ? "palette-allies" : "palette-soviet";
|
||||
@@ -218,6 +212,8 @@ namespace OpenRa
|
||||
|
||||
public void DrawLobby()
|
||||
{
|
||||
DrawDownloadBar();
|
||||
|
||||
var w = 800;
|
||||
var h = 600;
|
||||
var r = new Rectangle( (Game.viewport.Width - w) / 2, (Game.viewport.Height - h) / 2, w, h );
|
||||
|
||||
@@ -48,8 +48,15 @@ namespace OpenRa.Graphics
|
||||
|
||||
renderer.BeginFrame(r1, r2, scrollPosition);
|
||||
|
||||
Game.world.WorldRenderer.Draw();
|
||||
Game.chrome.Draw();
|
||||
if( Game.orderManager.GameStarted )
|
||||
{
|
||||
Game.world.WorldRenderer.Draw();
|
||||
Game.chrome.Draw();
|
||||
}
|
||||
else
|
||||
{
|
||||
Game.chrome.DrawLobby();
|
||||
}
|
||||
|
||||
var c = Game.chrome.HitTest(mousePos) ? Cursor.Default : Game.controller.ChooseCursor();
|
||||
cursorRenderer.DrawSprite(c.GetSprite((int)cursorFrame), mousePos + Location - c.GetHotspot(), 0);
|
||||
|
||||
Reference in New Issue
Block a user