Skip to content

Commit a2ce340

Browse files
authored
Merge pull request #189 from zomgtehderpy/foolingaround
a fix here and there
2 parents 9793a7d + 19f06fc commit a2ce340

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
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

Data/Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function ThreadedUpdate(self)
2121
self.activeSound:Stop();
2222
self.charge = 0;
2323
end
24-
24+
2525
self.inventorySwapTimer:Reset();
2626
if self.Magazine.RoundCount > 0 then
2727
if self.animTimer:IsPastSimMS(200 * (1 - self.charge)) then
@@ -38,7 +38,7 @@ function ThreadedUpdate(self)
3838
self.damagePar.Team = self.Team;
3939
self.damagePar.IgnoresTeamHits = true;
4040
self.damagePar.Lifetime = 100 * (1 + self.charge);
41-
41+
4242
self:RequestSyncedUpdate();
4343
end
4444
end
@@ -106,7 +106,7 @@ function SyncedUpdate(self)
106106
end
107107

108108
if self.damagePar then
109-
MovableMan:AddParticle(self.par);
109+
MovableMan:AddParticle(self.damagePar);
110110
self.damagePar = nil;
111111
end
112112

0 commit comments

Comments
 (0)