Skip to content

Commit c927c74

Browse files
committed
Changes to pulse shot from 4zK
1 parent 9e611ef commit c927c74

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Data/Techion.rte/Devices/Shared/Scripts/PulseShot.lua

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ end
3030

3131
function PulsarDissipate(self, inverted)
3232
local trace = inverted and Vector(-self.Vel.X, -self.Vel.Y):SetMagnitude(GetPPM()) or Vector(self.Vel.X, self.Vel.Y):SetMagnitude(self.Vel.Magnitude * rte.PxTravelledPerFrame + 1);
33-
local hit = false;
33+
local hit = inverted == false;
3434
local hitPos = Vector(self.Pos.X, self.Pos.Y);
3535
local skipPx = math.sqrt(self.Vel.Magnitude) * 0.5;
3636

3737
local moid = SceneMan:CastObstacleRay(self.Pos, trace, hitPos, Vector(), self.ID, self.Team, rte.airID, skipPx) >= 0 and SceneMan:GetMOIDPixel(hitPos.X, hitPos.Y) or self.HitWhatMOID;
3838
local mo = MovableMan:GetMOFromID(moid);
3939

40-
if mo then
40+
if mo and mo.Team ~= self.Team then
4141
hit = true;
4242
if IsMOSRotating(mo) and self.penetrationStrength > mo.Material.StructuralIntegrity then
4343
mo = ToMOSRotating(mo);
@@ -58,13 +58,8 @@ function PulsarDissipate(self, inverted)
5858
MovableMan:AddMO(melter);
5959
end
6060
end
61-
else
62-
local penetration = self.Mass * self.Sharpness * self.Vel.Magnitude;
63-
if SceneMan:GetMaterialFromID(SceneMan:GetTerrMatter(hitPos.X, hitPos.Y)).StructuralIntegrity > penetration then
64-
hit = true;
65-
elseif self.Vel:MagnitudeIsLessThan(self.PrevVel.Magnitude * 0.5) then
66-
hit = true;
67-
end
61+
elseif self.Vel:MagnitudeIsLessThan(1) then
62+
hit = true;
6863
end
6964
if hit then
7065
local offset = Vector(self.Vel.X, self.Vel.Y):SetMagnitude(skipPx);

0 commit comments

Comments
 (0)