Skip to content

Commit 1a179a9

Browse files
committed
Merge branch 'development' into browncoat-mission
2 parents 48d7836 + e441cfa commit 1a179a9

File tree

9 files changed

+533
-518
lines changed

9 files changed

+533
-518
lines changed

Data/Base.rte/AI/CrabBehaviors.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function CrabBehaviors.LookForTargets(AI, Owner)
3131
FoundMO = ToACRocket(FoundMO);
3232
elseif FoundMO.ClassName == "ACDropShip" then
3333
FoundMO = ToACDropShip(FoundMO);
34-
elseif FoundMO.ClassName == "ADoor" and FoundMO.Team ~= Activity.NOTEAM and Owner.AIMode ~= Actor.AIMODE_SENTRY and ToADoor(FoundMO).Door and ToADoor(FoundMO).Door:IsAttached() and HumanBehaviors.GetProjectileData(Owner).pen * 0.9 > ToADoor(FoundMO).Door.Material.StructuralIntegrity then
34+
elseif FoundMO.ClassName == "ADoor" and FoundMO.Team ~= Activity.NOTEAM and Owner.AIMode ~= Actor.AIMODE_SENTRY and ToADoor(FoundMO).Door and ToADoor(FoundMO).Door:IsAttached() and SharedBehaviors.GetProjectileData(Owner).pen * 0.9 > ToADoor(FoundMO).Door.Material.StructuralIntegrity then
3535
FoundMO = ToADoor(FoundMO);
3636
elseif FoundMO.ClassName == "Actor" then
3737
FoundMO = ToActor(FoundMO);
@@ -42,7 +42,7 @@ function CrabBehaviors.LookForTargets(AI, Owner)
4242
if FoundMO then
4343
if AI.Target then
4444
-- check if this MO should be targeted instead
45-
if HumanBehaviors.CalculateThreatLevel(FoundMO, Owner) > HumanBehaviors.CalculateThreatLevel(AI.Target, Owner) + 0.2 then
45+
if SharedBehaviors.CalculateThreatLevel(FoundMO, Owner) > SharedBehaviors.CalculateThreatLevel(AI.Target, Owner) + 0.2 then
4646
AI.OldTargetPos = Vector(AI.Target.Pos.X, AI.Target.Pos.Y);
4747
AI.Target = FoundMO;
4848
AI.TargetOffset = SceneMan:ShortestDistance(AI.Target.Pos, HitPoint, false); -- this is the distance vector from the target center to the point we hit with our ray

0 commit comments

Comments
 (0)