More accurate and reliable submarine-level collisions, looping OnUse sounds bugfix, new music clips, item sprites removed from limbs when someone else loots the item, Camera.WorldView fix, checking vector.LengthSquared before normalizing to avoid creating a NaN vector

This commit is contained in:
Regalis
2015-10-04 23:50:46 +03:00
parent 0be4ad4f84
commit f13a48ef52
33 changed files with 342 additions and 217 deletions

View File

@@ -221,7 +221,7 @@ namespace Subsurface.Items.Components
AnimController ac = picker.AnimController;
//item.sprite.Depth = picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.01f;
//item.sprite.Depth = picker.AnimController.GetLimb(LimbType.RightHand).sprite.Depth + 0.01f;
ac.HoldItem(deltaTime, item, handlePos, holdPos, aimPos, picker.GetInputState(InputType.SecondaryHeld), holdAngle);
}

View File

@@ -111,11 +111,11 @@ namespace Subsurface.Items.Components
Vector2 targetPosition = item.body.SimPosition;
//targetPosition = targetPosition.X, -targetPosition.Y);
float degreeOfSuccess = DegreeOfSuccess(character);
float degreeOfSuccess = DegreeOfSuccess(character)/100.0f;
if (Rand.Range(0.0f, 1.0f) > degreeOfSuccess * degreeOfSuccess)
if (Rand.Range(0.0f, 0.5f) > degreeOfSuccess)
{
ApplyStatusEffects(ActionType.OnFailure, 1.0f, character);
ApplyStatusEffects(ActionType.OnFailure, deltaTime, character);
return false;
}
@@ -147,7 +147,7 @@ namespace Subsurface.Items.Components
targetStructure.HighLightSection(sectionIndex);
targetStructure.AddDamage(sectionIndex, -structureFixAmount);
targetStructure.AddDamage(sectionIndex, -structureFixAmount*degreeOfSuccess);
//if the next section is small enough, apply the effect to it as well
//(to make it easier to fix a small "left-over" section)
@@ -155,7 +155,7 @@ namespace Subsurface.Items.Components
if (nextSectionLength > 0 && nextSectionLength < Structure.wallSectionSize * 0.3f)
{
targetStructure.HighLightSection(sectionIndex + 1);
targetStructure.AddDamage(sectionIndex + 1, -structureFixAmount);
targetStructure.AddDamage(sectionIndex + 1, -structureFixAmount * degreeOfSuccess);
}
}
@@ -163,7 +163,7 @@ namespace Subsurface.Items.Components
{
if (character.GetInputState(InputType.SecondaryHeld))
{
targetLimb.character.Health += limbFixAmount;
targetLimb.character.Health += limbFixAmount * degreeOfSuccess;
//isActive = true;
}
}