Unstable 0.15.12.0

This commit is contained in:
Markus Isberg
2021-10-27 22:07:32 +09:00
parent 6b84ff65e3
commit 1718dbc1c1
11 changed files with 26 additions and 11 deletions
@@ -2343,7 +2343,7 @@ namespace Barotrauma
}
if (steeringManager is IndoorsSteeringManager pathSteering)
{
if (!pathSteering.IsPathDirty && pathSteering.CurrentPath.Unreachable)
if (!pathSteering.IsPathDirty && pathSteering.CurrentPath != null && pathSteering.CurrentPath.Unreachable)
{
// Can't reach
State = AIState.Idle;
@@ -1261,7 +1261,7 @@ namespace Barotrauma
}
const int BaseExperienceRequired = -50;
const int AddedExperienceRequiredPerLevel = 550;
const int AddedExperienceRequiredPerLevel = 500;
public int GetTotalTalentPoints()
{
@@ -151,6 +151,7 @@ namespace Barotrauma
private void DeactivateHusk()
{
if (character?.AnimController == null || character.Removed) { return; }
if (Prefab is AfflictionPrefabHusk { NeedsAir: false })
{
character.NeedsAir = character.Params.MainElement.GetAttributeBool("needsair", false);
@@ -218,9 +219,12 @@ namespace Barotrauma
XElement infoElement = character.Info?.Save(parentElement);
CharacterInfo huskCharacterInfo = infoElement == null ? null : new CharacterInfo(infoElement);
var bodyTint = GetBodyTint();
huskCharacterInfo.SkinColor =
Color.Lerp(huskCharacterInfo.SkinColor, bodyTint.Opaque(), bodyTint.A / 255.0f);
if (huskCharacterInfo != null)
{
var bodyTint = GetBodyTint();
huskCharacterInfo.SkinColor =
Color.Lerp(huskCharacterInfo.SkinColor, bodyTint.Opaque(), bodyTint.A / 255.0f);
}
var husk = Character.Create(huskedSpeciesName, character.WorldPosition, ToolBox.RandomSeed(8), huskCharacterInfo, isRemotePlayer: false, hasAi: true);
if (husk.Info != null)
@@ -184,6 +184,7 @@ namespace Barotrauma.Items.Components
{
foreach ((Character character, Node node) in charactersInRange)
{
if (character == null || character.Removed) { continue; }
character.ApplyAttack(null, node.WorldPosition, attack, 1.0f);
}
}