Launcher bugfixes, fixed submarine position syncing, previewing the sub after round ends, wiring bugfix, slower reactor overheat, itemlabel, wifi components

This commit is contained in:
Regalis
2015-08-21 20:21:22 +03:00
parent c044d27071
commit d8904eaa56
43 changed files with 546 additions and 228 deletions

View File

@@ -50,7 +50,7 @@ namespace Subsurface
private string name;
private double lastNetworkUpdate;
private float lastNetworkUpdate;
//properties ----------------------------------------------------
@@ -564,7 +564,7 @@ namespace Subsurface
public override void FillNetworkData(Networking.NetworkEventType type, NetOutgoingMessage message, object data)
{
message.Write(NetTime.Now);
message.Write((float)NetTime.Now);
message.Write(Position.X);
message.Write(Position.Y);
@@ -575,11 +575,11 @@ namespace Subsurface
public override void ReadNetworkData(Networking.NetworkEventType type, NetIncomingMessage message)
{
double sendingTime;
float sendingTime;
Vector2 newTargetPosition, newSpeed;
try
{
sendingTime = message.ReadDouble();
sendingTime = message.ReadFloat();
if (sendingTime <= lastNetworkUpdate) return;
@@ -595,7 +595,7 @@ namespace Subsurface
return;
}
if (!speed.IsValid() || targetPosition.IsValid()) return;
if (!newSpeed.IsValid() || !newTargetPosition.IsValid()) return;
//newTargetPosition = newTargetPosition + newSpeed * (float)(NetTime.Now - sendingTime);