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
+11 -2
View File
@@ -741,7 +741,7 @@ namespace Subsurface
public virtual void Update(Camera cam, float deltaTime)
{
AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f);
//AnimController.SimplePhysicsEnabled = (Character.controlled!=this && Vector2.Distance(cam.WorldViewCenter, Position)>5000.0f);
if (isDead) return;
@@ -839,6 +839,11 @@ namespace Subsurface
}
}
if (GameMain.DebugDraw)
{
AnimController.DebugDraw(spriteBatch);
}
Vector2 healthBarPos = new Vector2(Position.X - 50, -Position.Y - 50.0f);
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X - 2, (int)healthBarPos.Y - 2, 100 + 4, 15 + 4), Color.Black, false);
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f * (health / maxHealth)), 15), Color.Red, true);
@@ -1100,7 +1105,7 @@ namespace Subsurface
message.WriteRangedSingle(MathHelper.Clamp(AnimController.StunTimer,0.0f,60.0f), 0.0f, 60.0f, 8);
message.Write((byte)((health/maxHealth)*255.0f));
LargeUpdateTimer = 10;
LargeUpdateTimer = 50;
}
else
{
@@ -1115,6 +1120,8 @@ namespace Subsurface
{
if (type == NetworkEventType.PickItem)
{
System.Diagnostics.Debug.WriteLine("**************** PickItem networkevent received");
int itemId = -1;
try
@@ -1126,6 +1133,8 @@ namespace Subsurface
return;
}
System.Diagnostics.Debug.WriteLine("item id: "+itemId);
Item item = FindEntityByID(itemId) as Item;
if (item != null)
{