stairs fix, wraptext fix, moved drawing sprites from GUIFrame to GUIComponent, server name and "welcome text" in netlobby
This commit is contained in:
@@ -48,7 +48,8 @@ namespace Subsurface
|
||||
}
|
||||
break;
|
||||
case Physics.CollisionPlatform:
|
||||
if (IgnorePlatforms || stairs != null) return -1;
|
||||
Structure platform = fixture.Body.UserData as Structure;
|
||||
if (IgnorePlatforms || LowestLimb.Position.Y < platform.Rect.Y) return -1;
|
||||
break;
|
||||
case Physics.CollisionWall:
|
||||
break;
|
||||
@@ -353,7 +354,7 @@ namespace Subsurface
|
||||
|
||||
Limb head = GetLimb(LimbType.Head);
|
||||
|
||||
if (currentHull != null && currentHull.Volume < currentHull.FullVolume && !head.inWater)
|
||||
if (currentHull != null && (currentHull.Rect.Y - currentHull.Surface > 50.0f) && !head.inWater)
|
||||
{
|
||||
surfaceLimiter = (ConvertUnits.ToDisplayUnits(head.SimPosition.Y)-surfaceY);
|
||||
surfaceLimiter = Math.Max(1.0f, surfaceLimiter);
|
||||
@@ -399,7 +400,7 @@ namespace Subsurface
|
||||
movement = MathUtils.SmoothStep(movement, TargetMovement, 0.3f);
|
||||
|
||||
//dont try to move upwards if head is already out of water
|
||||
if (surfaceLimiter > 1.0f)
|
||||
if (surfaceLimiter > 1.0f && TargetMovement.Y > 0.0f)
|
||||
{
|
||||
if (TargetMovement.X == 0.0f)
|
||||
{
|
||||
|
||||
@@ -74,6 +74,11 @@ namespace Subsurface
|
||||
get { return doesFlip; }
|
||||
}
|
||||
|
||||
public Vector2 Position
|
||||
{
|
||||
get { return ConvertUnits.ToDisplayUnits(body.Position); }
|
||||
}
|
||||
|
||||
public Vector2 SimPosition
|
||||
{
|
||||
get { return body.Position; }
|
||||
|
||||
@@ -268,11 +268,17 @@ namespace Subsurface
|
||||
if (ignorePlatforms) return false;
|
||||
|
||||
//the collision is ignored if the lowest limb is under the platform
|
||||
if (lowestLimb==null || lowestLimb.SimPosition.Y < f2.Body.Position.Y) return false;
|
||||
if (lowestLimb==null || lowestLimb.Position.Y < structure.Rect.Y) return false;
|
||||
}
|
||||
else if (structure.StairDirection!=Direction.None)
|
||||
{
|
||||
if (inWater || !(targetMovement.Y>Math.Abs(targetMovement.X/2.0f)) && lowestLimb.body.Position.Y < ConvertUnits.ToSimUnits(structure.Rect.Y - structure.Rect.Height) + 0.5f)
|
||||
if (inWater || !(targetMovement.Y>Math.Abs(targetMovement.X/2.0f)) && lowestLimb.Position.Y < structure.Rect.Y - structure.Rect.Height + 50.0f)
|
||||
{
|
||||
stairs = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (targetMovement.Y >= 0.0f && lowestLimb.SimPosition.Y > ConvertUnits.ToSimUnits(structure.Rect.Y - Submarine.GridSize.Y * 8.0f))
|
||||
{
|
||||
stairs = null;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user