Particle.FindAdjacentHulls exception fix, OpenAL "invalid value" dix, radar sync, better ragdoll sync, autoupdate cancel/retry on error
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user