Progress on tutorial, gap tweaking (water flows faster from room to room), UPnP error messages, input keys in array, underwater aiming tweaking, tons of misc stuff commit more often ffs

This commit is contained in:
Regalis
2015-08-31 19:57:49 +03:00
parent 1e990784b2
commit f739808520
150 changed files with 15933 additions and 588 deletions
@@ -53,7 +53,7 @@ namespace Subsurface.Items.Components
public override bool Use(float deltaTime, Character character = null)
{
if (character == null) return false;
if (!character.SecondaryKeyDown.State || reload > 0.0f) return false;
if (!character.GetInputState(InputType.SecondaryHeld) || reload > 0.0f) return false;
isActive = true;
reload = 1.0f;
@@ -102,7 +102,7 @@ namespace Subsurface.Items.Components
public override bool Use(float deltaTime, Character character = null)
{
if (character == null) return false;
if (!character.SecondaryKeyDown.State) return false;
if (!character.GetInputState(InputType.SecondaryHeld)) return false;
if (DoesUseFail(character)) return false;
@@ -126,9 +126,6 @@ namespace Subsurface.Items.Components
if (targetBody == null || targetBody.UserData == null) return true;
//ApplyStatusEffects(ActionType.OnUse, 1.0f, character);
Structure targetStructure;
Limb targetLimb;
Item targetItem;
@@ -143,10 +140,19 @@ namespace Subsurface.Items.Components
targetStructure.AddDamage(sectionIndex, -structureFixAmount);
//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)
int nextSectionLength = targetStructure.SectionLength(sectionIndex + 1);
if (nextSectionLength > 0 && nextSectionLength < Structure.wallSectionSize * 0.3f)
{
targetStructure.HighLightSection(sectionIndex + 1);
targetStructure.AddDamage(sectionIndex + 1, -structureFixAmount);
}
}
else if ((targetLimb = (targetBody.UserData as Limb)) != null)
{
if (character.SecondaryKeyDown.State)
if (character.GetInputState(InputType.SecondaryHeld))
{
targetLimb.character.Health += limbFixAmount;
//isActive = true;
@@ -28,7 +28,7 @@ namespace Subsurface.Items.Components
public override bool Use(float deltaTime, Character character = null)
{
if (character == null) return false;
if (!character.SecondaryKeyDown.State || throwing) return false;
if (!character.GetInputState(InputType.SecondaryHeld) || throwing) return false;
throwing = true;
@@ -60,7 +60,7 @@ namespace Subsurface.Items.Components
if (!item.body.Enabled) return;
if (!picker.HasSelectedItem(item)) isActive = false;
if (!picker.SecondaryKeyDown.State && !throwing) throwPos = 0.0f;
if (!picker.GetInputState(InputType.SecondaryHeld) && !throwing) throwPos = 0.0f;
ApplyStatusEffects(ActionType.OnActive, deltaTime, picker);