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

Commit

Permalink
Merge pull request #71 from cortex-command-community/cf-112-data-version
Browse files Browse the repository at this point in the history
Data followup to CF-112
  • Loading branch information
garethyr authored Dec 25, 2020
2 parents d1203a1 + 39ffa9b commit 65e9ab4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 28 deletions.
9 changes: 8 additions & 1 deletion Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.ini
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ AddDevice = HDFirearm
Mass = 15
HitsMOs = 0
GetsHitByMOs = 1
ScriptPath = Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua
SpriteFile = ContentFile
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.png
FrameCount = 2
Expand Down Expand Up @@ -241,11 +240,19 @@ AddDevice = HDFirearm
CopyOf = Magazine FT-200
Flash = Attachable
CopyOf = Jet Flame B
PreFireSound = SoundContainer
AttenuationStartDistance = 195
AddSound = ContentFile
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac
FireSound = SoundContainer
AttenuationStartDistance = 195
AddSound = ContentFile
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Loop.flac
LoopSetting = -1
DeactivationSound = SoundContainer
AttenuationStartDistance = 195
AddSound = ContentFile
FilePath = Browncoats.rte/Devices/Weapons/Heatlance/Sounds/End.flac
EmptySound = SoundContainer
AddSound = ContentFile
FilePath = Base.rte/Sounds/Devices/EmptyClick1.flac
Expand Down
13 changes: 0 additions & 13 deletions Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua

This file was deleted.

Binary file modified Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac
Binary file not shown.
1 change: 1 addition & 0 deletions Dummy.rte/Devices/Weapons/Destroyer/Destroyer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ AddAmmo = AEmitter
PushesEmitter = 0
InheritsVel = 0
EmissionSound = SoundContainer
PresetName = Destroyer Emission Sound
AttenuationStartDistance = 140
AddSound = ContentFile
FilePath = Dummy.rte/Devices/Weapons/Destroyer/Sounds/ProjectileLoop1.flac
Expand Down
22 changes: 8 additions & 14 deletions Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ function Create(self)
--The following timer prevents a glitch where you can fire twice by putting the gun inside the inventory while charging
self.inventorySwapTimer = Timer();
self.inventorySwapTimer:SetSimTimeLimitMS(math.ceil(TimerMan.DeltaTimeMS));
self.activeSound = CreateSoundContainer("Destroyer Emission Sound", "Dummy.rte");
end
function Update(self)
if self.Magazine then
if self.inventorySwapTimer:IsPastSimTimeLimit() then
if self.activeSound then
AudioMan:StopSound(self.activeSound);
self.activeSound = nil;
end
self.activeSound:Stop();
self.charge = 0;
end
self.inventorySwapTimer:Reset();
Expand Down Expand Up @@ -48,11 +46,11 @@ function Update(self)
if self:IsActivated() then
self:Deactivate();

if self.activeSound then
AudioMan:SetSoundPosition(self.activeSound, self.Pos);
AudioMan:SetSoundPitch(self.activeSound, self.charge);
if self.activeSound:IsBeingPlayed() then
self.activeSound.Pos = self.Pos;
self.activeSound.Pitch = self.charge;
else
self.activeSound = AudioMan:PlaySound("Dummy.rte/Devices/Weapons/Destroyer/Sounds/ProjectileLoop1.flac", self.Pos, -1, -1, 100, 0, 100, false);
self.activeSound:Play(self.Pos);
end
if not self.chargeTimer:IsPastSimTimeLimit() then
self.charge = self.chargeTimer.ElapsedSimTimeMS/self.chargeDelay;
Expand Down Expand Up @@ -88,13 +86,9 @@ function Update(self)
MovableMan:AddParticle(par);

self.charge = 0;
AudioMan:StopSound(self.activeSound);
self.activeSound = nil;
self.activeSound:Stop();
end
end
function Destroy(self)
if self.activeSound then
AudioMan:StopSound(self.activeSound);
self.activeSound = nil;
end
self.activeSound:Stop();
end

0 comments on commit 65e9ab4

Please sign in to comment.