Skip to content

a fix here and there #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Data/Base.rte/AI/SharedBehaviors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function SharedBehaviors.Patrol(AI, Owner, Abort)

if Dist:MagnitudeIsGreaterThan(20) then
Owner:ClearAIWaypoints();
Owner:AddAISceneWaypoint(Free);
Owner:AddAISceneWaypoint(Free);
Owner:UpdateMovePath();

-- wait until movepath is updated
Expand Down Expand Up @@ -434,7 +434,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
local obstacleState = Actor.PROCEEDING;
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};
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}};

local NeedsNewPath, Waypoint, HasMovePath, Dist, CurrDist;
NeedsNewPath = true;

Expand Down Expand Up @@ -518,7 +518,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
end

AverageVel = SharedBehaviors.UpdateAverageVel(Owner, AverageVel);

local stuckThreshold = 2.5; -- pixels per second of movement we need to be considered not stuck

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

PrjDat.blast = Weapon:GetAIBlastRadius();
if PrjDat.blast > 0 or Weapon:IsInGroup("Weapons - Explosive") then
Expand Down
6 changes: 3 additions & 3 deletions Data/Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function ThreadedUpdate(self)
self.activeSound:Stop();
self.charge = 0;
end

self.inventorySwapTimer:Reset();
if self.Magazine.RoundCount > 0 then
if self.animTimer:IsPastSimMS(200 * (1 - self.charge)) then
Expand All @@ -38,7 +38,7 @@ function ThreadedUpdate(self)
self.damagePar.Team = self.Team;
self.damagePar.IgnoresTeamHits = true;
self.damagePar.Lifetime = 100 * (1 + self.charge);

self:RequestSyncedUpdate();
end
end
Expand Down Expand Up @@ -106,7 +106,7 @@ function SyncedUpdate(self)
end

if self.damagePar then
MovableMan:AddParticle(self.par);
MovableMan:AddParticle(self.damagePar);
self.damagePar = nil;
end

Expand Down