Medibot fixes (#18744)

This commit is contained in:
metalgearsloth
2023-08-06 16:38:14 +10:00
committed by GitHub
parent 4262c62306
commit 83a43b83b3
2 changed files with 7 additions and 3 deletions

View File

@@ -25,9 +25,12 @@ public sealed class InteractWithOperator : HTNOperator
return HTNOperatorStatus.Continuing;
}
_entManager.System<SharedCombatModeSystem>().SetInCombatMode(owner, false);
_entManager.System<InteractionSystem>().UserInteraction(owner, targetXform.Coordinates, moveTarget);
if (_entManager.TryGetComponent<CombatModeComponent>(owner, out var combatMode))
{
_entManager.System<SharedCombatModeSystem>().SetInCombatMode(owner, false, combatMode);
}
_entManager.System<InteractionSystem>().UserInteraction(owner, targetXform.Coordinates, moveTarget);
return HTNOperatorStatus.Finished;
}
}