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