(a97ef2847) AI improvements: - Fix steering issues when attacking (yet again): We still have to offset the sim positions. - Fix the steering vector when escaping from the enemy that is inside the sub. - Enemies can now navigate out from the sub, when escaping. - Fix door tag not being used when targeting items. Change the priority boosts considering doors. Should now entirely ignore the outer doors when inside and inner doors when outside. - Change the way enemies react to characters that are not in the same sub. Halve the priority when the character is not in the same hull. Add some boost to the priority when escaping.
This commit is contained in:
@@ -520,9 +520,10 @@ namespace Barotrauma
|
||||
// Ignore blocking on items, because it causes cases where a Mudraptor cannot hit the hatch, for example.
|
||||
wasHit = true;
|
||||
}
|
||||
else if (damageTarget is Structure && structureBody?.UserData is Structure)
|
||||
else if (damageTarget is Structure wall && structureBody != null &&
|
||||
(structureBody.UserData is Structure || (structureBody.UserData is Submarine sub && sub == wall.Submarine)))
|
||||
{
|
||||
// If the attack is aimed to a structure and hits a structure, it's successful
|
||||
// If the attack is aimed to a structure (wall) and hits a structure or the sub, it's successful
|
||||
wasHit = true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user