fixed railgun, fixed repairtools radar ping & improved rendering, waypoint bugfixes, inventory bugfixes, syncing wires between clients

This commit is contained in:
Regalis
2015-07-15 23:34:13 +03:00
parent 44b9a63c94
commit 237df18765
39 changed files with 461 additions and 405 deletions

View File

@@ -132,7 +132,8 @@ namespace Subsurface.Networking
{
// All manually sent messages are type of "Data"
case NetIncomingMessageType.Data:
if (inc.ReadByte() == (byte)PacketTypes.LoggedIn)
byte packetType = inc.ReadByte();
if (packetType == (byte)PacketTypes.LoggedIn)
{
myID = inc.ReadInt32();
@@ -152,7 +153,7 @@ namespace Subsurface.Networking
CanStart = true;
}
else if (inc.ReadByte() == (byte)PacketTypes.KickedOut)
else if (packetType == (byte)PacketTypes.KickedOut)
{
string msg = inc.ReadString();
DebugConsole.ThrowError(msg);
@@ -199,6 +200,7 @@ namespace Subsurface.Networking
SendRandomData();
}
if (gameStarted) inGameHUD.Update((float)Physics.step);
if (!connected || updateTimer > DateTime.Now) return;