Skip to content

Commit 2b998a3

Browse files
authored
Merge pull request #56 from cortex-command-community/pre6-the-third-tweak-branch
Teleporter fix
2 parents 07f3ca1 + 33a4e20 commit 2b998a3

File tree

355 files changed

+1448
-614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

355 files changed

+1448
-614
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6363
New `SoundContainer` INI and Lua (R/W) property `CustomPanValue`, which hard-overrides the panning of a sound. Clamped between -1 and 1 for left and right panning. 0 disables the override and will re-enable default behavior. This should probably only be used on Immobile sounds, but it can be used on any sound.
6464

6565
- Many new sounds added to the game.
66-
Browncoats have gotten a full sound revamp for everything except their actors. Every item now has its own custom sounds.
66+
Browncoats have gotten a full sound revamp for everything except their actors. Every Browncoat item now has its own custom sounds.
6767
Most base explosions and Riot Shield sounds have been redone.
6868

6969
- New delivery system, Buy Doors:

Data/Base.rte/Actors/Mecha/AADrone/AADrone.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function Create(self)
105105
+ self.SAM_Target:RotateOffset(self.SAM_Offset)
106106
+ self.SAM_Target.Vel * math.min(range / 50, 20)
107107
)
108-
* 0.4 -- Filter the AimPos to reduce noise
108+
* 0.4; -- Filter the AimPos to reduce noise
109109
end
110110
end
111111

Data/Base.rte/Craft/Shared/AttachableTurret.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,19 @@ function Update(self)
3636
self.verticalFactor = self.verticalFactor - self.turnSpeed;
3737
end
3838
end
39+
3940
if math.abs(self.rotation) > 0.001 then
4041
self.rotation = self.rotation/(1 + self.turnSpeed * 2);
4142
else
4243
self.rotation = 0;
4344
end
45+
4446
if math.abs(self.verticalFactor) > 0.001 then
4547
self.verticalFactor = self.verticalFactor/(1 + self.turnSpeed * 4);
4648
else
4749
self.verticalFactor = 0;
4850
end
51+
4952
if self.areaMode then --Area Mode
5053
local aimPos = self.Pos + Vector((self.searchRange * 0.5), 0):RadRotate(self.RotAngle);
5154
--Debug: visualize aim area
@@ -84,6 +87,7 @@ function Update(self)
8487
target = MovableMan:GetMOFromID(MovableMan:GetMOFromID(moCheck2).RootID);
8588
end
8689
end
90+
8791
local color = 13; --Debug trace color: red
8892
if target and IsActor(target) and ToActor(target).Status < Actor.INACTIVE then
8993
self:EnableEmission(true);
@@ -94,13 +98,15 @@ function Update(self)
9498
color = 254; --Debug trace color: white
9599
end
96100
end
101+
97102
--Debug: visualize aim traces
98103
if self.showAim then
99104
PrimitiveMan:DrawLinePrimitive(self.Team, self.Pos, self.Pos + aimTrace:RadRotate(1/math.sqrt(self.searchRange)), color);
100105
PrimitiveMan:DrawLinePrimitive(self.Team, self.Pos, self.Pos + aimTrace:RadRotate(-1/math.sqrt(self.searchRange)), color);
101106
end
102107
end
103108
end
109+
104110
if self.fireTimer:IsPastSimTimeLimit() then
105111
self:EnableEmission(false);
106112
end

Data/Base.rte/Devices/Explosives/AntiPersonnelMine/MineDeploy.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ function Update(self)
77
if IsActor(parent) then
88
self.alliedTeam = ToActor(parent).Team;
99
elseif self:IsActivated() then
10-
1110
local mine = CreateMOSRotating("Anti Personnel Mine Active");
1211
mine.Pos = self.Pos;
1312
mine.Vel = self.Vel;

Data/Base.rte/Devices/Explosives/AntiPersonnelMine/MineSet.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,17 @@ function Update(self)
4040
AntiPersonnelMineTable = {};
4141
AntiPersonnelMineTable[self.tableNum] = self;
4242
end
43+
4344
if self.Sharpness ~= 0 then
4445
self.ToDelete = true;
4546
end
4647

4748
if self.actionPhase == 0 then
48-
4949
local trace = Vector(self.Vel.X, self.Vel.Y + 1):SetMagnitude(math.max(self.Vel.Magnitude * rte.PxTravelledPerFrame, self.Radius));
5050
local rayHitPos = Vector();
5151
local terrainRaycast = SceneMan:CastStrengthRay(self.Pos, trace, 5, rayHitPos, 0, rte.airID, SceneMan.SceneWrapsX);
5252

5353
if terrainRaycast == true then
54-
5554
trace = Vector(trace.X, trace.Y):SetMagnitude(trace.Magnitude + 5);
5655
local rayHitPosA = Vector();
5756
local terrainRaycastA = SceneMan:CastStrengthRay(self.Pos + Vector(0, 3):RadRotate(Vector(self.Vel.X, self.Vel.Y).AbsRadAngle), trace, 5, rayHitPosA, 0, rte.airID, SceneMan.SceneWrapsX);
@@ -72,13 +71,10 @@ function Update(self)
7271
self.activateSound:Play(self.Pos);
7372
self.delayTimer:Reset();
7473
end
75-
7674
elseif self.actionPhase == 1 then
77-
7875
self.Vel = self.PinStrength == 0 and self.Vel or Vector();
7976

8077
if self.blinkTimer:IsPastSimMS(500) then
81-
8278
self.blinkTimer:Reset();
8379

8480
if self.blink == false then
@@ -120,9 +116,7 @@ function Update(self)
120116
MovableMan:AddParticle(effectpar);
121117
end
122118
end
123-
124119
elseif self.actionPhase == 2 then
125-
126120
if self.blink == false then
127121
self.blink = true;
128122
self.Frame = ((self.alliedTeam + 1) * 2) + 1;

Data/Base.rte/Devices/Shared/Scripts/FlakShell.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function Update(self)
1717
checkPos = Vector(SceneMan.SceneWidth + checkPos.X, checkPos.Y);
1818
end
1919
end
20+
2021
local moCheck = SceneMan:GetMOIDPixel(checkPos.X, checkPos.Y);
2122
if moCheck ~= rte.NoMOID then
2223
local actor = MovableMan:GetMOFromID(MovableMan:GetMOFromID(moCheck).RootID);

Data/Base.rte/Devices/Shared/Scripts/FlamerFlame.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ function Update(self)
66
if math.abs(self.lastVel.AbsRadAngle - self.Vel.AbsRadAngle) > 0.25 then
77
self.Vel = Vector(self.lastVel.Magnitude, 0):RadRotate(self.Vel.AbsRadAngle + (math.random() * 0.4) - 0.2);
88
end
9+
910
self.lastVel = Vector(self.Vel.X, self.Vel.Y);
1011
end

Data/Base.rte/Devices/Shared/Scripts/GrenadeBandolierAttachable.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ function Destroy(self)
174174
bandolierAngularVel = self.grenadePreviouslyHeldByRootParent.AngularVel;
175175
end
176176
end
177+
177178
if self.currentGrenadeCount > 0 then
178179
self.bandolierObjectForDropping:SetNumberValue("GrenadesRemainingInBandolier", self.currentGrenadeCount);
179180

Data/Base.rte/Devices/Shared/Scripts/RevolverCylinderReload.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function Update(self)
1515
shell.AngularVel = RangeRand(-1, 1);
1616
MovableMan:AddParticle(shell);
1717
end
18+
1819
self.shellsToEject = 0;
1920
end
2021
end
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function Create(self)
2+
self.shieldWalkSound = CreateSoundContainer("Metal Shield Walk", "Base.rte");
3+
self.shieldWalkTimer = Timer();
4+
end
5+
6+
function ThreadedUpdate(self)
7+
self.shieldWalkSound.Pos = self.Pos;
8+
self.parent = self:GetRootParent();
9+
10+
if IsAHuman(self.parent) then
11+
if ToAHuman(self.parent).StrideFrame and self.shieldWalkTimer:IsPastSimMS(400) then
12+
self.shieldWalkTimer:Reset();
13+
self.shieldWalkSound:Play(self.Pos);
14+
end
15+
end
16+
end

0 commit comments

Comments
 (0)