diff --git a/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.ini b/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.ini index a6261f9e0..c663eb4ec 100644 --- a/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.ini +++ b/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.ini @@ -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 @@ -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 diff --git a/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua b/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua deleted file mode 100644 index b9abc56ec..000000000 --- a/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua +++ /dev/null @@ -1,13 +0,0 @@ -function Update(self) - if self:IsActivated() and self.RoundInMagCount > 0 then - if not self.triggerPulled then - AudioMan:PlaySound("Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac", self.MuzzlePos); - end - self.triggerPulled = true; - else - if self.triggerPulled then - AudioMan:PlaySound("Browncoats.rte/Devices/Weapons/Heatlance/Sounds/End.flac", self.MuzzlePos); - end - self.triggerPulled = false; - end -end \ No newline at end of file diff --git a/Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac b/Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac index b7c0ba5ab..57b200d2b 100644 Binary files a/Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac and b/Browncoats.rte/Devices/Weapons/Heatlance/Sounds/Start.flac differ diff --git a/Dummy.rte/Devices/Weapons/Destroyer/Destroyer.ini b/Dummy.rte/Devices/Weapons/Destroyer/Destroyer.ini index 08cadd7db..a80a21e59 100644 --- a/Dummy.rte/Devices/Weapons/Destroyer/Destroyer.ini +++ b/Dummy.rte/Devices/Weapons/Destroyer/Destroyer.ini @@ -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 diff --git a/Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua b/Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua index 3a7cff82f..72ed60cbb 100644 --- a/Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua +++ b/Dummy.rte/Devices/Weapons/Destroyer/DestroyerCannon.lua @@ -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(); @@ -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; @@ -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 \ No newline at end of file