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

Commit 65e9ab4

Browse files
authored
Merge pull request #71 from cortex-command-community/cf-112-data-version
Data followup to CF-112
2 parents d1203a1 + 39ffa9b commit 65e9ab4

File tree

5 files changed

+17
-28
lines changed

5 files changed

+17
-28
lines changed

Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ AddDevice = HDFirearm
196196
Mass = 15
197197
HitsMOs = 0
198198
GetsHitByMOs = 1
199-
ScriptPath = Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua
200199
SpriteFile = ContentFile
201200
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.png
202201
FrameCount = 2
@@ -241,11 +240,19 @@ AddDevice = HDFirearm
241240
CopyOf = Magazine FT-200
242241
Flash = Attachable
243242
CopyOf = Jet Flame B
243+
PreFireSound = SoundContainer
244+
AttenuationStartDistance = 195
245+
AddSound = ContentFile
246+
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac
244247
FireSound = SoundContainer
245248
AttenuationStartDistance = 195
246249
AddSound = ContentFile
247250
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Loop.flac
248251
LoopSetting = -1
252+
DeactivationSound = SoundContainer
253+
AttenuationStartDistance = 195
254+
AddSound = ContentFile
255+
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Sounds/End.flac
249256
EmptySound = SoundContainer
250257
AddSound = ContentFile
251258
FilePath = Base.rte/Sounds/Devices/EmptyClick1.flac

Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua

Lines changed: 0 additions & 13 deletions
This file was deleted.
Binary file not shown.

Dummy.rte/Devices/Weapons/Destroyer/Destroyer.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ AddAmmo = AEmitter
148148
PushesEmitter = 0
149149
InheritsVel = 0
150150
EmissionSound = SoundContainer
151+
PresetName = Destroyer Emission Sound
151152
AttenuationStartDistance = 140
152153
AddSound = ContentFile
153154
FilePath = Dummy.rte/Devices/Weapons/Destroyer/Sounds/ProjectileLoop1.flac

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ function Create(self)
1212
--The following timer prevents a glitch where you can fire twice by putting the gun inside the inventory while charging
1313
self.inventorySwapTimer = Timer();
1414
self.inventorySwapTimer:SetSimTimeLimitMS(math.ceil(TimerMan.DeltaTimeMS));
15+
self.activeSound = CreateSoundContainer("Destroyer Emission Sound", "Dummy.rte");
1516
end
1617
function Update(self)
1718
if self.Magazine then
1819
if self.inventorySwapTimer:IsPastSimTimeLimit() then
19-
if self.activeSound then
20-
AudioMan:StopSound(self.activeSound);
21-
self.activeSound = nil;
22-
end
20+
self.activeSound:Stop();
2321
self.charge = 0;
2422
end
2523
self.inventorySwapTimer:Reset();
@@ -48,11 +46,11 @@ function Update(self)
4846
if self:IsActivated() then
4947
self:Deactivate();
5048

51-
if self.activeSound then
52-
AudioMan:SetSoundPosition(self.activeSound, self.Pos);
53-
AudioMan:SetSoundPitch(self.activeSound, self.charge);
49+
if self.activeSound:IsBeingPlayed() then
50+
self.activeSound.Pos = self.Pos;
51+
self.activeSound.Pitch = self.charge;
5452
else
55-
self.activeSound = AudioMan:PlaySound("Dummy.rte/Devices/Weapons/Destroyer/Sounds/ProjectileLoop1.flac", self.Pos, -1, -1, 100, 0, 100, false);
53+
self.activeSound:Play(self.Pos);
5654
end
5755
if not self.chargeTimer:IsPastSimTimeLimit() then
5856
self.charge = self.chargeTimer.ElapsedSimTimeMS/self.chargeDelay;
@@ -88,13 +86,9 @@ function Update(self)
8886
MovableMan:AddParticle(par);
8987

9088
self.charge = 0;
91-
AudioMan:StopSound(self.activeSound);
92-
self.activeSound = nil;
89+
self.activeSound:Stop();
9390
end
9491
end
9592
function Destroy(self)
96-
if self.activeSound then
97-
AudioMan:StopSound(self.activeSound);
98-
self.activeSound = nil;
99-
end
93+
self.activeSound:Stop();
10094
end

0 commit comments

Comments
 (0)