Particle.FindAdjacentHulls exception fix, OpenAL "invalid value" dix, radar sync, better ragdoll sync, autoupdate cancel/retry on error

This commit is contained in:
Regalis
2015-10-08 21:48:04 +03:00
parent db7128a475
commit 709d4efde9
30 changed files with 354 additions and 219 deletions
@@ -77,7 +77,11 @@ namespace Subsurface.Items.Components
if (voltage < minVoltage) return;
if (GUI.DrawButton(spriteBatch, new Rectangle(x+20, y+20, 200, 30), "Activate Radar")) IsActive = !IsActive;
if (GUI.DrawButton(spriteBatch, new Rectangle(x + 20, y + 20, 200, 30), "Activate Radar"))
{
IsActive = !IsActive;
item.NewComponentEvent(this, true);
}
int radius = GuiFrame.Rect.Height / 2 - 10;
DrawRadar(spriteBatch, new Rectangle((int)GuiFrame.Center.X - radius, (int)GuiFrame.Center.Y - radius, radius * 2, radius * 2));
@@ -217,5 +221,22 @@ namespace Subsurface.Items.Components
spriteBatch.DrawString(GUI.SmallFont, (int)(dist / 80.0f) + " m", new Vector2(markerPos.X + 10, markerPos.Y + 15), Color.LightGreen);
}
public override void FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetOutgoingMessage message)
{
message.Write(IsActive);
}
public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetIncomingMessage message)
{
try
{
IsActive = message.ReadBoolean();
}
catch
{
return;
}
}
}
}
@@ -163,7 +163,7 @@ namespace Subsurface.Items.Components
if (autopilotRayCastTimer<=0.0f && steeringPath.NextNode != null)
{
Vector2 diff = steeringPath.NextNode.Position - Submarine.Loaded.Position;
Vector2 diff = ConvertUnits.ToSimUnits(steeringPath.NextNode.Position - Submarine.Loaded.Position);
bool nextVisible = true;
for (int x = -1; x < 2; x += 2)