Medical items, improved falldamage, "power on" sounds
This commit is contained in:
@@ -172,6 +172,13 @@ namespace Subsurface
|
||||
}
|
||||
}
|
||||
|
||||
public float Bleeding
|
||||
{
|
||||
get { return bleeding; }
|
||||
set { bleeding = value; }
|
||||
}
|
||||
|
||||
|
||||
//public float Blood
|
||||
//{
|
||||
// get { return blood; }
|
||||
@@ -575,7 +582,7 @@ namespace Subsurface
|
||||
Body body = Submarine.PickBody(AnimController.limbs[0].SimPosition, mouseSimPos);
|
||||
Structure structure = null;
|
||||
if (body != null) structure = body.UserData as Structure;
|
||||
if (structure!=null)
|
||||
if (structure != null)
|
||||
{
|
||||
if (!structure.CastShadow && moveCam)
|
||||
{
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Subsurface
|
||||
body.CollidesWith = Physics.CollisionAll & ~Physics.CollisionCharacter & ~Physics.CollisionMisc;
|
||||
}
|
||||
|
||||
impactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 20.0f);
|
||||
impactTolerance = ToolBox.GetAttributeFloat(element, "impacttolerance", 8.0f);
|
||||
|
||||
body.UserData = this;
|
||||
|
||||
|
||||
@@ -312,7 +312,17 @@ namespace Subsurface
|
||||
private void CalculateImpact(Fixture f1, Fixture f2, Contact contact)
|
||||
{
|
||||
Vector2 normal = contact.Manifold.LocalNormal;
|
||||
float impact = Vector2.Dot(f1.Body.LinearVelocity, -normal);
|
||||
|
||||
Vector2 avgVelocity = Vector2.Zero;
|
||||
foreach (Limb limb in limbs)
|
||||
{
|
||||
avgVelocity += limb.LinearVelocity;
|
||||
}
|
||||
|
||||
avgVelocity = avgVelocity / limbs.Count();
|
||||
|
||||
|
||||
float impact = Vector2.Dot((f1.Body.LinearVelocity + avgVelocity)/2.0f, -normal);
|
||||
|
||||
Limb l = (Limb)f1.Body.UserData;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user