Made game compilable

Networking functionality is fully disabled now.

I think it's time to start rewriting everything. OH BOY
This commit is contained in:
juanjp600
2016-08-30 21:13:36 -03:00
parent 4157e5aab2
commit 7bdcc51bae
11 changed files with 80 additions and 291 deletions

View File

@@ -323,8 +323,8 @@ namespace Barotrauma.Networking
updateTimer = DateTime.Now + updateInterval;
}
private CoroutineHandle startGameCoroutine;
private CoroutineHandle startGameCoroutine;
/// <summary>
/// Check for new incoming messages from server
/// </summary>
@@ -333,8 +333,8 @@ namespace Barotrauma.Networking
// Create new incoming message holder
NetIncomingMessage inc;
if (startGameCoroutine != null && CoroutineManager.IsCoroutineRunning(startGameCoroutine)) return;
if (startGameCoroutine != null && CoroutineManager.IsCoroutineRunning(startGameCoroutine)) return;
while ((inc = client.ReadMessage()) != null)
{
//TODO: read message data
@@ -469,29 +469,6 @@ namespace Barotrauma.Networking
{
base.Draw(spriteBatch);
if (fileStreamReceiver != null &&
(fileStreamReceiver.Status == FileTransferStatus.Receiving || fileStreamReceiver.Status == FileTransferStatus.NotStarted))
{
Vector2 pos = new Vector2(GameMain.GraphicsWidth / 2 - 130, GameMain.NetLobbyScreen.InfoFrame.Rect.Y / 2 - 15);
GUI.DrawString(spriteBatch,
pos,
"Downloading " + fileStreamReceiver.FileName,
Color.White, null, 0, GUI.SmallFont);
GUI.DrawProgressBar(spriteBatch, new Vector2(pos.X, -pos.Y - 12), new Vector2(200, 15), fileStreamReceiver.Progress, Color.Green);
GUI.DrawString(spriteBatch, pos + new Vector2(5,12),
MathUtils.GetBytesReadable((long)fileStreamReceiver.Received) + " / " + MathUtils.GetBytesReadable((long)fileStreamReceiver.FileSize),
Color.White, null, 0, GUI.SmallFont);
if (GUI.DrawButton(spriteBatch, new Rectangle((int)pos.X + 210, (int)pos.Y+12, 65, 15), "Cancel", new Color(0.47f, 0.13f, 0.15f, 0.08f)))
{
CancelFileTransfer();
}
}
if (!GameMain.DebugDraw) return;
int width = 200, height = 300;