@@ -259,7 +259,7 @@ function SharedBehaviors.Patrol(AI, Owner, Abort)
259
259
260
260
if Dist :MagnitudeIsGreaterThan (20 ) then
261
261
Owner :ClearAIWaypoints ();
262
- Owner :AddAISceneWaypoint (Free );
262
+ Owner :AddAISceneWaypoint (Free );
263
263
Owner :UpdateMovePath ();
264
264
265
265
-- wait until movepath is updated
@@ -434,7 +434,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
434
434
local obstacleState = Actor .PROCEEDING ;
435
435
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 };
436
436
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
+
438
438
local NeedsNewPath , Waypoint , HasMovePath , Dist , CurrDist ;
439
439
NeedsNewPath = true ;
440
440
@@ -518,7 +518,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
518
518
end
519
519
520
520
AverageVel = SharedBehaviors .UpdateAverageVel (Owner , AverageVel );
521
-
521
+
522
522
local stuckThreshold = 2.5 ; -- pixels per second of movement we need to be considered not stuck
523
523
524
524
-- 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)
1089
1089
PrjDat .vqu = PrjDat .vsq ^ 2 ; -- muzzle velocity quad
1090
1090
PrjDat .drg = 1 - Projectile .AirResistance * TimerMan .DeltaTimeSecs ; -- AirResistance is stored as the ini-value times 60
1091
1091
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 ;
1093
1093
1094
1094
PrjDat .blast = Weapon :GetAIBlastRadius ();
1095
1095
if PrjDat .blast > 0 or Weapon :IsInGroup (" Weapons - Explosive" ) then
0 commit comments