Skip to content

Commit 58236b2

Browse files
committed
use cpp penetration calculation
it's already there isn't it
1 parent 26c5601 commit 58236b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Data/Base.rte/AI/SharedBehaviors.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ function SharedBehaviors.Patrol(AI, Owner, Abort)
259259

260260
if Dist:MagnitudeIsGreaterThan(20) then
261261
Owner:ClearAIWaypoints();
262-
Owner:AddAISceneWaypoint(Free);
262+
Owner:AddAISceneWaypoint(Free);
263263
Owner:UpdateMovePath();
264264

265265
-- wait until movepath is updated
@@ -434,7 +434,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
434434
local obstacleState = Actor.PROCEEDING;
435435
local Obst = {R_LOW = 1, R_FRONT = 2, R_HIGH = 3, R_UP = 5, L_UP = 6, L_HIGH = 8, L_FRONT = 9, L_LOW = 10};
436436
local Facings = {{aim=0, facing=0}, {aim=1.4, facing=1.4}, {aim=1.4, facing=math.pi-1.4}, {aim=0, facing=math.pi}};
437-
437+
438438
local NeedsNewPath, Waypoint, HasMovePath, Dist, CurrDist;
439439
NeedsNewPath = true;
440440

@@ -518,7 +518,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
518518
end
519519

520520
AverageVel = SharedBehaviors.UpdateAverageVel(Owner, AverageVel);
521-
521+
522522
local stuckThreshold = 2.5; -- pixels per second of movement we need to be considered not stuck
523523

524524
-- Cap AverageVel, so if we have a spike in velocity it doesn't take too long to come back down
@@ -1089,7 +1089,7 @@ function SharedBehaviors.GetProjectileData(Owner)
10891089
PrjDat.vqu = PrjDat.vsq^2; -- muzzle velocity quad
10901090
PrjDat.drg = 1 - Projectile.AirResistance * TimerMan.DeltaTimeSecs; -- AirResistance is stored as the ini-value times 60
10911091
PrjDat.thr = math.min(Projectile.AirThreshold, PrjDat.vel);
1092-
PrjDat.pen = (Projectile.Mass * Projectile.Sharpness * PrjDat.vel) * PrjDat.drg;
1092+
PrjDat.pen = Weapon:GetAIPenetration() * PrjDat.drg;
10931093

10941094
PrjDat.blast = Weapon:GetAIBlastRadius();
10951095
if PrjDat.blast > 0 or Weapon:IsInGroup("Weapons - Explosive") then

0 commit comments

Comments
 (0)