Networking bugfixes, underwater scooter, fixed limbs going through walls when flipping the ragdoll
This commit is contained in:
@@ -160,15 +160,7 @@ namespace Barotrauma.Particles
|
||||
|
||||
if ((prefab.DeleteOnCollision || prefab.CollidesWithWalls) && currentHull!=null)
|
||||
{
|
||||
Vector2 edgePos = position + prefab.Sprites[spriteIndex].SourceRect.Width * Vector2.Normalize(velocity) * size.X;
|
||||
//bool insideHull = false;
|
||||
//foreach (Hull hull in hullLimits)
|
||||
//{
|
||||
// if (!Submarine.RectContains(hull.Rect, edgePos)) continue;
|
||||
|
||||
// insideHull = true;
|
||||
// break;
|
||||
//}
|
||||
Vector2 edgePos = position + prefab.CollisionRadius * Vector2.Normalize(velocity) * size.X;
|
||||
|
||||
if (!Submarine.RectContains(currentHull.Rect, edgePos))
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace Barotrauma.Particles
|
||||
|
||||
public readonly float GrowTime;
|
||||
|
||||
public readonly float CollisionRadius;
|
||||
public readonly bool DeleteOnCollision;
|
||||
public readonly bool CollidesWithWalls;
|
||||
|
||||
@@ -122,7 +123,9 @@ namespace Barotrauma.Particles
|
||||
StartAlpha = ToolBox.GetAttributeFloat(element, "startalpha", 1.0f);
|
||||
|
||||
DeleteOnCollision = ToolBox.GetAttributeBool(element, "deleteoncollision", false);
|
||||
CollidesWithWalls = ToolBox.GetAttributeBool(element, "collideswithwalls", false);
|
||||
CollidesWithWalls = ToolBox.GetAttributeBool(element, "collideswithwalls", false);
|
||||
|
||||
CollisionRadius = ToolBox.GetAttributeFloat(element, "collisionradius", Sprites[0].SourceRect.Width/2.0f);
|
||||
|
||||
ColorChange = ToolBox.GetAttributeVector4(element, "colorchange", Vector4.Zero);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user