Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit ad7bafc

Browse files
GacyrGacyr
authored andcommitted
Merge branch 'development' into 4zK-factions
2 parents e9e2b5a + e7935ef commit ad7bafc

File tree

659 files changed

+1747
-491
lines changed

Some content is hidden

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

659 files changed

+1747
-491
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Linker output
2+
*.ilk
3+
14
# Compiled Lua sources
25
luac.out
36

@@ -60,4 +63,5 @@ LogPublish.txt
6063
LogLoading.txt
6164
LogConsole.txt
6265
Console.dump.log
63-
Console.input.log
66+
Console.input.log
67+
Base.rte/LoadoutsP1.ini

Base.rte/AI/HumanFunctions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end
2727

2828
function HumanFunctions.DoAutomaticEquip(actor)
2929
-- Equip a weapon automatically if the one held by a player is destroyed
30-
if actor:IsPlayerControlled() and actor.EquippedItem == nil and actor.InventorySize > 0 then
30+
if actor:IsPlayerControlled() and actor.EquippedItem == nil and actor.InventorySize > 0 and not actor.controller:IsState(Controller.WEAPON_FIRE) then
3131
actor:EquipFirearm(true);
3232
end
3333
end

Base.rte/Craft/Shared/MGTurret.lua

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,21 @@ function Create(self)
1111
end
1212
function Update(self)
1313
local parent = self:GetParent();
14-
if parent and IsActor(parent) then
15-
16-
local parent = ToActor(parent);
17-
local controller = parent:GetController();
18-
19-
if controller:IsState(Controller.MOVE_RIGHT) then
20-
self.rotation = self.rotation + self.turnSpeed;
21-
end
22-
if controller:IsState(Controller.MOVE_LEFT) then
23-
self.rotation = self.rotation - self.turnSpeed;
24-
end
25-
-- Spread / tighten aim when moving up / down
26-
if controller:IsState(Controller.MOVE_DOWN) then
27-
self.verticalFactor = self.verticalFactor - self.turnSpeed;
14+
if parent then
15+
if IsActor(parent) then
16+
parent = ToActor(parent);
17+
local controller = parent:GetController();
18+
19+
if controller:IsState(Controller.MOVE_RIGHT) then
20+
self.rotation = self.rotation + self.turnSpeed;
21+
end
22+
if controller:IsState(Controller.MOVE_LEFT) then
23+
self.rotation = self.rotation - self.turnSpeed;
24+
end
25+
-- Spread / tighten aim when moving up / down
26+
if controller:IsState(Controller.MOVE_DOWN) then
27+
self.verticalFactor = self.verticalFactor - self.turnSpeed;
28+
end
2829
end
2930
if math.abs(self.rotation) > 0.001 then
3031
self.rotation = self.rotation / (1 + self.turnSpeed * 2);
@@ -36,9 +37,9 @@ function Update(self)
3637
else
3738
self.verticalFactor = 0;
3839
end
39-
-- Aim directly away from parent ship
40+
-- Aim directly away from parent
4041
local posTrace = SceneMan:ShortestDistance(parent.Pos, self.Pos, SceneMan.SceneWrapsX):SetMagnitude(self.searchRange / 2);
41-
self.RotAngle = (1.57 * self.verticalFactor + posTrace.AbsRadAngle) / (1 + self.verticalFactor) - self.rotation;
42+
self.RotAngle = (1.57 * self.verticalFactor + posTrace.AbsRadAngle + (parent.HFlipped and math.pi or 0)) / (1 + self.verticalFactor) - self.rotation;
4243
if self.areaMode then -- Area Mode
4344
local aimPos = self.Pos + Vector((self.searchRange / 2), 0):RadRotate(self.RotAngle);
4445
-- Debug: visualize aim area

Base.rte/Devices.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ IncludeFile = Base.rte/Devices/Tools/ConcreteSprayer/ConcreteSprayer.ini
3737
IncludeFile = Base.rte/Devices/Tools/Repeller/Repeller.ini
3838
IncludeFile = Base.rte/Devices/Tools/GrappleGun/GrappleGun.ini
3939
IncludeFile = Base.rte/Devices/Tools/Constructor/Constructor.ini
40-
IncludeFile = Base.rte/Devices/Tools/Medikit/Medikit.ini
4140

4241

4342
// Shields
@@ -47,4 +46,5 @@ IncludeFile = Base.rte/Devices/Shields/RiotShield/RiotShield.ini
4746

4847
// Special
4948

49+
IncludeFile = Base.rte/Devices/Special/Medikit/Medikit.ini
5050
IncludeFile = Base.rte/Devices/Artifacts/Artifacts.ini

Base.rte/Devices/Explosives/AntiPersonnelMine/AntiPersonnelMine.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ AddEffect = MOSRotating
125125
Path = Base.rte/Sounds/Explosions/Explode1.wav
126126
AddSample = ContentFile
127127
Path = Base.rte/Sounds/Explosions/Explode2.wav
128+
AddSample = ContentFile
129+
Path = Base.rte/Sounds/Explosions/Explode3.wav
128130
AddGib = Gib
129131
GibParticle = MOPixel
130132
CopyOf = Glow Explosion Huge

Base.rte/Devices/Explosives/BlueBomb/BlueBomb.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ AddDevice = TDExplosive
4848
Path = Base.rte/Sounds/Explosions/Explode1.wav
4949
AddSample = ContentFile
5050
Path = Base.rte/Sounds/Explosions/Explode2.wav
51+
AddSample = ContentFile
52+
Path = Base.rte/Sounds/Explosions/Explode3.wav
5153
StanceOffset = Vector
5254
X = 8
5355
Y = 5

Base.rte/Devices/Explosives/RemoteExplosive/RemoteExplosive.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ AddMOSRotating = MOSRotating
167167
FilePath = Base.rte/Sounds/Explosions/Explode1.wav
168168
AddSample = ContentFile
169169
FilePath = Base.rte/Sounds/Explosions/Explode2.wav
170+
AddSample = ContentFile
171+
FilePath = Base.rte/Sounds/Explosions/Explode3.wav
170172
AddGib = Gib
171173
GibParticle = MOPixel
172174
CopyOf = Glow Explosion Huge

Base.rte/Devices/Explosives/StandardBomb/StandardBomb.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ AddDevice = TDExplosive
4444
Path = Base.rte/Sounds/Explosions/Explode1.wav
4545
AddSample = ContentFile
4646
Path = Base.rte/Sounds/Explosions/Explode2.wav
47+
AddSample = ContentFile
48+
Path = Base.rte/Sounds/Explosions/Explode3.wav
4749
StanceOffset = Vector
4850
X = -12
4951
Y = -5

Base.rte/Devices/Shared/Scripts/BurstFire.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function Update(self)
66
if self.Magazine then
77
if self.coolDownTimer then
88
local parent = self:GetRootParent();
9-
if self.coolDownTimer:IsPastSimMS(self.coolDownDelay) and (parent and IsActor(parent)) and (not self:IsActivated() or not ToActor(parent):IsPlayerControlled()) then
9+
if self.coolDownTimer:IsPastSimMS(self.coolDownDelay) and parent and IsActor(parent) and not (self:IsActivated() and ToActor(parent):IsPlayerControlled()) then
1010
self.coolDownTimer, self.shotCounter = nil;
1111
else
1212
self:Deactivate();

Base.rte/Devices/Tools/Medikit/Medikit.ini renamed to Base.rte/Devices/Special/Medikit/Medikit.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ AddDevice = HDFirearm
4141
Mass = 2.0
4242
HitsMOs = 0
4343
GetsHitByMOs = 1
44-
ScriptPath = Base.rte/Devices/Tools/Medikit/Medikit.lua
44+
ScriptPath = Base.rte/Devices/Special/Medikit/Medikit.lua
4545
SpriteFile = ContentFile
46-
FilePath = Base.rte/Devices/Tools/Medikit/MedikitB.bmp
46+
FilePath = Base.rte/Devices/Special/Medikit/MedikitB.bmp
4747
FrameCount = 1
4848
SpriteOffset = Vector
4949
X = -6

0 commit comments

Comments
 (0)