diff --git a/lua/entities/gmod_wire_adv_microphone.lua b/lua/entities/gmod_wire_adv_microphone.lua index 429107c8ce..a43b5ee0a6 100644 --- a/lua/entities/gmod_wire_adv_microphone.lua +++ b/lua/entities/gmod_wire_adv_microphone.lua @@ -76,10 +76,10 @@ local function Mic_SetLive(self, isLive) self:AddEFlags(EFL_FORCE_CHECK_TRANSMIT) end - if isLive then + if isLive then if LiveMics[1] == nil then -- Adding first microphone to live list hook.Add("PlayerCanHearPlayersVoice", "Wire.AdvMicrophone", PlayerCanHearPlayersVoice_Hook) - end + end if not table.HasValue(LiveMics, self) then table.insert(LiveMics, self) diff --git a/lua/entities/gmod_wire_adv_speaker.lua b/lua/entities/gmod_wire_adv_speaker.lua index e0653f7d62..c55c39e109 100644 --- a/lua/entities/gmod_wire_adv_speaker.lua +++ b/lua/entities/gmod_wire_adv_speaker.lua @@ -34,7 +34,7 @@ if SERVER then function ENT:Think() if not self:GetActive() then return end - + local mic = self:GetMicrophone() if not IsValid(mic) or not mic:GetActive() then return end diff --git a/lua/wire/soundlib.lua b/lua/wire/soundlib.lua index 54fa9253ec..a7f78c9e30 100644 --- a/lua/wire/soundlib.lua +++ b/lua/wire/soundlib.lua @@ -29,8 +29,8 @@ local function WavIsLooped_Impl(path) local id, len = Riff_ReadChunkHeader(fil) if id == "cue " or id == "smpl" then resultid = id break end if id == nil then - ErrorNoHaltWithStack("WavIsLooped_Impl: Can't analyze file ", path) - return false + ErrorNoHaltWithStack("WavIsLooped_Impl: Can't analyze file ", path) + return false end -- Some error local p1 = fil:Tell() @@ -145,7 +145,7 @@ end function DCACHE:Think() local ent = self._ent if not IsValid(ent) then return end - + local plys = {} self.PlayersInRange = plys