- Enemies with the "attack when provoked" setting only start attacking humans and structures if the attacker is a non-AI character or has a HumanAIController.
- Characters that launch a turret get assigned as the user of the projectile (-> shooting watchers with a railgun makes them attack). - Increased watchers' attack range.
This commit is contained in:
@@ -360,13 +360,16 @@ namespace Barotrauma
|
||||
updateTargetsTimer = Math.Min(updateTargetsTimer, 0.1f);
|
||||
coolDownTimer *= 0.1f;
|
||||
|
||||
if (amount > 0.1f && attackWhenProvoked)
|
||||
if (amount > 0.0f && attackWhenProvoked)
|
||||
{
|
||||
attackHumans = 100.0f;
|
||||
attackRooms = 100.0f;
|
||||
if (!(attacker is AICharacter) || (((AICharacter)attacker).AIController is HumanAIController))
|
||||
{
|
||||
attackHumans = 100.0f;
|
||||
attackRooms = 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker==null || attacker.AiTarget==null) return;
|
||||
if (attacker == null || attacker.AiTarget == null) return;
|
||||
AITargetMemory targetMemory = FindTargetMemory(attacker.AiTarget);
|
||||
targetMemory.Priority += amount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user