Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2023-03-16 12:53:53 -03:00
14 changed files with 34 additions and 21 deletions
@@ -1195,7 +1195,7 @@ namespace Barotrauma
{
target = limb.character;
}
if (target != null && (target != Enemy || HumanAIController.IsFriendly(target)))
if (target != null && target != Enemy && HumanAIController.IsFriendly(target))
{
return;
}
@@ -198,6 +198,7 @@ namespace Barotrauma
{
foreach (var entry in entries)
{
if (entry == null) { continue; }
yield return entry.HumanPrefab;
}
}
@@ -330,7 +331,7 @@ namespace Barotrauma
{
foreach (var prefab in collection)
{
if (prefab.CampaignInteractionType == interactionType)
if (prefab != null && prefab.CampaignInteractionType == interactionType)
{
return true;
}
@@ -1539,7 +1539,7 @@ namespace Barotrauma
{
targetCharacter.TryAdjustHealerSkill(user, healthChange);
#if SERVER
GameMain.Server.KarmaManager.OnCharacterHealthChanged(targetCharacter, user, healthChange, 0.0f);
GameMain.Server.KarmaManager.OnCharacterHealthChanged(targetCharacter, user, -healthChange, 0.0f);
#endif
}
}
@@ -2168,7 +2168,7 @@ namespace Barotrauma
{
targetCharacter.TryAdjustHealerSkill(element.User, healthChange);
#if SERVER
GameMain.Server.KarmaManager.OnCharacterHealthChanged(targetCharacter, element.User, healthChange, 0.0f);
GameMain.Server.KarmaManager.OnCharacterHealthChanged(targetCharacter, element.User, -healthChange, 0.0f);
#endif
}
}