commit 5fa10eb47e05061c5e64e0b715d1ef84d67053e4 Author: cheetah Date: Wed Oct 19 02:48:54 2022 +0200 first commit diff --git a/lua/autorun/controller.lua b/lua/autorun/controller.lua new file mode 100644 index 0000000..da9387f --- /dev/null +++ b/lua/autorun/controller.lua @@ -0,0 +1,778 @@ + +Ambience = Ambience or {} +Ambience.ActiveSounds = Ambience.ActiveSounds or {} +Ambience.Running = false +Ambience.AmbientData = {} +Ambience.StreetData = {} +Ambience.StreetLexika = {} +Ambience.ScreenVehicleData = {} +Ambience.SoundData = { + ["*"] = { + "rustsurvival/ambient/a_interior_generic_loop.wav" + } +} +Ambience.Music = { + Wanted = { + "music/hl2_song3.mp3", + "music/hl2_song4.mp3", + "music/hl2_song6.mp3", + "music/hl2_song29.mp3", + "music/hl2_song16.mp3", + "music/hl1_song10.mp3", + "music/hl2_song20_submix0.mp3", + }, + Normal = { + "music/hl2_song31.mp3", + "music/hl1_song11.mp3", + "music/hl2_song14.mp3", + "music/hl2_song12_long.mp3", + "music/hl1_song25_remix3.mp3", + "music/hl2_song31.mp3", + "music/hl1_song17.mp3", + "music/hl2_song8.mp3", + }, + Weird = { + "music/hl2_song13.mp3", + "music/hl2_song17.mp3", + "music/hl2_song30.mp3", + "music/hl1_song15.mp3", + "music/hl2_song32.mp3", + "music/hl2_song33.mp3", + "music/hl2_song19.mp3", + }, +} +Ambience.ActiveMusicTheme = 0 +Ambience.Fresh = true +Ambience.CurrentRegion = "" +Ambience.CurrentZone = "" + +Ambience.RenderedStreetID = -1 +Ambience.DownloadCount = 0 + +Ambience.CurrentStreetID = 0 +Ambience.ClosestNodeData = nil +Ambience.ClosestNode = Vector(0,0,0) +Ambience.ClosestNodeDistance = 600000 + +Ambience.GraphData = {} +Ambience.ScapeData = {} +Ambience.WorldZ = 0 + +AMBIENCE_PACKET_AMBIENT = 0 +AMBIENCE_PACKET_STREET = 1 +AMBIENCE_PACKET_LEXIKA = 2 +AMBIENCE_PACKET_SVDATA = 3 +AMBIENCE_PACKET_SCAPE = 4 +AMBIENCE_PACKET_GRAPH = 5 + +if SERVER then AddCSLuaFile() end +if CLIENT then + local PANEL = {} + function PANEL:Init() + + self:SetSize( 24, 24 ) + self:NoClipping( true ) + + self.imgPanel = vgui.Create( "DImage", self ); + self.imgPanel:SetImage( "icon16/script.png" ); + self.imgPanel:SetSize( 16, 16 ) + self.imgPanel:SetPos( 4, 4 ) + + self.imgPanel:SetAlpha( 30 ) + + self.BoxW = 0 + self.BoxH = 0 + + end + function PANEL:SetUp( name ) + + local ext = string.GetExtensionFromFilename( name ); + + if ( ext == "data" ) then + self.imgPanel:SetImage( "icon16/script.png" ); + /*elseif ( ext == "vtf" ) then + self.imgPanel:SetImage( "icon16/palette" ); + elseif ( ext == "mdl" ) then + self.imgPanel:SetImage( "icon16/brick_add" ); + elseif ( ext == "wav" ) then + self.imgPanel:SetImage( "icon16/sound" );*/ + end + + self.imgPanel:AlphaTo( 255, 0.2, 0 ) + + end + function PANEL:Update( f, status, name, size ) + + self.status = status + self.f = f; + self.size = size + + if ( self.name != name ) then + + self:SetUp( name ) + self.name = name + + end + + end + function PANEL:Think() + + if ( self.Bouncing ) then + + local ft = FrameTime() * 20 + + self.yvel = self.yvel + 2.0 * ft + self.xvel = math.Approach( self.xvel, 0.0, ft * 0.01 ) + + self.xpos = self.xpos + self.xvel * ft * 3 + self.ypos = self.ypos + self.yvel * ft * 3 + + if ( self.ypos > (ScrH() - 24) ) then + + self.ypos = (ScrH() - 24) + self.yvel = self.yvel * -0.6 + self.xvel = self.xvel * 0.8 + + end + + self:SetPos( self.xpos, self.ypos ) + + end + + end + function PANEL:Paint() + + local r = 255 - 255 * self.f + local g = 255 + local b = 255 - 255 * self.f + local a = self.imgPanel:GetAlpha() + + if ( self.f == 1.0 && !self.Bouncing ) then + + r = 255 + g = 55 + math.Rand( 0, 200 ) + b = 5 + + end + + if ( self.DownloadFailed ) then + r = 255 + g = 50 + b = 50 + end + + draw.RoundedBox( 4, 0, 0, self:GetWide(), self:GetTall(), Color( 20, 20, 20, a * 0.4 ) ) + draw.RoundedBox( 4, 1, 1, self:GetWide()-2, self:GetTall()-2, Color( r, g, b, a * 0.7 ) ) + + // If the file is bigger than 3MB, give us some info. + if ( self.f < 1.0 && self.size > (1024 * 1024 * 3) ) then + self:DrawSizeBox( a ) + end + + end + function PANEL:DrawSizeBox( a ) + + local x = (self.BoxW - self:GetWide()) * -0.5 + local txt = math.Round( self.f * 100, 2 ) .."% of ".. string.NiceSize( self.size ) + + self.BoxW, self.BoxH = draw.WordBox( 4, x, self.BoxH * -1.1, txt, "DefaultSmall", Color( 50, 55, 60, a * 0.8 ), Color( 255, 255, 255, a ) ) + + end + function PANEL:Bounce() + + local x, y = self:LocalToScreen( 0, 0 ) + self:SetParent( GetHUDPanel() ) + self:SetPos( x, y ) + + self.Bouncing = true + + self.xvel = math.random( -12, 12 ) + self.yvel = math.random( -20, -10 ) + + self.xpos = x + self.ypos = y + + self.imgPanel:AlphaTo( 0, 1, 1 ) + + end + function PANEL:Failed() + self.DownloadFailed = true; + end + vgui.Register( "GM12_DContentDownload", PANEL, "DPanel" ) + local PANEL = {} + function PANEL:Init() + + self:SetSize( 256, 100 ) + self:SetPos( 0, ScrH() + 10 ) + self:SetZPos( 100 ) + + end + function PANEL:Think() + + self:SetParent(GetHUDPanel()) + + if ( self.LastActivity && (SysTime() - self.LastActivity) > 2 ) then + + self:MoveTo( self.x, ScrH() + 5, 0.5, 0.5 ) + self.LastActivity = nil; + self.MaxFileCount = 0 + + end + + for k, v in pairs( Downloads ) do + + local x = (self:GetWide() * 0.5) + math.sin( SysTime() + k*-0.43 ) * self:GetWide() * 0.45 + local y = (20) + math.cos( SysTime() + k*-0.43 ) * 20 * 0.5 + v:SetPos( x-13, y ) + v:SetZPos( y ) + + v.accel = accel; + + end + + end + function PANEL:OnActivity( dlt ) + + if ( self.LastActivity == nil ) then + self:MoveTo( self.x, ScrH() - self:GetTall() + 20, 0.1 ) + end + + self.LastActivity = SysTime() + + end + function PANEL:PerformLayout() + + self:CenterHorizontal() + + end + function PANEL:Add( p ) + + local x, y = self:GetPos() + local ypos = math.random( 20, 25 ) + + end + vgui.Register( "GM12_DContentMain", PANEL, "Panel" ) + if(Main) then Main:Remove() end + Downloads = {} + local Main = nil + + function UpdatePackageDownloadStatus( id, name, f, status, size ) + + if ( !Main ) then + Main = vgui.Create("GM12_DContentMain") + end + + local dl = Downloads[ id ] + + if ( dl == nil ) then + + dl = vgui.Create( "GM12_DContentDownload", Main ) + dl.Velocity = Vector( 0, 0, 0 ); + dl:SetAlpha(255) + Downloads[ id ] = dl + Main:Add( dl ) + + end + + dl:Update( f, status, name, size ); + + if ( status == "success" ) then + + dl:Bounce() + Downloads[ id ] = nil + surface.PlaySound( "hl1/fvox/fuzz.wav" ) + + timer.Simple( 2, function() + dl:Remove() + end ) + end + + if ( status == "failed" ) then + + dl:Failed() + Downloads[ id ] = nil + surface.PlaySound( "hl1/fvox/buzz.wav" ) + + timer.Simple( 2, function() + dl:Remove() + end ) + end + + Main:OnActivity( Downloads ) + + end + /* + Ende Toybox Download Boxen + */ + + Ambience.CEnabled = CreateClientConVar( "soundmaster_enabled","1",true,false,"Should the Soundmaster be on?") + cvars.AddChangeCallback("soundmaster_enabled",function(cvar,old,new) + if old == "0" and new == "1" then + Ambience.Fresh = true + end + if old == "1" and new == "0" then + Ambience.Stop() + end + end) + + Ambience.CDebugEnabled = CreateClientConVar( "soundmaster_debug_enabled","0",true,false,"Debug Only for Developer Job") + Ambience.splodesprite = Material("sprites/light_glow04") + Ambience.DebugTexture = Material("dev/dev_materialmodify") + function Ambience.ClosestLineIntersection(a,b,p) + local AP = p - a + local AB = b - a + + local magnitudeAB = AB:LengthSqr() + local ABAPproduct = AP:Dot(AB) + local distance = ABAPproduct / magnitudeAB + if distance < 0 then + return a, (distance*AB):LengthSqr() + elseif distance > 1 then + return b, (distance*AB):LengthSqr() + else + return a + AB * distance , (distance*AB):LengthSqr() + end + return Vector(0,0,0),23456789 + end + function Ambience.IsInRegion(regionRect) + local lp = LocalPlayer():EyePos() + local rs = regionRect.Start + local re = regionRect.End + if lp.x >= re.x and lp.x <= rs.x and + lp.y >= re.y and lp.y <= rs.y and + lp.z >= rs.z and lp.z <= re.z + then + return true + end + return false + end + function Ambience.GetMusic() + if(Ambience.ActiveMusicTheme == 0) then return Ambience.Music.Normal[math.random(0,#Ambience.Music.Normal-1)] end + if(Ambience.ActiveMusicTheme == 1) then return Ambience.Music.Weird[math.random(0,#Ambience.Music.Weird-1)] end + if(Ambience.ActiveMusicTheme == 2) then return Ambience.Music.Wanted[math.random(0,#Ambience.Music.Wanted-1)] end + end + function Ambience.Think() + if Ambience.Fresh == true then + Ambience.Fresh = false + if Ambience.CEnabled:GetBool() == true then + local delayedStart = false + /*if Ambience.ActiveMusic then + Ambience.ActiveMusic:ChangeVolume(0,2) + timer.Simple(2,function() + Ambience.ActiveMusic:Stop() + Ambience.ActiveMusic = nil + end) end*/ + if Ambience.ActiveSounds and table.Count(Ambience.ActiveSounds) > 0 then + Ambience.Stop() + delayedStart = true + end + local function timedStart() + if LocalPlayer() and IsValid(LocalPlayer()) then Ambience.Init() end + hook.Add("Initalize","Ambience.Init",Ambience.Init) + net.Receive("MapData.Request",function(len) + Ambience.Init() + end) + end + if delayedStart then timer.Simple(2.3,timedStart) else timedStart() end + end + end + if Ambience.Running == false then return end + + Ambience.ClosestNodeDistance = 600000 + if Ambience.AmbientData then + local MapData = Ambience.AmbientData + Ambience.ScapeDatas = nil + Ambience.CurrentRegion = "" + Ambience.CurrentZone = -1 + for _,regionName in pairs(MapData) do + for __,regionRect in pairs(regionName) do + local xc = (255 / table.Count(regionName)) * __ + local c = Color(255*xc,255 - (255*xc),0,20) + if Ambience.IsInRegion(regionRect) then + Ambience.CurrentRegion = _ + Ambience.CurrentZone = __ + end + end + end + if Ambience.AmbientData[Ambience.CurrentRegion] and Ambience.AmbientData[Ambience.CurrentRegion][Ambience.CurrentZone] then + Ambience.ScapeDatas = Ambience.AmbientData[Ambience.CurrentRegion][Ambience.CurrentZone].Scape + end + for scapeName,snd in pairs(Ambience.ActiveSounds) do + if not Ambience.CheckConditions(scapeName) or not Ambience.ScapeDatas or not Ambience.ScapeDatas[scapeName] then + Ambience.FadeOut(scapeName) + end + end + if Ambience.ScapeDatas then + for _,scapeName in pairs(Ambience.ScapeDatas) do + if Ambience.CheckConditions(scapeName) then + Ambience.FadeIn(scapeName) + end + end + end + --Ambience.SetStatus("Region="..Ambience.CurrentRegion,1) + --Ambience.SetStatus("Zone="..Ambience.CurrentZone,3) + end + if Ambience.StreetData and LocalPlayer():InVehicle() then + local lpPos = LocalPlayer():GetPos() + local traceRes = util.TraceLine({ + start = lpPos, + endpos = lpPos - Vector(0,0,2000), + mask = MASK_SOLID_BRUSHONLY, + filter = LocalPlayer() + }) + Ambience.WorldZ = traceRes.Hit and traceRes.HitPos.z or Ambience.WorldZ + local StreetData = Ambience.StreetData + local StreetLexika = Ambience.StreetLexika + local lpp = Vector(lpPos.x,lpPos.y,0) + for _,node in pairs(StreetData) do + local z = LocalPlayer():GetPos().z + local intersects, distance = Ambience.ClosestLineIntersection(node.Start,node.End,lpp) + if Vector(node.Start.x,node.Start.y,0):Distance(lpp) > 512 and Vector(node.End.x,node.End.y,0):Distance(lpp) > 512 and intersects:Distance(lpp) > 512 then continue end + local la1 = node.Start:Distance(lpp) < node.End:Distance(lpp) and node.Start or node.End + local la2 = node.Start:Distance(lpp) > node.End:Distance(lpp) and node.Start or node.End + la1 = LerpVector(0.5,la1,la2) + + local intersects, distance = Ambience.ClosestLineIntersection(la1,la2,lpp) + local distA = Ambience.ClosestNode:Distance(intersects) + local distB = intersects:Distance(lpp) + --MsgN(_ .. "=DistA="..math.Round(distA).." DistB="..math.Round(distB)) + if Ambience.ClosestNode and distA > distB and Ambience.CurrentStreetID != node.StreetID then + --MsgN(distA.." < ".. distB .. " changing to ".. (Ambience.StreetLexika[node.StreetID] or "")) + Ambience.ClosestNodeData = node + Ambience.ClosestNode = intersects + Ambience.ClosestNodeDistance = distance + Ambience.CurrentStreetID = node.StreetID + end + end + if Ambience.ClosestNodeData then + --PrintTable(Ambience.ClosestNodeData.ConnectedWith or {}) + end + end + if Ambience.ActiveSounds then + local u = 0 + for i,k in pairs(Ambience.ActiveSounds) do + if k.fade then + u=u+1 + if k.targetFade > 0 then + if not k.Sound then + --MsgN("Creating "..i) + Ambience.CreateSound(i,k) + if Ambience.ActiveSounds[i] == nil then + continue + end + end + if k.Sound and k.Sound:IsPlaying() == false then + k.Sound:ChangeVolume(0,0) + k.Sound:Play() + --MsgN("Playing "..i) + end + else + if k.Sound and k.Sound:IsPlaying() == true then + k.Sound:Stop() + k.Sound = nil + --MsgN("Destroying "..i) + end + end + --Ambience.SetStatus("Vol["..math.Round(k.targetFade,2).."] = "..i,u) + if k.Sound then + k.Sound:ChangeVolume(k.targetFade*(k.volume or 1)*(LocalPlayer():InVehicle() and 0.5 or 1),0) + end + Ambience.ActiveSounds[i].targetFade = Lerp(0.002*FrameTime(),Ambience.ActiveSounds[i].fade,Ambience.ActiveSounds[i].targetFade) + end + end + end + /*if not Ambience.ActiveMusic then + local pth = Ambience.GetMusic() + MsgN("playing Music "..pth) + Ambience.ActiveMusic = CreateSound(game.GetWorld(),pth) + Ambience.ActiveMusic:SetSoundLevel(0) + Ambience.ActiveMusic:ChangeVolume(0,0) + Ambience.ActiveMusic:Play() + Ambience.ActiveMusic:ChangeVolume(0.2,5) + end + if Ambience.ActiveMusic and Ambience.ActiveMusic:IsPlaying() == false then + Ambience.ActiveMusic = nil + end*/ + end + function Ambience.DebugDeep(status,scape) + Ambience.ActiveSounds[scape].debug = status + end + function Ambience.CheckConditions(scapeName) + if not Ambience.ActiveSounds[scapeName] then MsgN(scapeName.." doesnt exists, reutrning false") return false end + if Ambience.ActiveSounds[scapeName].cond == true then return true end + local weather = SW.GetCurrentWeather() and (SW.GetCurrentWeather().ID or "none") or "none" + local catastrophicWeather = (weather == "rain" or weather == "storm" or weather == "blizzard") + local rainyWeather = (weather == "rain" or weather == "storm") + for i,k in pairs(Ambience.ActiveSounds[scapeName].cond) do + if k == "SW.Day" and (SW.Time > 20.5 or SW.Time < 4) then Ambience.DebugDeep('SW.Day',scapeName) return false end + if k == "SW.Night" and (SW.Time < 20 and SW.Time > 4.5) then Ambience.DebugDeep('SW.Night',scapeName) return false end + if k == "SW.DryWeather" and catastrophicWeather then Ambience.DebugDeep('SW.DryWeather',scapeName) return false end + if k == "SW.InVehicle" and not LocalPlayer():InVehicle() then Ambience.DebugDeep('SW.InVehicle',scapeName) return false end + if k == "!SW.InVehicle" and LocalPlayer():InVehicle() then Ambience.DebugDeep('!SW.InVehicle',scapeName) return false end + if k == "SW.RainWeather" and not rainyWeather then Ambience.DebugDeep('SW.RainWeather',scapeName) return false end + if k == "SW.WindWeather" and not catastrophicWeather then Ambience.DebugDeep('SW.WindWeather',scapeName) return false end + end + Ambience.DebugDeep("True",scapeName) + return true + end + function Ambience.Node(_,node,ps) + if not LocalPlayer():InVehicle() then return end + local lpPos = LocalPlayer():GetVehicle():GetPos() + local rotPl = LocalPlayer():GetVehicle():GetAngles().yaw + local rr = 90+45 + local rot = Angle(0,EyeAngles().yaw-90,90) + local pos = Vector(ps.x,ps.y,Ambience.WorldZ) + rot:SnapTo("y",30) + --if Ambience.RenderedStreetID[node.StreetID] then return false end + --Ambience.RenderedStreetID[node.StreetID] = true + local cc = Vector(ps.x,ps.y,0):Distance(Vector(lpPos.x,lpPos.y,0)) <= (512+256) + --cam.Start3D2D(pos,rot,1) + -- draw.SimpleText(Ambience.StreetLexika[node.StreetID].."[".._.."]","DermaLarge",0,-60,MF4Config.MainColor,0,1) + --cam.End3D2D() + end + function Ambience.DrawGPSInt(w,h) + surface.SetDrawColor(80,80,80) + surface.DrawRect(0,0,w,h) + surface.SetDrawColor(255,0,0) + surface.DrawLine(0,20,50,80) + if Ambience.StreetData then + local txt = Ambience.StreetLexika[Ambience.CurrentStreetID] or "-" + surface.SetFont("matf4_job") + local tw,th = surface.GetTextSize(txt) + draw.SimpleText(txt,"matf4_job",w/2,h-th*2,color_white,1,1) + end + end + Ambience.GPSRenderTarget = nil + Ambience.GPSRenderTargetMat = nil + function Ambience.DrawGPS(w,h) + Ambience.GPSRenderTarget = GetRenderTarget("gps",w,h,false) + local Scrw,Scrh = ScrW(),ScrH() + + render.PushRenderTarget(Ambience.GPSRenderTarget) + cam.Start2D() + --render.OverrideAlphaWriteEnable(true, true) + Ambience.DrawGPSInt(w,h) + cam.End2D() + render.PopRenderTarget() + + if not Ambience.GPSRenderTargetMat then + Ambience.GPSRenderTargetMat = CreateMaterial("gpsrt","UnlitGeneric",{ + ["$basetexture"] = Ambience.GPSRenderTarget + }) + end + + if Ambience.GPSRenderTargetMat then + surface.SetDrawColor(255,255,255) + surface.SetMaterial(Ambience.GPSRenderTargetMat) + surface.DrawTexturedRect(0,0,w,h) + else + surface.SetDrawColor(255,0,0) + surface.DrawRect(0,0,w,h) + end + end + function Ambience.Debug(hud) + if Ambience.Running == false then return end + if LocalPlayer() and LocalPlayer():InVehicle() and Ambience.ScreenVehicleData and Ambience.ScreenVehicleData[LocalPlayer():GetVehicle():GetModel()] then + local veh = LocalPlayer():GetVehicle() + local data = Ambience.ScreenVehicleData[veh:GetModel()] + --MsgN(veh:WorldToLocal(LocalPlayer():GetEyeTrace().HitPos)) + --MsgN(veh:WorldToLocalAngles((LocalPlayer():EyePos() - LocalPlayer():GetEyeTrace().HitPos):Angle())) + cam.Start3D2D(veh:LocalToWorld(data.lp),veh:LocalToWorldAngles(data.la),0.025) + Ambience.DrawGPS(data.w,data.h) + cam.End3D2D() + --MsgN(LocalPlayer():GetVehicle():GetModel()) + end + if Ambience.StreetData and not hud and LocalPlayer():InVehicle() then + --render.SetColorMaterial() + local StreetData = Ambience.StreetData + local StreetLexika = Ambience.StreetLexika + local lpPos = LocalPlayer():GetPos() + local z = LocalPlayer():GetPos().z + local rotPl = LocalPlayer():GetAngles().yaw + Ambience.RenderedStreetID = {} + for _,node in pairs(StreetData) do + if Vector(node.Start.x,node.Start.y,drawZS):Distance(LocalPlayer():GetPos()) > 4000 and Vector(node.End.x,node.End.y,drawZS):Distance(LocalPlayer():GetPos()) > 4000 then continue end + if Vector(node.Start.x,node.Start.y,0):Distance(Vector(lpPos.x,lpPos.y,0)) <= 4000 then + Ambience.Node(_,node,Ambience.ClosestLineIntersection(node.Start,node.End,Vector(lpPos.x,lpPos.y,0))) + --render.DrawLine(Vector(node.Start.x,node.Start.y,Ambience.WorldZ),Vector(node.End.x,node.End.y,Ambience.WorldZ),Ambience.CurrentStreetID == node.StreetID and Color(200,0,0) or Color(0,255,255),false) + end + end + end + if (LocalPlayer():Team() == TEAM_DEV or GetHostName() == "Garry's Mod") and Ambience.CDebugEnabled:GetInt() > 0 then // or LocalPlayer():SteamID() == "STEAM_0:1:46594887" then + if table.Count(Ambience.ActiveSounds) > 0 then + surface.SetFont("TargetID") + local _ignore,fontH = surface.GetTextSize("0") + local extraLines = 1 + (Ambience.ScapeDatas and (1 + table.Count(Ambience.ScapeDatas)) or 0) + local w,h,y = 420,fontH*table.Count(Ambience.ActiveSounds) + fontH*extraLines,0 + local x = ScrW()-w + surface.SetDrawColor(80,80,80,120) + surface.DrawRect(x,y,w,h) + surface.SetDrawColor(255,255,255,255) + local function txt(x,y,str) + surface.SetTextPos(x,y*fontH) + surface.DrawText(type(str) == "string" and str or tostring(str)) + end + local yy = 1 + surface.SetTextColor(255,255,255,255) + txt(x+0,0,"Name:") + txt(x+190,0,"F|T:") + txt(x+220,0,"Cond:") + txt(x+270,0,"DCond:") + for scapeName,scapeData in pairs(Ambience.ActiveSounds) do + if scapeData.Sound then surface.SetTextColor(0,255,0,255) else surface.SetTextColor(255,0,0,255) end + txt(x,yy,scapeName) + txt(x + 190,yy,scapeData.fade or 0) + surface.SetTextColor(91,113,255,255) + txt(x + 205,yy,scapeData.targetFade or 0) + local condRes = Ambience.CheckConditions(scapeName) + if condRes then surface.SetTextColor(0,255,0,255) else surface.SetTextColor(255,0,0,255) end + txt(x + 220,yy,condRes and "True" or "False") + if scapeData.debug then + surface.SetTextColor(91,113,255,255) + txt(x + 270,yy,tostring(scapeData.debug)) + end + yy = yy + 1 + end + txt(x+0,yy,"Current Scapes: ") + yy = yy + 1 + if Ambience.ScapeDatas then + for _,NME in pairs(Ambience.ScapeDatas) do + txt(x+0,yy,NME) + yy = yy + 1 + end + end + end + if Ambience.AmbientData and 3 > 2 then + if not hud then + render.SetColorMaterial() + render.OverrideDepthEnable(true,true) + render.CullMode(MATERIAL_CULLMODE_CW) + render.SetColorMaterial() + render.SetLightingMode(2) + render.SetBlend(1) + end + local MapData = Ambience.AmbientData + for _,regionName in pairs(MapData) do + for __,regionRect in pairs(regionName) do + if not hud and Ambience.CDebugEnabled:GetInt() == 2 then + local xc = (255 / table.Count(regionName)) * __ + local c = Color(255*xc,255 - (255*xc),0,255) + if not Ambience.IsInRegion(regionRect) then + Ambience.CurrentRegion = _ + Ambience.CurrentZone = __ + render.DrawBox(regionRect.Start,Angle(0,0,0),Vector(0,0,0),Vector(regionRect.End.x - regionRect.Start.x,regionRect.End.y - regionRect.Start.y,regionRect.End.z - regionRect.Start.z),c) + render.CullMode(MATERIAL_CULLMODE_CW) + render.DrawBox(regionRect.Start,Angle(0,0,0),Vector(0,0,0),Vector(regionRect.End.x - regionRect.Start.x,regionRect.End.y - regionRect.Start.y,regionRect.End.z - regionRect.Start.z),c) + + render.DrawLine(regionRect.Start,Vector(regionRect.Start.x,regionRect.Start.y,regionRect.End.z),Color(255,255,0)) + render.DrawLine(regionRect.End,Vector(regionRect.End.x,regionRect.End.y,regionRect.Start.z),Color(0,255,255)) + end + end + if hud and Ambience.IsInRegion(regionRect) then + draw.SimpleText("REGION=".._.."/"..__,"DermaLarge",ScrW()/2,ScrH()/2 + 80,color_white,1,1) + break + end + end + end + if not hud then + render.CullMode(MATERIAL_CULLMODE_CCW) + render.OverrideDepthEnable(false,false) + render.SetLightingMode(0) + render.SetBlend(1) + end + end + end + end + function Ambience.SetStatusLoading(txt) + MsgN("[Clean Ambience]"..txt) + notification.AddProgress("Ambience.SetStatusLoading","[Clean Ambience]"..txt) + end + function Ambience.SetStatus(txt,u) + --MsgN("[Ambient]"..txt) + notification.AddProgress("Ambience.SetStatusLoading"..tostring(u or ""),"[Clean Ambience]"..txt) + --GAMEMODE:AddNotify(txt,NOTIFY_GENERIC,5) + end + function Ambience.Stop() + Ambience.DownloadCount = 0 + Ambience.Running = false + Ambience.SetStatus("Gestoppt") + for i,k in pairs(Ambience.ActiveSounds) do + if IsValid(k.Sound) then k.Sound:Stop() end + end + //if IsValid(Ambience.ActiveMusic) then Ambience.ActiveMusic:Stop() end + timer.Simple(10,function() + if not Ambience.Running then + notification.Kill("Ambience.SetStatusLoading") + end + end) + end + function Ambience.Init() + Ambience.DownloadCount = 0 + for i=0,10 do notification.Kill("Ambience.SetStatusLoading"..tostring(i)) end + if Ambience.LastInit and Ambience.LastInit + 1 >= CurTime() then return end + Ambience.LastInit = CurTime() + Ambience.GraphData = {} + Ambience.AmbientData = {} + Ambience.StreetData = {} + Ambience.StreetLexika = {} + net.Receive("MapData.MapPacketHeader",function(len) + Ambience.DownloadCount = net.ReadInt(32) + for i=1,Ambience.DownloadCount do + UpdatePackageDownloadStatus(i,"", 0,"",1) + end + end) + net.Receive("MapData.MapPacket",function(len) + local packetsRemain = net.ReadInt(32) + UpdatePackageDownloadStatus(packetsRemain,"", 1,"success",1) + Ambience.SetStatusLoading("Lade Daten ["..packetsRemain.." verbleibend]") + local packetType = net.ReadInt(32) + local packetData = net.ReadTable() + if packetType == AMBIENCE_PACKET_AMBIENT then table.Merge(Ambience.AmbientData,packetData) end + if packetType == AMBIENCE_PACKET_STREET then table.Merge(Ambience.StreetData,packetData) end + if packetType == AMBIENCE_PACKET_LEXIKA then table.Merge(Ambience.StreetLexika,packetData) end + if packetType == AMBIENCE_PACKET_SVDATA then table.Merge(Ambience.ScreenVehicleData,packetData) end + if packetType == AMBIENCE_PACKET_SCAPE then table.Merge(Ambience.ScapeData,packetData) end + if packetType == AMBIENCE_PACKET_GRAPH then table.Merge(Ambience.GraphData,packetData) end + if packetsRemain == 0 then + Ambience.SetStatus("Starte Client") + notification.Kill("Ambience.SetStatusLoading") + timer.Simple(1,function() + Ambience.Start() + notification.AddLegacy("[Clean Ambience]".."Aktiv",NOTIFY_HINT,2) + end) + end + end) + net.Start("MapData.Request") + net.SendToServer() + Ambience.SetStatus("Initialisiere") + end + function Ambience.GetSoundIndex(index) + return index + end + function Ambience.FadeIn(id) + Ambience.ActiveSounds[Ambience.GetSoundIndex(id)].fade = 1 + end + function Ambience.FadeOut(id) + Ambience.ActiveSounds[Ambience.GetSoundIndex(id)].fade = 0 + end + function Ambience.CreateSound(index,data) + local snd = CreateSound(game.GetWorld(),type(data.path) == "string" and data.path or table.Random(data.path)) + MsgN("Spawning Sound "..index) + snd:SetSoundLevel(0) + snd:ChangeVolume(0,0) + Ambience.ActiveSounds[Ambience.GetSoundIndex(index)] = {path=data.path,Sound=snd,fade=data.fade or 0,targetFade=data.targetFade or 0,volume=data.volume or 1,cond = data.cond or true} + end + function Ambience.Start() + //Ambience.ActiveMusic = nil + Ambience.Running = true + RunConsoleCommand("play","garrysmod/save_load4.wav") + notification.Kill("Ambience.SetStatusLoading") + for i,k in pairs(Ambience.ScapeData) do + Ambience.ActiveSounds[Ambience.GetSoundIndex(i)] = {path=k.path,Sound=nil,fade=0,targetFade=0,volume=k.volume or 1,cond = k.cond or true} + end + end + hook.Add("Think","Ambience.Think",Ambience.Think) + hook.Add("PostDrawOpaqueRenderables","Ambience.Debug",function() Ambience.Debug(false) end) + hook.Add("HUDPaint","Ambience.Debug",function() Ambience.Debug(true) end) + hook.Add("Initalize","Ambience.Debug",function() Ambience.Init() end) +end \ No newline at end of file diff --git a/lua/autorun/localplayer_ac.lua b/lua/autorun/localplayer_ac.lua new file mode 100644 index 0000000..2997ba9 --- /dev/null +++ b/lua/autorun/localplayer_ac.lua @@ -0,0 +1,15 @@ +/*---------------------------------------------------------— + CleanRP SoundMaster + + Copyright © 2017 4thebadwolfsky + All Rights Reserved + Website: derauto.de +—-----------------------------------------------------------*/ +AddCSLuaFile() +SoundMaster = SoundMaster or {} +function SoundMaster.PlayerMoveIn() + LocalPlayer():EmitSound( "soundmaster/localplayer_ac/" .. table.Random({"0x130015D4","0x1A68325D"}) .. ".mp3") +end +function SoundMaster.Heartbeat() + LocalPlayer():EmitSound( "soundmaster/localplayer_ac/0x0D6E1C39.mp3") +end \ No newline at end of file diff --git a/lua/autorun/meta_soundmaster.lua b/lua/autorun/meta_soundmaster.lua new file mode 100644 index 0000000..a915c7f --- /dev/null +++ b/lua/autorun/meta_soundmaster.lua @@ -0,0 +1,343 @@ +/*---------------------------------------------------------— + CleanRP SoundMaster + + Copyright © 2017 Jonas Hogeback / UltimateRP + All Rights Reserved + Website: UltimateRP.net +—-----------------------------------------------------------*/ + +------------------------------------------------------------------------- +--AC-Container +------------------------------------------------------------------------- +resource.AddFile("sound/soundmaster/ambient_ac/0xFAF134.wav") +resource.AddFile("sound/soundmaster/ambient_ac/0xFAF135.wav") +resource.AddFile("sound/soundmaster/ambient_ac/0xFAF136.wav") + +resource.AddFile("sound/soundmaster/camera_ac/0x0C4E9EBF.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x1B33E508.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x1F6744EF.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x06DAFC36.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x08D657CA.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x11AD297B.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x098D81BF.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x1114D0AA.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x1544F0A7.mp3") +resource.AddFile("sound/soundmaster/camera_ac/0x18809F85.mp3") + +resource.AddFile("sound/soundmaster/carcrash_ac/0x00CED401.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x0DF65CA9.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x0F481DDD.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x1AF0B69D.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x1F56FF6A.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x03E4DA2C.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x15E86B1D.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x18B930BF.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x0450C95F.mp3") +resource.AddFile("sound/soundmaster/carcrash_ac/0x16387ED3.mp3") + +resource.AddFile("sound/soundmaster/carexplosion_ac/0x0FEDCD9C.mp3") +resource.AddFile("sound/soundmaster/carexplosion_ac/0x1D0B27DF.mp3") + +resource.AddFile("sound/soundmaster/collision_ac/0x00B2F6BA.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x00B6707B.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x01B1AF7D.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x01C13D68.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x01C6ACF5.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x02ECC258.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x03B0EE67.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x09189558.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0A2FD124.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0B35D266.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0B3B27C4.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0C253668.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0C2F3057.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0C33C56D.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0C3B23C8.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0C5AF52C.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0D075B8C.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0D13ED57.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0D1921FC.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0D230E1D.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0D2DCE33.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0D55C45A.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0DB1E637.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0DB666FB.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0DBE55BA.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0DD6D19B.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0E1C2849.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0E6FDE7D.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0EBD19F8.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0EC309A0.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x0EC72038.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1A26BF1E.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1AF1A2E8.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1AF80920.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1B61EA9A.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1B822B29.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1BF66406.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1C9FD0EC.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1C9FE55F.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1E45B1E0.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1E5C624F.mp3") +resource.AddFile("sound/soundmaster/collision_ac/0x1E9BFFE1.mp3") + +resource.AddFile("sound/soundmaster/cash_register_ac/0x0A5C9984.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x0D62B5C8.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x0F53B289.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x0FB8E45F.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x1D58BD31.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x1E26013A.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x1E730570.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x1F3BC0B9.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x03B889B2.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x10F96434.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x019BC825.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x123E16B5.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x184F997B.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x1540AF70.mp3") +resource.AddFile("sound/soundmaster/cash_register_ac/0x066777A9.mp3") + +resource.AddFile("sound/soundmaster/explosion_ac/0x0FD726C5.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x0FF04137.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x1CAAEBB7.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x1EBDAB40.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x089D93B2.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x176EA717.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x181D66EA.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x1038E2C4.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x081086B8.mp3") +resource.AddFile("sound/soundmaster/explosion_ac/0x081086B9.wav") +resource.AddFile("sound/soundmaster/explosion_ac/0x081086BA.wav") +resource.AddFile("sound/soundmaster/explosion_ac/0x081086BB.wav") +resource.AddFile("sound/soundmaster/explosion_ac/0x081086BC.wav") +resource.AddFile("sound/soundmaster/explosion_ac/0x081086BD.wav") + +resource.AddFile("sound/soundmaster/frontend_ac/0x00CA97EA.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0AABA0E8.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0B37A9F9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0B413B72.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0C16D0A2.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0C44A41E.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0D7E3CB9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0D91BBC2.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0D116469.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0D605633.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0DEFB827.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0E7FD3A9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0E60F7B2.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0E80F359.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0E786491.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0EFF1288.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0F5EE557.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0FB135B7.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0FE5FB3B.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1A21FC9A.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1BA0D2AA.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1D8FAE56.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1D00809C.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1D745657.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1DCAE39B.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1E941898.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1F7C4E84.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1F751A54.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1F577720.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1FADC6FF.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1FC9FEEF.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x02B6FC17.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x04E96C50.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x04F682A9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x05CA67D5.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x05F84F3F.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x006B8824.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x10E0BD2B.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x11C3A2EB.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x11E10568.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x11F3FA3A.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x13A0FD34.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x14BEEADC.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x14DC0C22.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x14FC8069.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x15CC4ECC.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x18F84D60.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x19A90AD1.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x19BCC627.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x023D93B4.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x025EE67B.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x033D89C9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x035D1645.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x042C9EAD.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x042FBD33.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0057EED0.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x067C3776.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x094B1DA0.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x100C996A.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x103A752D.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x114D1C55.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x115A0619.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x119BA8D7.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x135A82A2.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x146B3B83.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x152C8678.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x157FC6E1.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0189DF00.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0224A6B9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0240A96E.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0256FE1D.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0486E2DA.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x0826AC8E.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1018C2CC.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1857EC2E.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x17730A4F.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x074729F7.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1028679F.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1107976B.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x1200589B.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/0x06264583.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_1.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_2.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_3.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_4.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_5.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_6.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_7.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_8.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_9.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_10.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_11.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_12.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_13.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_14.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_15.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/BLIP_16.mp3") +resource.AddFile("sound/soundmaster/frontend_ac/RADIO_STATIC_LOOP.mp3") + +resource.AddFile("sound/soundmaster/handcuffs_ac/0x03B5745A.mp3") +resource.AddFile("sound/soundmaster/handcuffs_ac/0x15EEA224.mp3") + +resource.AddFile("sound/soundmaster/localplayer_ac/0x0D6E1C39.mp3") +resource.AddFile("sound/soundmaster/localplayer_ac/0x1A68325D.mp3") +resource.AddFile("sound/soundmaster/localplayer_ac/0x06D84612.mp3") +resource.AddFile("sound/soundmaster/localplayer_ac/0x073E8A8C.mp3") +resource.AddFile("sound/soundmaster/localplayer_ac/0x0972C598.mp3") +resource.AddFile("sound/soundmaster/localplayer_ac/0x130015D4.mp3") +resource.AddFile("sound/soundmaster/localplayer_ac/0x131731C0.mp3") + +resource.AddFile("sound/soundmaster/player_ac/0xFAF124.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF125.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF126.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF127.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF128.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF129.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF130.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF131.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF132.mp3") +resource.AddFile("sound/soundmaster/player_ac/0xFAF133.mp3") + +resource.AddFile("sound/soundmaster/step_ac/0xFAF0E6.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0E7.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0E8.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0E9.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0E0.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0EA.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0EB.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0EC.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0ED.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF0EE.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF101.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF102.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF103.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF104.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF105.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF106.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF107.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF108.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF109.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF10A.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF10B.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF10C.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF10D.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF10E.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF110.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF111.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF112.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF113.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF114.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF115.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF116.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF117.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF118.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF119.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF120.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF121.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF122.mp3") +resource.AddFile("sound/soundmaster/step_ac/0xFAF123.mp3") + +resource.AddFile("sound/soundmaster/vending_machine_ac/0x03552660.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x03ECBDB5.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x097531DA.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x0A70157C.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x0E34BC18.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x119FC2F5.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x129C3159.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x140F470D.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x15B2EC01.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1645E267.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1B1BB6D3.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1C9F58ED.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1D1361CC.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1D1519DC.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1F6B0AF7.mp3") +resource.AddFile("sound/soundmaster/vending_machine_ac/0x1F8DFFB8.mp3") + +resource.AddFile("sound/soundmaster/weather_ac/0x0AE528B0.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0B95F40B.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0CD31F62.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0E4D225D.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0E9A13A9.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0E29F5C9.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0E299616.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0FACE51E.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0FC1D5C5.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x01E07D82.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x1C9EFEFF.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x1D8A3156.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x1E7AD9D5.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x1E805676.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x1F9684EA.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x05D20947.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x06B8CE61.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x11A57793.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x11E5A7BB.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x12ED6B95.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x0157C86A.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x16879DE0.wav") +resource.AddFile("sound/soundmaster/weather_ac/0x16879DE1.wav") +resource.AddFile("sound/soundmaster/weather_ac/0x139392D9.mp3") +resource.AddFile("sound/soundmaster/weather_ac/0x168348FE.mp3") + +------------------------------------------------------------------------- +--Food +------------------------------------------------------------------------- +resource.AddFile("sound/soundmaster/food/yumyum.mp3") +resource.AddFile("sound/soundmaster/food/yumyum2.mp3") + +resource.AddFile("sound/soundmaster/food/rulps1.mp3") +resource.AddFile("sound/soundmaster/food/rulps2.mp3") +resource.AddFile("sound/soundmaster/food/rulps3.mp3") +resource.AddFile("sound/soundmaster/food/rulps4.mp3") +resource.AddFile("sound/soundmaster/food/rulps5.mp3") + +------------------------------------------------------------------------- +--Bought +------------------------------------------------------------------------- +resource.AddFile("sound/soundmaster/bought/cash.mp3") + +------------------------------------------------------------------------- +--Essentials +------------------------------------------------------------------------- +resource.AddFile("sound/soundmaster/essentials/tear01.mp3") +resource.AddFile("sound/soundmaster/essentials/error01.mp3") +resource.AddFile("sound/soundmaster/essentials/success.wav") +resource.AddFile("sound/soundmaster/essentials/siren.wav") + +MsgN(":::SoundMaster System geladen") \ No newline at end of file diff --git a/lua/autorun/replace_sh.lua b/lua/autorun/replace_sh.lua new file mode 100644 index 0000000..0743cb9 --- /dev/null +++ b/lua/autorun/replace_sh.lua @@ -0,0 +1,107 @@ +SoundMaster = SoundMaster or {} +soundtable = {} +function soundtable.Random(data) + math.randomseed(math.random(0,255)*5) + return table.Random(data) +end +/* +stepgravel = "0xFAF102","0xFAF103","0xFAF104","0xFAF105","0xFAF106" +stepsnow = "0xFAF107","0xFAF108","0xFAF109","0xFAF10A","0xFAF10B" +*/ +//TODO: Unter-Wasser Sound ["rustsurvival/underwater_lp.wav"] +function SoundMaster.EntityEmitSound(t) + --MsgN(t.SoundName) + --MsgN(t.Entity) + /*if CLIENT and CleanDeathCam.Active then + return + end*/ + if t.SoundName == "plats/elevator_move_loop1.wav" then t.SoundName = "common/null.wav" return true end + if t.SoundName == "ambient/water/underwater.wav" then + return false + end + --[[if t.SoundName == "vcmod/surface_grind.wav" then + return false + end--]] + if t.SoundName == "npc/scanner/scanner_photo1.wav" then + t.SoundName = "soundmaster/camera_ac/"..soundtable.Random({ + "0x0C4E9EBF","0x1B33E508", + "0x1F6744EF","0x06DAFC36", + "0x08D657CA","0x11AD297B", + "0x098D81BF","0x1114D0AA", + })..".mp3" + return true + end + if string.find(t.SoundName,"physics/") and CLIENT then + if string.find(t.SoundName,"physics/wood/wood_box_footstep") then + t.SoundName = "soundmaster/step_ac/"..soundtable.Random({"0xFAF118","0xFAF119","0xFAF120","0xFAF121","0xFAF122","0xFAF123"})..".mp3" + return true + end + end + if string.find(t.SoundName,"player/footsteps/") and CLIENT then + if LocalPlayer():WaterLevel() > 1 then return false end --Unter-Wasser schritte deaktivieren + local stub = string.sub(t.SoundName,18,-5) + stub = string.sub(stub,0,string.len(stub)-1) + if stub == "grass" then + t.SoundName = "player/newfootsteps/grass"..math.random(1,4)..".wav" + return true + end + if stub == "metal" then + t.SoundName = "player/newfootsteps/metal"..math.random(1,5)..".wav" + return true + end + if stub == "sand" then + t.SoundName = "player/newfootsteps/sand"..math.random(1,5)..".wav" + return true + end + if stub == "wood" then + t.SoundName = "soundmaster/step_ac/"..soundtable.Random({"0xFAF118","0xFAF119","0xFAF120","0xFAF121","0xFAF122","0xFAF123"})..".mp3" + return true + end + if stub == "gravel" then + t.SoundName = "soundmaster/step_ac/"..soundtable.Random({"0xFAF102","0xFAF103","0xFAF104","0xFAF105","0xFAF106"})..".mp3" + return true + end + if stub == "dirt" then + t.SoundName = "soundmaster/step_ac/"..soundtable.Random({"0xFAF0E6","0xFAF0E7","0xFAF0E8","0xFAF0E9","0xFAF101"})..".mp3" + return true + end + if stub == "stone" or stub == "concrete" or stub == "tile" then + t.SoundName = "soundmaster/step_ac/"..soundtable.Random({"0xFAF10C","0xFAF10D","0xFAF10E","0xFAF110","0xFAF111","0xFAF112"})..".mp3" + return true + end + if stub == "slosh" or stub == "wade" then + t.SoundName = "soundmaster/step_ac/"..soundtable.Random({"0xFAF113","0xFAF114","0xFAF115","0xFAF116","0xFAF117"})..".mp3" + return true + end + end + if t.SoundName == "items/flashlight1.wav" then t.SoundName = "rustsurvival/flashlight_toggle.mp3" return true end + if IsValid(t.Entity) then + if t.Entity:IsVehicle() then + local replacements = { + ["physics/metal/*"] = { + "0x00CED401","0x0DF65CA9", + "0x0F481DDD","0x1AF0B69D", + "0x1F56FF6A","0x03E4DA2C", + "0x15E86B1D","0x18B930BF", + "0x0450C95F","0x16387ED3", + } + } + for i,k in pairs(replacements) do + if string.find(t.SoundName,i) then + t.SoundName = "soundmaster/carcrash_ac/"..table.Random(k)..".mp3" + return true + end + end + end + if t.Entity == Entity(0) and string.find(t.SoundName,"explode") then + t.SoundName = "rustsurvival/ambient/a_explosion.mp3" + return true + end + if t.Entity == Entity(0) and string.find(t.SoundName,"ambient") then t.SoundName = "common/null.wav" return true end + if t.Entity:IsVehicle() and string.find(t.SoundName,"explode") then + t.SoundName = "soundmaster/carexplosion_ac/"..soundtable.Random({"0x1D0B27DF","0x0FEDCD9C"})..".mp3" + return true + end + end +end +hook.Add("EntityEmitSound","SoundMaster.EntityEmitSound",SoundMaster.EntityEmitSound) \ No newline at end of file diff --git a/lua/autorun/server/bought.lua b/lua/autorun/server/bought.lua new file mode 100644 index 0000000..12c4cc1 --- /dev/null +++ b/lua/autorun/server/bought.lua @@ -0,0 +1,27 @@ +/*---------------------------------------------------------— + CleanRP SoundMaster + + Copyright © 2017 Jonas Hogeback / UltimateRP + All Rights Reserved + Website: UltimateRP.net +—-----------------------------------------------------------*/ + +SoundMaster = SoundMaster or {} + +-- SoundMaster.BoughtSound(Player(), Typ String, Mode String) +-- Example: +-- SoundMaster.BoughtSound(ply,"ca_ching", "local") +function SoundMaster.BoughtSound(activator,typ,mode) + -- Sound Type + if (typ == "ca_ching") then + pitch = math.random(70, 130) + sound = "soundmaster/bought/cash.mp3" + end + + -- Local or Global + if (mode == "global") then + activator:EmitSound(sound, 100, pitch) + elseif (mode == "local") then + activator:SendLua("LocalPlayer():EmitSound('"..sound.."', 100, "..pitch..")"); + end +end \ No newline at end of file diff --git a/lua/autorun/server/essentials.lua b/lua/autorun/server/essentials.lua new file mode 100644 index 0000000..6867ee2 --- /dev/null +++ b/lua/autorun/server/essentials.lua @@ -0,0 +1,109 @@ +/*---------------------------------------------------------— + CleanRP SoundMaster + + Copyright © 2017 Jonas Hogeback / UltimateRP + All Rights Reserved + Website: UltimateRP.net +—-----------------------------------------------------------*/ + +SoundMaster = SoundMaster or {} + +-- SoundMaster.TearSound(Player(), Typ String, Mode String) +-- Example: +-- SoundMaster.TearSound(ply,"tear01", "local") + +function SoundMaster.TearSound(activator,typ,mode) + -- Sound Type + if (typ == "random") then + pitch = math.random(70, 130) + sounds = {"soundmaster/essentials/tear01.mp3"} + sound = sounds[math.random(1, #sounds)] + end + + if (typ == "tear01") then + pitch = math.random(70, 130) + sound = "soundmaster/essentials/tear01.mp3" + end + + -- Local or Global + if (mode == "global") then + activator:EmitSound(sound, 100, pitch) + elseif (mode == "local") then + activator:SendLua("LocalPlayer():EmitSound('"..sound.."', 100, "..pitch..")"); + end +end + +-- SoundMaster.SuccessSound(Player(), Typ String, Mode String) +-- Example: +-- SoundMaster.SuccessSound(ply,"success", "local") + +function SoundMaster.SuccessSound(activator,typ,mode) + -- Sound Type + if (typ == "random") then + pitch = math.random(70, 130) + sounds = {"soundmaster/essentials/success.wav"} + sound = sounds[math.random(1, #sounds)] + end + + if (typ == "success") then + pitch = math.random(70, 130) + sound = "soundmaster/essentials/success.wav" + end + + -- Local or Global + if (mode == "global") then + activator:EmitSound(sound, 100, pitch) + elseif (mode == "local") then + activator:SendLua("LocalPlayer():EmitSound('"..sound.."', 100, "..pitch..")"); + end +end + +-- SoundMaster.ErrorSound(Player(), Typ String, Mode String) +-- Example: +-- SoundMaster.ErrorSound(ply,"error01", "local") + +function SoundMaster.ErrorSound(activator,typ,mode) + -- Sound Type + if (typ == "random") then + pitch = math.random(70, 90) + sounds = {"soundmaster/essentials/error01.mp3"} + sound = sounds[math.random(1, #sounds)] + end + + if (typ == "error01") then + pitch = math.random(70, 90) + sound = "soundmaster/essentials/error01.mp3" + end + + -- Local or Global + if (mode == "global") then + activator:EmitSound(sound, 100, pitch) + elseif (mode == "local") then + activator:SendLua("LocalPlayer():EmitSound('"..sound.."', 100, "..pitch..")"); + end +end + +-- SoundMaster.SirenSound(Player(), Typ String, Mode String) +-- Example: +-- SoundMaster.SirenSound(ply,"siren", "local") + +function SoundMaster.SirenSound(activator,typ,mode) + -- Sound Type + if (typ == "random") then + pitch = math.random(70, 130) + sounds = {"soundmaster/essentials/siren.wav"} + sound = sounds[math.random(1, #sounds)] + end + + if (typ == "siren") then + pitch = math.random(70, 130) + sound = "soundmaster/essentials/siren.wav" + end + + -- Local or Global + if (mode == "global") then + activator:EmitSound(sound, 100, pitch) + elseif (mode == "local") then + activator:SendLua("LocalPlayer():EmitSound('"..sound.."', 100, "..pitch..")"); + end +end \ No newline at end of file diff --git a/lua/autorun/server/food.lua b/lua/autorun/server/food.lua new file mode 100644 index 0000000..f94c69c --- /dev/null +++ b/lua/autorun/server/food.lua @@ -0,0 +1,34 @@ +/*---------------------------------------------------------— + CleanRP SoundMaster + + Copyright © 2017 Jonas Hogeback / UltimateRP + All Rights Reserved + Website: UltimateRP.net +—-----------------------------------------------------------*/ + +SoundMaster = SoundMaster or {} + +function SoundMaster.EatSound(activator,rulps) + local sounds = + { + {"soundmaster/food/yumyum.mp3", 2.3}, + {"soundmaster/food/yumyum2.mp3", 3} + } + + local rand = math.random(1, #sounds) + activator:EmitSound(sounds[rand][1], 100, math.random(70, 130)) + + if rulps then + timer.Simple(sounds[rand][2],function() + local sounds = { + "soundmaster/food/rulps1.mp3", + "soundmaster/food/rulps2.mp3", + "soundmaster/food/rulps3.mp3", + "soundmaster/food/rulps4.mp3", + "soundmaster/food/rulps5.mp3" + } + local rand = math.random(1, #sounds) + activator:EmitSound(sounds[rand], 100, math.random(50, 130)) + end) + end +end \ No newline at end of file diff --git a/lua/autorun/server/mapdata.lua b/lua/autorun/server/mapdata.lua new file mode 100644 index 0000000..abaa1a0 --- /dev/null +++ b/lua/autorun/server/mapdata.lua @@ -0,0 +1,1872 @@ +util.AddNetworkString("MapData.Request") +util.AddNetworkString("MapData.MapPacketHeader") +util.AddNetworkString("MapData.MapPacket") + +AMBIENCE_PACKET_AMBIENT = 0 +AMBIENCE_PACKET_STREET = 1 +AMBIENCE_PACKET_LEXIKA = 2 +AMBIENCE_PACKET_SVDATA = 3 +AMBIENCE_PACKET_SCAPE = 4 +AMBIENCE_PACKET_GRAPH = 5 + +MapData = {} +MapData.GraphData = { + ["base.outside_flash"] = { + cond = { + "vfx1.enter.city", + } + } +} +MapData.ScapeData = { + ["base.constructtone_day"] = { + path = "ambient/construct_tone.wav", + looped = true, + volume = 0.7, + cond = { + "SW.Day", + }, + }, + ["base.tunnel"] = { + path = "ambient/atmosphere/tunnel1.wav", + looped = true, + volume = 0.5, + }, + ["base.interior"] = { + path = "rustsurvival/ambient/a_interior_generic_loop.wav", + looped = true, + volume = 0.7, + }, + ["roof.airconditioner"] = { + path = "rustsurvival/ambient/a_frig_loop.wav", + looped = true, + volume = 0.7, + }, + ["base.night_creepy"] = { + path = "ambient/atmosphere/town_ambience.wav", + looped = true, + volume = 0.7, + cond = { + "SW.Night", + }, + }, + ["base.wind_bass"] = { + path = "ambient/wind/wind_bass.wav", + looped = true, + volume = 1, + }, + ["base.wind.light_day"] = { + path = "rustsurvival/ambient/a_windlight_loop.wav", + looped = true, + cond = { + "SW.Day", + }, + volume = 0.7, + }, + ["base.wind.medium_day"] = { + path = "rustsurvival/ambient/a_windmedium_loop.wav", + looped = true, + cond = { + "SW.Day", + }, + volume = 0.5 + }, + ["base.wind.medium_storm"] = { + path = "rustsurvival/ambient/a_windheavy_loop.wav", + looped = true, + cond = { + "SW.WindWeather", + }, + volume = 0.4 + }, + ["forest.birds"] = { + path = {"soundmaster/ambient_ac/0xFAF134.wav","soundmaster/ambient_ac/0xFAF135.wav","soundmaster/ambient_ac/0xFAF136.wav"}, + looped = true, + volume = 0.7, + cond = { + "SW.Day", + "SW.DryWeather", + }, + }, + ["nights.crickets"] = { + path = "rustsurvival/ambient/a_crickets_loop.wav", + looped = true, + cond = { + "SW.Night", + "SW.DryWeather", + }, + volume = 0.7, + }, + ["tech.transformer"] = { + path = "ambient/machines/power_transformer_loop_2.wav", + looped = true, + volume = 0.7, + }, + ["tech.refinery"] = { + path = "ambient/machines/refinery_loop_1.wav", + looped = true, + volume = 0.5, + }, + ["tech.factory"] = { + path = "ambient/atmosphere/factory_loop_1.wav", + looped = true, + volume = 0.5, + }, + ["base.weather.rain"] = { + path = "soundmaster/weather_ac/0x16879de0.wav", + looped = true, + cond = { + "!SW.InVehicle", + "SW.RainWeather", + }, + volume = 1, + }, + ["base.weather.raincar"] = { + path = "soundmaster/weather_ac/0x16879de1.wav", + looped = true, + cond = { + "SW.InVehicle", + "SW.RainWeather", + }, + volume = 1, + }, +} +MapData.StreetLexika = { + ["rp_evocity_v33x"] = { + [0] = "Hauptstraße", + [1] = "Rosenweg", + [2] = "Ulmer-Straße", + [3] = "Zweibrüderweg", + [4] = "Woltmanstraße", + [5] = "Willistraße", + [6] = "Wellengasse", + }, + ["rp_evoford"] = { + [0] = "Hauptstraße", + [1] = "Rosenweg", + [2] = "Ulmer-Straße", + [3] = "Zweibrüderweg", + [4] = "Woltmanstraße", + [5] = "Willistraße", + [6] = "Wellengasse", + }, +} +MapData.StreetData = { + ["rp_evocity_v33x"] = { + {--1 + StreetID = 2, + Start = Vector(-6260,-12197,0), + End = Vector(-9643,-12197,0), + }, + {--2 + StreetID = 2, + Start = Vector(-6260,-12197,0), + End = Vector(-6011,-11941,0), + }, + {--3 + StreetID = 2, + Start = Vector(-6011,-11941,0), + End = Vector(-6004,-8286,0), + }, + {--4 + StreetID = 2, + Start = Vector(-9899,-8612,0), + End = Vector(-9899,-11941,0), + }, + {--5 + StreetID = 3, + Start = Vector(-8160,-5775,0), + End = Vector(-8160,-8286,0), + }, + {--6 + StreetID = 2, + Start = Vector(-9899,-8612,0), + End = Vector(-9572,-8286,0), + }, + {--7 + StreetID = 2, + Start = Vector(-9643,-12197,0), + End = Vector(-9899,-11941,0), + }, + {--8 + StreetID = 6, + Start = Vector(-4652,-8286,0), + End = Vector(-6004,-8286,0), + }, + {--9 + StreetID = 6, + Start = Vector(-4324,-7957,0), + End = Vector(-4652,-8286,0), + }, + {--10 + StreetID = 6, + Start = Vector(-4324,-5774,0), + End = Vector(-4324,-7957,0), + }, + {--11 + StreetID = 6, + Start = Vector(-4653,-5447,0), + End = Vector(-4324,-5774,0), + }, + {--12 + StreetID = 6, + Start = Vector(-6004,-5447,0), + End = Vector(-4653,-5447,0), + }, + {--13 + StreetID = 0, + Start = Vector(-6004,-8286,0), + End = Vector(-6004,-5447,0), + }, + {--14 + StreetID = 3, + Start = Vector(-6004,-5447,0), + End = Vector(-7928,-5447,0), + }, + {--15 + StreetID = 2, + Start = Vector(-8160,-8286,0), + End = Vector(-6004,-8286,0), + }, + {--16 + StreetID = 3, + Start = Vector(-7928,-5447,0), + End = Vector(-8160,-5775,0), + }, + {--17 + StreetID = 2, + Start = Vector(-8160,-8286,0), + End = Vector(-9572,-8286,0), + }, + {--18 + StreetID = 0, + Start = Vector(-6004,-1428,0), + End = Vector(-6004,-5447,0), + }, + {--19 + StreetID = 0, + Start = Vector(-6004,-1428,0), + End = Vector(-5990,-1255,0), + }, + {--20 + StreetID = 0, + Start = Vector(-5990,-1255,0), + End = Vector(-5950,-1113,0), + }, + {--21 + StreetID = 0, + Start = Vector(-5879,-978,0), + End = Vector(-5950,-1113,0), + }, + {--22 + StreetID = 0, + Start = Vector(-5879,-978,0), + End = Vector(-5784,-865,0), + }, + {--23 + StreetID = 0, + Start = Vector(-5784,-865,0), + End = Vector(-5666,-765,0), + }, + {--24 + StreetID = 0, + Start = Vector(-5666,-765,0), + End = Vector(-5386,-656,0), + }, + {--25 + StreetID = 0, + Start = Vector(-5386,-656,0), + End = Vector(-5235,-630,0), + }, + {--26 + StreetID = 0, + Start = Vector(-5235,-630,0), + End = Vector(-4990,-630,0), + }, + {--27 + StreetID = 0, + Start = Vector(-4990,-630,0), + End = Vector(-965 ,-651,0), + }, + {--28 + StreetID = 4, + Start = Vector(-965,-651,0), + End = Vector(-966,-5716,0), + }, + {--29 + StreetID = 4, + Start = Vector(-966,-5716,0), + End = Vector(-954,-5888,0), + }, + {--30 + StreetID = 4, + Start = Vector(-954,-5888,0), + End = Vector(-907,-6056,0), + }, + {--31 + StreetID = 4, + Start = Vector(-907,-6056,0), + End = Vector(-744,-6304,0), + }, + {--32 + StreetID = 4, + Start = Vector(-744,-6304,0), + End = Vector(-628,-6400,0), + }, + {--33 + StreetID = 4, + Start = Vector(-628,-6400,0), + End = Vector(-494,-6469,0), + }, + {--34 + StreetID = 4, + Start = Vector(-494,-6469,0), + End = Vector(-149,-6525,0), + }, + {--35 + StreetID = 4, + Start = Vector(-149,-6525,0), + End = Vector(6963,-6532,0), + }, + {--36 + StreetID = 4, + Start = Vector(6963,-6532,0), + End = Vector(7112,-6512,0), + }, + {--37 + StreetID = 4, + Start = Vector(7112,-6512,0), + End = Vector(7252,-6466,0), + }, + {--38 + StreetID = 4, + Start = Vector(7252,-6466,0), + End = Vector(7504,-6306,0), + }, + {--39 + StreetID = 4, + Start = Vector(7504,-6306,0), + End = Vector(7599,-6191,0), + }, + {--40 + StreetID = 4, + Start = Vector(7599,-6191,0), + End = Vector(7667,-6058,0), + }, + {--41 + StreetID = 4, + Start = Vector(7667,-6058,0), + End = Vector(7710,-5916,0), + }, + {--42 + StreetID = 4, + Start = Vector(7710,-5916,0), + End = Vector(7724,-5766,0), + }, + {--43 + StreetID = 4, + Start = Vector(7724,-5766,0), + End = Vector(7727,-622,0), + }, + {--44 + StreetID = 4, + Start = Vector(7727,-622,0), + End = Vector(7773,-273,0), + }, + {--45 + StreetID = 4, + Start = Vector(7773,-273,0), + End = Vector(7865,65,0), + }, + {--46 + StreetID = 4, + Start = Vector(7865,65,0), + End = Vector(8032,374,0), + }, + {--47 + StreetID = 4, + Start = Vector(8032,374,0), + End = Vector(8252,650,0), + }, + {--48 + StreetID = 4, + Start = Vector(8252,650,0), + End = Vector(8524,872,0), + }, + {--49 + StreetID = 4, + Start = Vector(8524,872,0), + End = Vector(8837,1036,0), + }, + {--50 + StreetID = 4, + Start = Vector(8837,1036,0), + End = Vector(9172,1141,0), + }, + {--51 + StreetID = 4, + Start = Vector(9172,1141,0), + End = Vector(9607,1160,0), + }, + {--52 + StreetID = 4, + Start = Vector(9607,1160,0), + End = Vector(10271,1165,0), + }, + {--53 + StreetID = 4, + Start = Vector(10271,1165,0), + End = Vector(10623,1198,0), + }, + {--54 + StreetID = 4, + Start = Vector(10623,1198,0), + End = Vector(11008,1321,0), + }, + {--55 + StreetID = 4, + Start = Vector(11008,1321,0), + End = Vector(11271,1466,0), + }, + {--56 + StreetID = 4, + Start = Vector(11271,1466,0), + End = Vector(11271,1466,0), + }, + {--57 + StreetID = 4, + Start = Vector(11271,1466,0), + End = Vector(11544,1688,0), + }, + {--58 + StreetID = 4, + Start = Vector(11544,1688,0), + End = Vector(11766,1961,0), + }, + {--59 + StreetID = 4, + Start = Vector(11766,1961,0), + End = Vector(11934,2273,0), + }, + {--60 + StreetID = 4, + Start = Vector(11934,2273,0), + End = Vector(12028,2612,0), + }, + {--61 + StreetID = 4, + Start = Vector(12028,2612,0), + End = Vector(12057,2963,0), + }, + {--62 + StreetID = 4, + Start = Vector(12057,2963,0), + End = Vector(12058,6255,0), + }, + {--63 + StreetID = 4, + Start = Vector(12057,6255,0), + End = Vector(12058,11255,0), + }, + {--64 + StreetID = 4, + Start = Vector(12058,11255,0), + End = Vector(12044,11916,0), + }, + {--65 + StreetID = 0, + Start = Vector(12044,11916,0), + End = Vector(11999,12059,0), + }, + {--66 + StreetID = 0, + Start = Vector(11999,12059,0), + End = Vector(11836,12308,0), + }, + {--67 + StreetID = 0, + Start = Vector(11836,12308,0), + End = Vector(11720,12403,0), + }, + {--68 + StreetID = 0, + Start = Vector(11720,12403,0), + End = Vector(11593,12468,0), + }, + {--69 + StreetID = 0, + Start = Vector(11593,12468,0), + End = Vector(11444,12515,0), + }, + {--70 + StreetID = 0, + Start = Vector(11444,12515,0), + End = Vector(11223,12540,0), + }, + {--71 + StreetID = 0, + Start = Vector(11095,12543,0), + End = Vector(11223,12540,0), + }, + {--72 + StreetID = 0, + Start = Vector(11223,12540,0), + End = Vector(9248,12542,0), + }, + {--73 + StreetID = 0, + Start = Vector(9248,12542,0), + End = Vector(8896,12508,0), + }, + {--74 + StreetID = 0, + Start = Vector(8896,12508,0), + End = Vector(8511,12384,0), + }, + {--75 + StreetID = 0, + Start = Vector(8511,12384,0), + End = Vector(8247,12240,0), + }, + {--76 + StreetID = 0, + Start = Vector(8247,12240,0), + End = Vector(7975,12016,0), + }, + {--77 + StreetID = 0, + Start = Vector(7975,12016,0), + End = Vector(7752,11744,0), + }, + {--78 + StreetID = 0, + Start = Vector(7752,11744,0), + End = Vector(7585,11433,0), + }, + {--79 + StreetID = 0, + Start = Vector(7585,11433,0), + End = Vector(7454,10991,0), + }, + {--80 + StreetID = 0, + Start = Vector(7454,10991,0), + End = Vector(7305,10673,0), + }, + {--81 + StreetID = 0, + Start = Vector(7305,10673,0), + End = Vector(7083,10400,0), + }, + {--82 + StreetID = 0, + Start = Vector(6811,10177,0), + End = Vector(7083,10400,0), + }, + {--83 + StreetID = 0, + Start = Vector(6811,10177,0), + End = Vector(6502,10014,0), + }, + {--84 + StreetID = 0, + Start = Vector(6502,10014,0), + End = Vector(6165,9909,0), + }, + {--85 + StreetID = 0, + Start = Vector(6165,9909,0), + End = Vector(5812,9883,0), + }, + {--86 + StreetID = 0, + Start = Vector(5812,9883,0), + End = Vector(3430,9884,0), + }, + {--87 + StreetID = 0, + Start = Vector(3430,9884,0), + End = Vector(1055,9885,0), + }, + {--88 + StreetID = 0, + Start = Vector(1055,9885,0), + End = Vector(907,9900,0), + }, + {--89 + StreetID = 0, + Start = Vector(907,9900,0), + End = Vector(765,9944,0), + }, + {--90 + StreetID = 0, + Start = Vector(765,9944,0), + End = Vector(632,10014,0), + }, + {--91 + StreetID = 0, + Start = Vector(632,10014,0), + End = Vector(516,10108,0), + }, + {--92 + StreetID = 0, + Start = Vector(516,10108,0), + End = Vector(351,10356,0), + }, + {--93 + StreetID = 0, + Start = Vector(351,10356,0), + End = Vector(308,10499,0), + }, + {--94 + StreetID = 0, + Start = Vector(308,10499,0), + End = Vector(293,10650,0), + }, + {--95 + StreetID = 0, + Start = Vector(293,10650,0), + End = Vector(289,11768,0), + }, + {--96 + StreetID = 0, + Start = Vector(289,11768,0), + End = Vector(267,11916,0), + }, + {--97 + StreetID = 0, + Start = Vector(267,11916,0), + End = Vector(224,12060,0), + }, + {--98 + StreetID = 0, + Start = Vector(224,12060,0), + End = Vector(61,12308,0), + }, + {--99 + StreetID = 0, + Start = Vector(61,12308,0), + End = Vector(-55,12403,0), + }, + {--100 + StreetID = 0, + Start = Vector(-55,12403,0), + End = Vector(-188,12471,0), + }, + {--101 + StreetID = 0, + Start = Vector(-188,12471,0), + End = Vector(-331,12515,0), + }, + {--102 + StreetID = 0, + Start = Vector(-331,12515,0), + End = Vector(-553,12541,0), + }, + {--103 + StreetID = 0, + Start = Vector(-553,12541,0), + End = Vector(-1053,12541,0), + }, + {--104 + StreetID = 0, + Start = Vector(-1053,12541,0), + End = Vector(-1140,12556,0), + }, + {--105 + StreetID = 0, + Start = Vector(-1140,12556,0), + End = Vector(-1283,12600,0), + }, + {--106 + StreetID = 0, + Start = Vector(-1283,12600,0), + End = Vector(-1416,12668,0), + }, + {--107 + StreetID = 0, + Start = Vector(-1416,12668,0), + End = Vector(-1532,12763,0), + }, + {--108 + StreetID = 0, + Start = Vector(-1532,12763,0), + End = Vector(-1628,12887,0), + }, + {--109 + StreetID = 0, + Start = Vector(-1628,12887,0), + End = Vector(-1696,13012,0), + }, + {--110 + StreetID = 0, + Start = Vector(-1696,13012,0), + End = Vector(-1738,13154,0), + }, + {--111 + StreetID = 0, + Start = Vector(-1738,13154,0), + End = Vector(-1754,13304,0), + }, + {--112 + StreetID = 0, + Start = Vector(-1754,13304,0), + End = Vector(-1756,14072,0), + }, + {--113 + StreetID = 0, + Start = Vector(-1756,14072,0), + End = Vector(-1780,14221,0), + }, + {--114 + StreetID = 0, + Start = Vector(-1780,14221,0), + End = Vector(-1823,14363,0), + }, + {--115 + StreetID = 0, + Start = Vector(-1823,14363,0), + End = Vector(-1899,14492,0), + }, + {--116 + StreetID = 0, + Start = Vector(-1899,14492,0), + End = Vector(-1987,14612,0), + }, + {--117 + StreetID = 0, + Start = Vector(-1987,14612,0), + End = Vector(-2102,14708,0), + }, + {--118 + StreetID = 0, + Start = Vector(-2102,14708,0), + End = Vector(-2236,14776,0), + }, + {--119 + StreetID = 0, + Start = Vector(-2236,14776,0), + End = Vector(-2379,14820,0), + }, + {--120 + StreetID = 0, + Start = Vector(-2379,14820,0), + End = Vector(-2527,14835,0), + }, + {--121 + StreetID = 0, + Start = Vector(-2527,14835,0), + End = Vector(-2636,14845,0), + }, + {--122 + StreetID = 0, + Start = Vector(-2636,14845,0), + End = Vector(-4576,14846,0), + }, + {--123 + StreetID = 0, + Start = Vector(-4576,14846,0), + End = Vector(-4725,14818,0), + }, + {--124 + StreetID = 0, + Start = Vector(-4725,14818,0), + End = Vector(-4869,14777,0), + }, + {--125 + StreetID = 0, + Start = Vector(-4869,14777,0), + End = Vector(-4996,14701,0), + }, + {--126 + StreetID = 0, + Start = Vector(-4996,14701,0), + End = Vector(-5117,14612,0), + }, + {--127 + StreetID = 0, + Start = Vector(-5117,14612,0), + End = Vector(-5212,14495,0), + }, + {--128 + StreetID = 0, + Start = Vector(-5212,14495,0), + End = Vector(-5279,14363,0), + }, + {--129 + StreetID = 0, + Start = Vector(-5279,14363,0), + End = Vector(-5324,14220,0), + }, + {--130 + StreetID = 0, + Start = Vector(-5324,14220,0), + End = Vector(-5339,14071,0), + }, + {--131 + StreetID = 0, + Start = Vector(-5339,14071,0), + End = Vector(-5339,13002,0), + }, + {--132 + StreetID = 0, + Start = Vector(-5339,13002,0), + End = Vector(-5340,12400,0), + }, + {--133 + StreetID = 0, + Start = Vector(-5340,12400,0), + End = Vector(-5364,12251,0), + }, + {--134 + StreetID = 0, + Start = Vector(-5364,12251,0), + End = Vector(-5409,12109,0), + }, + {--135 + StreetID = 0, + Start = Vector(-5409,12109,0), + End = Vector(-5477,11976,0), + }, + {--136 + StreetID = 0, + Start = Vector(-5477,11976,0), + End = Vector(-5572,11860,0), + }, + {--137 + StreetID = 0, + Start = Vector(-5572,11860,0), + End = Vector(-5692,11770,0), + }, + {--138 + StreetID = 0, + Start = Vector(-5692,11770,0), + End = Vector(-5820,11696,0), + }, + {--139 + StreetID = 0, + Start = Vector(-5820,11696,0), + End = Vector(-5965,11654,0), + }, + {--140 + StreetID = 0, + Start = Vector(-5965,11654,0), + End = Vector(-6112,11636,0), + }, + {--141 + StreetID = 0, + Start = Vector(-6112,11636,0), + End = Vector(-6917,11636,0), + }, + {--142 + StreetID = 0, + Start = Vector(-6917,11636,0), + End = Vector(-7065,11611,0), + }, + {--143 + StreetID = 0, + Start = Vector(-7065,11611,0), + End = Vector(-7338,11495,0), + }, + {--144 + StreetID = 0, + Start = Vector(-7338,11495,0), + End = Vector(-7456,11406,0), + }, + {--145 + StreetID = 0, + Start = Vector(-7456,11406,0), + End = Vector(-7621,11156,0), + }, + {--146 + StreetID = 0, + Start = Vector(-7621,11156,0), + End = Vector(-7664,11013,0), + }, + {--147 + StreetID = 0, + Start = Vector(-7664,11013,0), + End = Vector(-7677,10865,0), + }, + {--148 + StreetID = 0, + Start = Vector(-7677,10865,0), + End = Vector(-7681,8973,0), + }, + {--149 + StreetID = 0, + Start = Vector(-7681,8973,0), + End = Vector(-5715,8972,0), + }, + {--150 + StreetID = 0, + Start = Vector(-5715,8972,0), + End = Vector(-5599,8958,0), + }, + {--151 + StreetID = 0, + Start = Vector(-5599,8958,0), + End = Vector(-5325,8844,0), + }, + {--152 + StreetID = 0, + Start = Vector(-5325,8844,0), + End = Vector(-5209,8750,0), + }, + {--153 + StreetID = 0, + Start = Vector(-5209,8750,0), + End = Vector(-5118,8633,0), + }, + {--154 + StreetID = 0, + Start = Vector(-5118,8633,0), + End = Vector(-5045,8503,0), + }, + {--155 + StreetID = 0, + Start = Vector(-5045,8503,0), + End = Vector(-5002,8360,0), + }, + {--156 + StreetID = 0, + Start = Vector(-5002,8360,0), + End = Vector(-4986,8210,0), + }, + {--157 + StreetID = 0, + Start = Vector(-4986,8210,0), + End = Vector(-4990,-630,0), + }, + {--158 + StreetID = 0, + Start = Vector(-965 ,-651,0), + End = Vector(-716,-647,0), + }, + {--159 + StreetID = 0, + Start = Vector(-716,-647,0), + End = Vector(-567,-633,0), + }, + {--160 + StreetID = 0, + Start = Vector(-567,-633,0), + End = Vector(-420,-589,0), + }, + {--161 + StreetID = 0, + Start = Vector(-420,-589,0), + End = Vector(-287,-517,0), + }, + {--162 + StreetID = 0, + Start = Vector(-287,-517,0), + End = Vector(-168,-421,0), + }, + {--163 + StreetID = 0, + Start = Vector(-168,-421,0), + End = Vector(-73,-304,0), + }, + {--164 + StreetID = 0, + Start = Vector(-73,-304,0), + End = Vector(-1,-170,0), + }, + {--165 + StreetID = 0, + Start = Vector(-1,-170,0), + End = Vector(43,-25,0), + }, + {--166 + StreetID = 0, + Start = Vector(43,-25,0), + End = Vector(58,126,0), + }, + {--167 + StreetID = 0, + Start = Vector(58,126,0), + End = Vector(59,3205,0), + }, + {--168 + StreetID = 0, + Start = Vector(59,3205,0), + End = Vector(61,4999,0), + }, + {--169 + StreetID = 0, + Start = Vector(61,4999,0), + End = Vector(61,7808,0), + }, + {--170 + StreetID = 0, + Start = Vector(61,7808,0), + End = Vector(72,7952,0), + }, + {--171 + StreetID = 0, + Start = Vector(72,7952,0), + End = Vector(115,8098,0), + }, + {--172 + StreetID = 0, + Start = Vector(115,8098,0), + End = Vector(185,8231,0), + }, + {--173 + StreetID = 0, + Start = Vector(185,8231,0), + End = Vector(280,8346,0), + }, + {--174 + StreetID = 0, + Start = Vector(280,8346,0), + End = Vector(397,8438,0), + }, + {--175 + StreetID = 0, + Start = Vector(397,8438,0), + End = Vector(528,8511,0), + }, + {--176 + StreetID = 0, + Start = Vector(528,8511,0), + End = Vector(670,8554,0), + }, + {--177 + StreetID = 0, + Start = Vector(670,8554,0), + End = Vector(820,8576,0), + }, + {--178 + StreetID = 0, + Start = Vector(820,8576,0), + End = Vector(3891,8576,0), + }, + {--179 + StreetID = 0, + Start = Vector(3891,8576,0), + End = Vector(3921,8570,0), + }, + {--180 + StreetID = 0, + Start = Vector(3921,8570,0), + End = Vector(4039,8554,0), + }, + {--181 + StreetID = 0, + Start = Vector(4039,8554,0), + End = Vector(4183,8511,0), + }, + {--182 + StreetID = 0, + Start = Vector(4183,8511,0), + End = Vector(4315,8441,0), + }, + {--183 + StreetID = 0, + Start = Vector(4315,8441,0), + End = Vector(4432,8347,0), + }, + {--184 + StreetID = 0, + Start = Vector(4432,8347,0), + End = Vector(4523,8229,0), + }, + {--185 + StreetID = 0, + Start = Vector(4523,8229,0), + End = Vector(4596,8099,0), + }, + {--186 + StreetID = 0, + Start = Vector(4596,8099,0), + End = Vector(4639,7956,0), + }, + {--187 + StreetID = 0, + Start = Vector(4639,7956,0), + End = Vector(4665,7808,0), + }, + {--188 + StreetID = 0, + Start = Vector(4665,7808,0), + End = Vector(4668,4999,0), + }, + {--189 + StreetID = 5, + Start = Vector(4668,4999,0), + End = Vector(2491,4999,0), + }, + {--190 + StreetID = 5, + Start = Vector(2491,4999,0), + End = Vector(61,4999,0), + }, + {--191 + StreetID = 5, + Start = Vector(2491,4999,0), + End = Vector(2491,3209,0), + }, + {--192 + StreetID = 5, + Start = Vector(2491,3209,0), + End = Vector(4403,3209,0), + }, + {--193 + StreetID = 5, + Start = Vector(2491,3209,0), + End = Vector(59,3209,0), + }, + {--194 + StreetID = 5, + Start = Vector(4668,4999,0), + End = Vector(4664,3454,0), + }, + {--195 + StreetID = 5, + Start = Vector(4664,3454,0), + End = Vector(4403,3209,0), + }, + }, + ["rp_evoford"] = { + }, +} + +DefaultCityScape = {"base.wind.light_day","base.night_creepy","base.interior","base.constructtone_day"} +DefaultCityScapeRoof = {"roof.airconditioner","base.wind.medium_day","base.night_creepy","base.interior","base.constructtone_day"} +DefaultTunnelScape = {"base.interior","base.tunnel","base.wind.light_day"} +DefaultFactoryScape = {"base.interior","tech.factory","base.wind.light_day"} +DefaultNatureScape = {"forest.birds","nights.crickets"} +DefaultScape = {"base.wind_bass","base.wind.medium_storm"} -- * +DefaultScapeNotTunnel = {"base.weather.rain","base.weather.raincar"} +for i,k in pairs(DefaultScape) do + table.insert(DefaultCityScape,k) + table.insert(DefaultCityScapeRoof,k) + table.insert(DefaultTunnelScape,k) + table.insert(DefaultNatureScape,k) +end +for i,k in pairs(DefaultScapeNotTunnel) do + table.insert(DefaultCityScape,k) + table.insert(DefaultCityScapeRoof,k) + table.insert(DefaultNatureScape,k) +end +MapData.AmbientData = { + ["rp_evocity_v33x"] = { + ["city"] = { + [0] = { + Scape = DefaultCityScape, + Start = Vector(-08112,-07965,60), + End = Vector(-10283,-12524,1600), + }, + [1] = { + Scape = DefaultCityScape, + Start = Vector(-10283,-07965,60), + End = Vector(-11000,-08803,1600), + }, + [2] = { + Scape = DefaultCityScape, + Start = Vector(-10843,-08803,60), + End = Vector(-11000,-10332,1600), + }, + [3] = { + Scape = DefaultCityScape, + Start = Vector(-10743,-10332,60), + End = Vector(-11000,-11956,1600), + }, + [4] = { + Scape = DefaultCityScape, + Start = Vector(-10282,-10724,60), + End = Vector(-10743,-11956,1600), + }, + [5] = { + Scape = DefaultCityScape, + Start = Vector(-03910,-07952,60), + End = Vector(-08112,-08644,1600), + }, + [6] = { + Scape = DefaultCityScape, + Start = Vector(-005676,-08644,60), + End = Vector(-6763.7,-09172.2,1600), + }, + [7] = { + Scape = DefaultCityScape, + Start = Vector(-05548,-08901,60), + End = Vector(-05676,-09669,1600), + }, + [8] = { + Scape = DefaultCityScape, + Start = Vector(-06972,-09693,60), + End = Vector(-07787,-10660,1600), + }, + [9] = { + Scape = DefaultCityScape, + Start = Vector(-06332,-09693,60), + End = Vector(-06972,-09806,1600), + }, + [10] = { + Scape = DefaultCityScape, + Start = Vector(-06332,-09717,60), + End = Vector(-06443,-10660,1600), + }, + [11] = { + Scape = DefaultCityScape, + Start = Vector(-06443,-09806,353), + End = Vector(-06971,-10659,1600), + }, + [12] = { + Scape = DefaultCityScape, + Start = Vector(-07788,-08613,-210), + End = Vector(-08112,-10682,1600), + }, + [13] = { + Scape = DefaultCityScape, + Start = Vector(-03630,-08644,450), + End = Vector(-05675,-08900,1600), + }, + [14] = { + Scape = DefaultCityScape, + Start = Vector(-05420,-10660,-60), + End = Vector(-08111,-12639,1600), + }, + [15] = { + Scape = DefaultCityScape, + Start = Vector(-05675,-09173,-60), + End = Vector(-06332,-10660,1600), + }, + [16] = { + Scape = DefaultCityScape, + Start = Vector(-4000,-5775,-60), + End = Vector(-4835,-7572,1600), + }, + [17] = { + Scape = DefaultCityScape, + Start = Vector(-4423,-4979,-60), + End = Vector(-8520,-5775,1600), + }, + [18] = { + Scape = DefaultCityScape, + Start = Vector(-7960,-5775,-60), + End = Vector(-8520,-6800,1600), + }, + [19] = { + Scape = DefaultCityScape, + Start = Vector(-5436,-5775,-60), + End = Vector(-7084,-8028,1600), + }, + [20] = { + Scape = DefaultCityScape, + Start = Vector(-7084,-6800,-60), + End = Vector(-8520,-7444,1600), + }, + [21] = { + Scape = DefaultCityScape, + Start = Vector(-7864,-7444,-60), + End = Vector(-10282,-7965,1600), + }, + [22] = { + Scape = DefaultCityScape, + Start = Vector(-7084,-7444,295), + End = Vector(-7864,-7960,1600), + }, + [23] = { + Scape = DefaultCityScape, + Start = Vector(-7084,-5775,-60), + End = Vector(-7349,-7960,1600), + }, + [24] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-7349,-5775,290), + End = Vector(-7960,-7960,1600), + }, + [25] = { + Scape = DefaultCityScape, + Start = Vector(-4000,-5119,-60), + End = Vector(-4423,-5775,1600), + }, + [26] = { + Scape = DefaultCityScape, + Start = Vector(-7860,-4476,-60), + End = Vector(-8520,-4980,1600), + }, + [27] = { + Scape = DefaultCityScape, + Start = Vector(-7926,-3178,-60), + End = Vector(-8520,-4980,1600), + }, + [28] = { + Scape = DefaultCityScape, + Start = Vector(-5456,-3456.5,-60), + End = Vector(-7926,-3955,1600), + }, + [29] = { + Scape = DefaultCityScape, + Start = Vector(-5456,-3456.5,-60), + End = Vector(-7275,-4973,1600), + }, + [30] = { + Scape = DefaultCityScape, + Start = Vector(-5456,-3456.5,-60), + End = Vector(-7275,-4979,1600), + }, + [31] = { + Scape = DefaultCityScape, + Start = Vector(-3910,-7572,-60), + End = Vector(-4835,-7964,1600), + }, + [32] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-4835,-5775,335), + End = Vector(-5434,-6480,1600), + }, + [33] = { + Scape = DefaultCityScape, + Start = Vector(-4834,-6480,-60), + End = Vector(-5060,-7950,1600), + }, + [34] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-4834,-5932,465), + End = Vector(-5437,-7950,1600), + }, + [35] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-5059,-5932,335), + End = Vector(-5437,-7573,465), + }, + [36] = { + Scape = DefaultCityScape, + Start = Vector(-5060,-6450,-60), + End = Vector(-5436,-6933,335), + }, + [37] = { + Scape = DefaultCityScape, + Start = Vector(-10282,-9700,-60), + End = Vector(-10412,-10077,1600), + }, + [38] = { + Scape = DefaultCityScape, + Start = Vector(-10418,-9451,450), + End = Vector(-10520,-10081,1600), + }, + [39] = { + Scape = DefaultCityScape, + Start = Vector(-10282,-9451,325), + End = Vector(-10418,-9700,1600), + }, + [40] = { + Scape = DefaultCityScape, + Start = Vector(-10517,-9444,450), + End = Vector(-10843,-9698,1600), + }, + [41] = { + Scape = DefaultCityScape, + Start = Vector(-10282,-8092,483), + End = Vector(-10843,-9451,1600), + }, + [42] = { + Scape = DefaultCityScape, + Start = Vector(-10282,-8802,380), + End = Vector(-10843,-9060,1600), + }, + [43] = { + Scape = DefaultCityScape, + Start = Vector(-7272,-4725,-60), + End = Vector(-7332,-4980,1600), + }, + [44] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-7272,-3950,315), + End = Vector(-7928,-4984,1600), + }, + }, + ["wendepunkt"] = { + [0] = { + Scape = DefaultNatureScape, + Start = Vector(570,630,-60), + End = Vector(-6585,-1432,1600), + }, + }, + ["city2"] = { + [0] = { + Scape = DefaultCityScape, + Start = Vector(-3974,10260,-60), + End = Vector(-9373,4091,1600), + }, + [1] = { + Scape = DefaultCityScape, + Start = Vector(-9356,8851,-60), + End = Vector(-12140,8177,1600), + }, + [2] = { + Scape = DefaultCityScape, + Start = Vector(-10907,9875,-60), + End = Vector(-12140,8851,1600), + }, + [3] = { + Scape = DefaultCityScape, + Start = Vector(-9373,9874,200), + End = Vector(-10907,8851,1600), + }, + [4] = { + Scape = DefaultCityScape, + Start = Vector(-9357,10180,-60), + End = Vector(-12122,9875,1600), + }, + [5] = { + Scape = DefaultCityScape, + Start = Vector(-9373,9483,-60), + End = Vector(-9441,9242,1600), + }, + }, + ["tunnels"] = { + [0] = { + Scape = DefaultTunnelScape, + Start = Vector(-5765,-1410,-60), + End = Vector(-6244,-3458,1600), + }, + [1] = { + Scape = DefaultTunnelScape, + Start = Vector(-4741,4114,-60), + End = Vector(-5220,614,1600), + }, + [2] = { + Scape = DefaultTunnelScape, + Start = Vector(-7429,10396,-60), + End = Vector(-7940,10181,1600), + }, + [3] = { + Scape = DefaultTunnelScape, + Start = Vector(12287,11255,-60), + End = Vector(11808,5498,1600), + }, + [4] = { + Scape = DefaultTunnelScape, + Start = Vector(-728,-1408,-60), + End = Vector(-1207,-4766,1600), + }, + [5] = { + Scape = DefaultTunnelScape, + Start = Vector(307,2698,-60), + End = Vector(-340,639,1600), + }, + }, + ["city3"] = { + [0] = { + Scape = DefaultNatureScape, + Start = Vector(-1121,-4742,-60), + End = Vector(-1762,-7603,1600), + }, + [1] = { + Scape = DefaultNatureScape, + Start = Vector(-1407,-7603,-60), + End = Vector(-1795,-8837,1600), + }, + [2] = { + Scape = DefaultNatureScape, + Start = Vector(-360,-8290,-60), + End = Vector(-1407,-8837,1600), + }, + [3] = { + Scape = DefaultNatureScape, + Start = Vector(3615,-4766,-60), + End = Vector(-1120,-7056,1600), + }, + [4] = { + Scape = DefaultNatureScape, + Start = Vector(3954,-2695,-60), + End = Vector(2323,-4766,1600), + }, + [5] = { + Scape = DefaultNatureScape, + Start = Vector(6963,-4766,-60), + End = Vector(3615,-7173,1600), + }, + [6] = { + Scape = DefaultNatureScape, + Start = Vector(10388,2907,-60), + End = Vector(5894,-4766,1600), + }, + [7] = { + Scape = DefaultNatureScape, + Start = Vector(12580,5500,-60), + End = Vector(10237,-622,1600), + }, + }, + ["city4"] = { + [0] = { + Scape = DefaultNatureScape, + Start = Vector(12924,15328,-60), + End = Vector(5811,11251,1600), + }, + [1] = { + Scape = DefaultNatureScape, + Start = Vector(9249,11251,-60), + End = Vector(5811,9366,1600), + }, + [2] = { + Scape = DefaultNatureScape, + Start = Vector(1055,15327,-60), + End = Vector(-3039,10311,1600), + }, + [3] = { + Scape = DefaultNatureScape, + Start = Vector(5811,10311,-60), + End = Vector(-1094,9366,1600), + }, + } + }, + ["rp_evoford"] = { + ["city"] = { + [0] = { + Scape = DefaultCityScape, + Start = Vector(-9313,-07965,60), + End = Vector(-10283,-12524,1600), + }, + [1] = { + Scape = DefaultCityScape, + Start = Vector(-10283,-07965,60), + End = Vector(-11000,-08803,1600), + }, + [6] = { + Scape = DefaultCityScape, + Start = Vector(-005676,-08644,60), + End = Vector(-8287,-9316,1600), + }, + [7] = { + Scape = DefaultCityScape, + Start = Vector(-3418,-8607,60), + End = Vector(-5680,-9953,1600), + }, + [8] = { + Scape = DefaultCityScape, + Start = Vector(-6332,-9317,-60), + End = Vector(-6561,-10532,1600), + }, + [9] = { + Scape = DefaultCityScape, + Start = Vector(0,0,-60), + End = Vector(0,0,1600), + }, + [10] = { + Scape = DefaultCityScape, + Start = Vector(0,0,-60), + End = Vector(0,0,1600), + }, + [11] = { + Scape = DefaultCityScape, + Start = Vector(-8280,-8663,-60), + End = Vector(-9313,-9829,1600), + }, + [12] = { + Scape = DefaultCityScape, + Start = Vector(-8109,-7795,-210), + End = Vector(-9310,-9215,1600), + }, + [13] = { + Scape = DefaultCityScape, + Start = Vector(0,0,-60), + End = Vector(0,0,1600), + }, + [14] = { + Scape = DefaultCityScape, + Start = Vector(-6331,-10531,-60), + End = Vector(-9582,-10781,1600), + }, + [17] = { + Scape = DefaultCityScape, + Start = Vector(-4423,-4979,-60), + End = Vector(-8383,-5775,1600), + }, + [18] = { + Scape = DefaultCityScape, + Start = Vector(-7960,-5775,-60), + End = Vector(-8520,-7965,1600), + }, + [19] = { + Scape = DefaultCityScape, + Start = Vector(-5436,-5775,-60), + End = Vector(-6670,-8028,1600), + }, + [20] = { + Scape = DefaultCityScape, + Start = Vector(-6964,-6800,-60), + End = Vector(-7960,-7015,1600), + }, + [21] = { + Scape = DefaultCityScape, + Start = Vector(0,0,-60), + End = Vector(0,0,1600), + }, + [22] = { + Scape = DefaultCityScape, + Start = Vector(-6964,-5775,-60), + End = Vector(-7960,-6021,1600), + }, + [23] = { + Scape = DefaultCityScape, + Start = Vector(-6670,-5775,-60), + End = Vector(-6964,-7015,1600), + }, + [24] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-7835,-6021,-60), + End = Vector(-7960,-7015,1600), + }, + [26] = { + Scape = DefaultCityScape, + Start = Vector(-7860,-4476,-60), + End = Vector(-8383,-4980,1600), + }, + [27] = { + Scape = DefaultCityScape, + Start = Vector(-7926,-3178,-60), + End = Vector(-8383,-4980,1600), + }, + [30] = { + Scape = DefaultCityScape, + Start = Vector(-5456,-3456.5,-60), + End = Vector(-7275,-4979,1600), + }, + [33] = { + Scape = DefaultCityScape, + Start = Vector(-4834,-6545,-60), + End = Vector(-5060,-7950,1600), + }, + [35] = { + Scape = DefaultCityScapeRoof, + Start = Vector(-5059,-5932,335), + End = Vector(-5437,-7573,465), + }, + [36] = { + Scape = DefaultCityScape, + Start = Vector(-5060,-6545,-60), + End = Vector(-5436,-6933,1600), + }, + [60] = { + Scape = DefaultCityScape, + Start = Vector(-5547,-10781,-60), + End = Vector(-6476,-12119,1600), + }, + [61] = { + Scape = DefaultCityScape, + Start = Vector(-5354,-10925,-60), + End = Vector(-5548,-11417,1600), + }, + [62] = { + Scape = DefaultCityScape, + Start = Vector(-5421,-12117,-60), + End = Vector(-9315,-12525,1600), + }, + [63] = { + Scape = DefaultCityScape, + Start = Vector(-6476,-11485,-60), + End = Vector(-9315,-12117,1600), + }, + [64] = { + Scape = DefaultCityScape, + Start = Vector(-10414,-3427,-60), + End = Vector(-11554,-5947,1600), + }, + [65] = { + Scape = DefaultCityScape, + Start = Vector(-9432,-5947,-60), + End = Vector(-10414,-7963,1600), + }, + [66] = { + Scape = DefaultCityScape, + Start = Vector(-8520,-6710,-60), + End = Vector(-9473,-7037,1600), + }, + [67] = { + Scape = DefaultCityScape, + Start = Vector(-9188,-7800,-60), + End = Vector(-9508,-6998,1600), + }, + [68] = { + Scape = DefaultCityScape, + Start = Vector(-9188,-7005,-60), + End = Vector(-9634,-7801,1600), + }, + [69] = { + Scape = DefaultCityScape, + Start = Vector(-7855,-7010,-60), + End = Vector(-7963,-7971,1600), + }, + [70] = { + Scape = DefaultCityScape, + Start = Vector(-7759,-7813,-60), + End = Vector(-7865,-7921,1600), + }, + [71] = { + Scape = DefaultCityScape, + Start = Vector(-7798,-7765,-60), + End = Vector(-7864,-7812,1600), + }, + [72] = { + Scape = DefaultCityScape, + Start = Vector(-7709,-7860,-60), + End = Vector(-7761,-7918,1600), + }, + [73] = { + Scape = DefaultCityScape, + Start = Vector(-10155,-7596,-60), + End = Vector(-11612,-8805,1600), + }, + [74] = { + Scape = DefaultCityScape, + Start = Vector(-11108,-6843,-60), + End = Vector(-11676,-9727,1600), + }, + [75] = { + Scape = DefaultCityScape, + Start = Vector(-10413,-7481,-60), + End = Vector(-11558,-7852,1600), + }, + [76] = { + Scape = DefaultCityScape, + Start = Vector(-11018,-5947,-60), + End = Vector(-11628,-6844,1600), + }, + [77] = { + Scape = DefaultCityScape, + Start = Vector(-8383,-3427,-60), + End = Vector(-10414,-4224,1600), + }, + [78] = { + Scape = DefaultCityScape, + Start = Vector(-8382,-5057,-60), + End = Vector(-10304,-5950,1600), + }, + [79] = { + Scape = DefaultCityScape, + Start = Vector(-9019,-4864,-60), + End = Vector(-9284,-5068,1600), + }, + [80] = { + Scape = DefaultCityScape, + Start = Vector(-9018,-4416,-60), + End = Vector(-9277,-4219,1600), + }, + [81] = { + Scape = DefaultCityScape, + Start = Vector(-9918,-4224,-60), + End = Vector(-10421,-5057,1600), + }, + + + + + + } + }, +} + +function MapData.DefineRegion(a,b) + local index = table.insert(MapData.AmbientData["rp_evoford"]["city"],{Scape={},Start=a,End=b}) + MsgN(" ["..(table.Count(MapData.AmbientData["rp_evoford"]["city"])+14).."] = {") + MsgN(" Scape = DefaultCityScape,") + MsgN(" Start = Vector("..math.Round(a.x)..","..math.Round(a.y)..",-60),") + MsgN(" End = Vector("..math.Round(b.x)..","..math.Round(b.y)..",1600),") + MsgN(" },") + net.Start("MapData.Request") + net.Broadcast() +end +// EvoFord Merge +local __temp = MapData.AmbientData["rp_evocity_v33x"] +table.Merge(__temp,MapData.AmbientData["rp_evoford"]) +MapData.AmbientData["rp_evoford"] = __temp + +local function rotateAround(angle,axis,degree) + angle:RotateAroundAxis((axis == "f" and angle:Forward() or (axis == "u" and angle:Up() or angle:Right())),degree) + return angle +end +MapData.ScreenVehicleData = { + ["models/lonewolfie/mercedes_actros_2014_4x2.mdl"] = { + lp = Vector(-14.5,103.5,101.2), + la = rotateAround(Angle(270+25,61,0),"u",-90), + w = 260, + h = 140, + }, + ["models/lonewolfie/ford_f350_ambu.mdl"] = { + lp = Vector(-11.5,76.9,79.5), + la = rotateAround(Angle(270+4.5,68.5,0),"u",-90), + w = 260, + h = 140, + }, +} +local function sendMapDataPacket(ply,data,packettype,leftover) + --MsgN("Sending Packet["..leftover.." leftover] of type["..packettype.."]") + --PrintTable(data) + net.Start("MapData.MapPacket") + net.WriteInt(leftover,32) + net.WriteInt(packettype,32) + net.WriteTable(data) + net.Send(ply) +end +local function generatePackets(pckData,pckType,packets,dataPerPacket) + local uuIndex = 0 + local uuData = {} + for i,k in pairs(pckData) do + if uuIndex >= dataPerPacket then + table.insert(packets,{Data = uuData,Type = pckType}) + uuIndex = 0 + uuData = {} + end + uuData[i] = k + uuIndex = uuIndex + 1 + end + if uuIndex > 0 then + table.insert(packets,{Data = uuData,Type = pckType}) + end + return packets +end +net.Receive("MapData.Request",function(len,pl) + MsgN("Sending "..pl:Nick().."["..pl:SteamID().."/"..pl:SteamID64().."] PacketData") + local streetLexika = MapData.StreetLexika[game.GetMap()] + local ambientData = MapData.AmbientData[game.GetMap()] + local streetData = MapData.StreetData[game.GetMap()] + local svData = MapData.ScreenVehicleData + if not streetLexika then + MsgN("No Street Lexika Data exists, not sending") + return + end + local packets = {} + packets = generatePackets(streetLexika,AMBIENCE_PACKET_LEXIKA,packets,20) + packets = generatePackets(streetData,AMBIENCE_PACKET_STREET,packets,20) + packets = generatePackets(ambientData,AMBIENCE_PACKET_AMBIENT,packets,20) + packets = generatePackets(svData,AMBIENCE_PACKET_SVDATA,packets,20) + packets = generatePackets(MapData.ScapeData,AMBIENCE_PACKET_SCAPE,packets,20) + packets = generatePackets(MapData.GraphData,AMBIENCE_PACKET_GRAPH,packets,20) + local packetsGenerated = table.Count(packets) + net.Start("MapData.MapPacketHeader") + net.WriteInt(packetsGenerated,32) + net.Send(pl) + MsgN("Generated "..packetsGenerated.. " C_Packets") + timer.Simple(0.1,function() + for i,k in pairs(packets) do + timer.Simple(i/2,function() + sendMapDataPacket(pl,k.Data,k.Type,packetsGenerated - i) + end) + end + end) +end) + +if MapData.AmbientData[game.GetMap()] then + local connectedWithNode = {} + for i,k in pairs(MapData.StreetData[game.GetMap()]) do + if not connectedWithNode[k.Start.x.."/"..k.Start.y] then connectedWithNode[k.Start.x.."/"..k.Start.y] = {} end + if not connectedWithNode[k.End.x.."/"..k.End.y] then connectedWithNode[k.End.x.."/"..k.End.y] = {} end + connectedWithNode[k.Start.x.."/"..k.Start.y][i]=true + connectedWithNode[k.End.x.."/"..k.End.y][i]=true + end + PrintTable(connectedWithNode) + for i,k in pairs(MapData.StreetData[game.GetMap()]) do + local c = connectedWithNode[k.Start.x.."/"..k.Start.y] + table.Merge(c,connectedWithNode[k.End.x.."/"..k.End.y]) + MapData.StreetData[game.GetMap()][i].ConnectedWith = c + end +end +if table.Count(player.GetAll()) > 0 then + net.Start("MapData.Request") + net.Broadcast() +end \ No newline at end of file diff --git a/lua/autorun/server/replace_sv.lua b/lua/autorun/server/replace_sv.lua new file mode 100644 index 0000000..e4fa2ff --- /dev/null +++ b/lua/autorun/server/replace_sv.lua @@ -0,0 +1,29 @@ +SoundMaster = SoundMaster or {} +function SoundMaster.EntityEmitSound(t) + if string.find(t.SoundName,"vehicles") then return end + --MsgN(t.SoundName) + --MsgN(t.Entity) + if IsValid(t.Entity) then + if t.SoundName == "plats/elevator_move_loop1.wav" then t.SoundName == "common/null.wav" return true end + if t.Entity == Entity(0) and string.find(t.SoundName,"ambient") then t.SoundName = "null.wav" return true end + if t.Entity:IsPlayer() and t.SoundName == "items/flashlight1.wav" then t.SoundName = "rustsurvival/flashlight_toggle.mp3" return true end + if t.Entity:IsVehicle() then + local replacements = { + ["physics/metal/*"] = { + "0x00CED401","0x0DF65CA9", + "0x0F481DDD","0x1AF0B69D", + "0x1F56FF6A","0x03E4DA2C", + "0x15E86B1D","0x18B930BF", + "0x0450C95F","0x16387ED3", + } + } + for i,k in pairs(replacements) do + if string.find(t.SoundName,i) then + t.SoundName = "soundmaster/carcrash_ac/"..table.Random(k)..".mp3" + return true + end + end + end + end +end +hook.Add("EntityEmitSound","SoundMaster.EntityEmitSound",SoundMaster.EntityEmitSound) diff --git a/lua/autorun/wetter.lua b/lua/autorun/wetter.lua new file mode 100644 index 0000000..bce0384 --- /dev/null +++ b/lua/autorun/wetter.lua @@ -0,0 +1,26 @@ +/*---------------------------------------------------------— + CleanRP SoundMaster + + Copyright © 2017 4thebadwolfsky + All Rights Reserved + Website: derauto.de +—-----------------------------------------------------------*/ +AddCSLuaFile() +WeatherSounds = {} +WeatherSounds["thunder"] = {} +WeatherSounds["thunder"]["blitz"] = {"0x06B8CE61","0x11E5A7BB","0x139392D9"} +WeatherSounds["thunder"]["donner"] = {"0x168348FE","0x0CD31F62","0x05D20947","0x0157C86A"} + +function SoundMaster.Thunderfar(p,a,b,v) + --sound.Play( "simpleweather/thunderfar" .. math.random( 1, 2 ) .. ".mp3",p,a,b,v) + sound.Play( "soundmaster/weather_ac/" .. table.Random(WeatherSounds["thunder"]["donner"]) .. ".mp3",p,a,b,v) +end +function SoundMaster.WindSound() + LocalPlayer():EmitSound("rustsurvival/ambient/a_windgust_light"..math.random(1,4)..".mp3") +end +function SoundMaster.ThunderLighning(p,a,b,v) + --sound.Play( "simpleweather/thunder" .. math.random( 1, 3 ) .. ".mp3",p,a,b,v) + --sound.Play( "simpleweather/lightning" .. math.random( 1, 4 ) .. ".mp3",p,a,b,v) + SoundMaster.Thunderfar(p,a,b,v) + sound.Play( "soundmaster/weather_ac/" .. table.Random(WeatherSounds["thunder"]["blitz"]) .. ".mp3",p,a,b,v) +end \ No newline at end of file diff --git a/sound/soundmaster/carcrash_ac/0x00CED401.mp3 b/sound/soundmaster/carcrash_ac/0x00CED401.mp3 new file mode 100644 index 0000000..40f870c Binary files /dev/null and b/sound/soundmaster/carcrash_ac/0x00CED401.mp3 differ diff --git a/sound/soundmaster/carcrash_ac/0x0DF65CA9.mp3 b/sound/soundmaster/carcrash_ac/0x0DF65CA9.mp3 new file mode 100644 index 0000000..1892ac4 Binary files /dev/null and b/sound/soundmaster/carcrash_ac/0x0DF65CA9.mp3 differ diff --git a/sound/soundmaster/carcrash_ac/0x0F481DDD.mp3 b/sound/soundmaster/carcrash_ac/0x0F481DDD.mp3 new file mode 100644 index 0000000..cbec0d9 Binary files /dev/null and b/sound/soundmaster/carcrash_ac/0x0F481DDD.mp3 differ diff --git a/sound/soundmaster/carcrash_ac/0x15E86B1D.mp3 b/sound/soundmaster/carcrash_ac/0x15E86B1D.mp3 new file mode 100644 index 0000000..17a59c5 Binary files /dev/null and b/sound/soundmaster/carcrash_ac/0x15E86B1D.mp3 differ diff --git a/sound/soundmaster/carcrash_ac/0x16387ED3.mp3 b/sound/soundmaster/carcrash_ac/0x16387ED3.mp3 new file mode 100644 index 0000000..e69de29 diff --git a/sound/soundmaster/carcrash_ac/0x1F56FF6A.mp3 b/sound/soundmaster/carcrash_ac/0x1F56FF6A.mp3 new file mode 100644 index 0000000..511ed75 Binary files /dev/null and b/sound/soundmaster/carcrash_ac/0x1F56FF6A.mp3 differ diff --git a/sound/soundmaster/carexplosion_ac/0x0FEDCD9C.mp3 b/sound/soundmaster/carexplosion_ac/0x0FEDCD9C.mp3 new file mode 100644 index 0000000..ea82f49 Binary files /dev/null and b/sound/soundmaster/carexplosion_ac/0x0FEDCD9C.mp3 differ diff --git a/sound/soundmaster/carexplosion_ac/0x1D0B27DF.mp3 b/sound/soundmaster/carexplosion_ac/0x1D0B27DF.mp3 new file mode 100644 index 0000000..d74b658 Binary files /dev/null and b/sound/soundmaster/carexplosion_ac/0x1D0B27DF.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x081086B8.mp3 b/sound/soundmaster/explosion_ac/0x081086B8.mp3 new file mode 100644 index 0000000..8327aa1 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x081086B8.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x081086B9.wav b/sound/soundmaster/explosion_ac/0x081086B9.wav new file mode 100644 index 0000000..1d66d21 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x081086B9.wav differ diff --git a/sound/soundmaster/explosion_ac/0x081086BA.wav b/sound/soundmaster/explosion_ac/0x081086BA.wav new file mode 100644 index 0000000..799a9b8 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x081086BA.wav differ diff --git a/sound/soundmaster/explosion_ac/0x081086BB.wav b/sound/soundmaster/explosion_ac/0x081086BB.wav new file mode 100644 index 0000000..7ffdd0b Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x081086BB.wav differ diff --git a/sound/soundmaster/explosion_ac/0x081086BC.wav b/sound/soundmaster/explosion_ac/0x081086BC.wav new file mode 100644 index 0000000..3dd2257 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x081086BC.wav differ diff --git a/sound/soundmaster/explosion_ac/0x081086BD.wav b/sound/soundmaster/explosion_ac/0x081086BD.wav new file mode 100644 index 0000000..ef31ff2 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x081086BD.wav differ diff --git a/sound/soundmaster/explosion_ac/0x089D93B2.mp3 b/sound/soundmaster/explosion_ac/0x089D93B2.mp3 new file mode 100644 index 0000000..65a0b66 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x089D93B2.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x0FD726C5.mp3 b/sound/soundmaster/explosion_ac/0x0FD726C5.mp3 new file mode 100644 index 0000000..56ce7ac Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x0FD726C5.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x0FF04137.mp3 b/sound/soundmaster/explosion_ac/0x0FF04137.mp3 new file mode 100644 index 0000000..7fedd80 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x0FF04137.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x1038E2C4.mp3 b/sound/soundmaster/explosion_ac/0x1038E2C4.mp3 new file mode 100644 index 0000000..e97dd89 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x1038E2C4.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x176EA717.mp3 b/sound/soundmaster/explosion_ac/0x176EA717.mp3 new file mode 100644 index 0000000..8e4496f Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x176EA717.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x181D66EA.mp3 b/sound/soundmaster/explosion_ac/0x181D66EA.mp3 new file mode 100644 index 0000000..7292ad4 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x181D66EA.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x1CAAEBB7.mp3 b/sound/soundmaster/explosion_ac/0x1CAAEBB7.mp3 new file mode 100644 index 0000000..c91e561 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x1CAAEBB7.mp3 differ diff --git a/sound/soundmaster/explosion_ac/0x1EBDAB40.mp3 b/sound/soundmaster/explosion_ac/0x1EBDAB40.mp3 new file mode 100644 index 0000000..dbe5db2 Binary files /dev/null and b/sound/soundmaster/explosion_ac/0x1EBDAB40.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x06D84612.mp3 b/sound/soundmaster/localplayer_ac/0x06D84612.mp3 new file mode 100644 index 0000000..604d1a3 Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x06D84612.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x073E8A8C.mp3 b/sound/soundmaster/localplayer_ac/0x073E8A8C.mp3 new file mode 100644 index 0000000..58a905d Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x073E8A8C.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x0972C598.mp3 b/sound/soundmaster/localplayer_ac/0x0972C598.mp3 new file mode 100644 index 0000000..36f5aac Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x0972C598.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x0D6E1C39.mp3 b/sound/soundmaster/localplayer_ac/0x0D6E1C39.mp3 new file mode 100644 index 0000000..0c3f861 Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x0D6E1C39.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x130015D4.mp3 b/sound/soundmaster/localplayer_ac/0x130015D4.mp3 new file mode 100644 index 0000000..4958d63 Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x130015D4.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x131731C0.mp3 b/sound/soundmaster/localplayer_ac/0x131731C0.mp3 new file mode 100644 index 0000000..93275e5 Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x131731C0.mp3 differ diff --git a/sound/soundmaster/localplayer_ac/0x1A68325D.mp3 b/sound/soundmaster/localplayer_ac/0x1A68325D.mp3 new file mode 100644 index 0000000..c72228d Binary files /dev/null and b/sound/soundmaster/localplayer_ac/0x1A68325D.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF124.mp3 b/sound/soundmaster/player_ac/0xFAF124.mp3 new file mode 100644 index 0000000..c345925 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF124.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF125.mp3 b/sound/soundmaster/player_ac/0xFAF125.mp3 new file mode 100644 index 0000000..e86bc90 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF125.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF126.mp3 b/sound/soundmaster/player_ac/0xFAF126.mp3 new file mode 100644 index 0000000..fa83b89 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF126.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF127.mp3 b/sound/soundmaster/player_ac/0xFAF127.mp3 new file mode 100644 index 0000000..2b065e1 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF127.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF128.mp3 b/sound/soundmaster/player_ac/0xFAF128.mp3 new file mode 100644 index 0000000..a695bd5 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF128.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF129.mp3 b/sound/soundmaster/player_ac/0xFAF129.mp3 new file mode 100644 index 0000000..9c1b1f9 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF129.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF130.mp3 b/sound/soundmaster/player_ac/0xFAF130.mp3 new file mode 100644 index 0000000..e823295 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF130.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF131.mp3 b/sound/soundmaster/player_ac/0xFAF131.mp3 new file mode 100644 index 0000000..c403c62 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF131.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF132.mp3 b/sound/soundmaster/player_ac/0xFAF132.mp3 new file mode 100644 index 0000000..da3ddb2 Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF132.mp3 differ diff --git a/sound/soundmaster/player_ac/0xFAF133.mp3 b/sound/soundmaster/player_ac/0xFAF133.mp3 new file mode 100644 index 0000000..d00c10d Binary files /dev/null and b/sound/soundmaster/player_ac/0xFAF133.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x03552660.mp3 b/sound/soundmaster/vending_machine_ac/0x03552660.mp3 new file mode 100644 index 0000000..21a0f2c Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x03552660.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x03ECBDB5.mp3 b/sound/soundmaster/vending_machine_ac/0x03ECBDB5.mp3 new file mode 100644 index 0000000..8c0c22b Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x03ECBDB5.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x097531DA.mp3 b/sound/soundmaster/vending_machine_ac/0x097531DA.mp3 new file mode 100644 index 0000000..c77e7d9 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x097531DA.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x0A70157C.mp3 b/sound/soundmaster/vending_machine_ac/0x0A70157C.mp3 new file mode 100644 index 0000000..ee78c60 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x0A70157C.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x0E34BC18.mp3 b/sound/soundmaster/vending_machine_ac/0x0E34BC18.mp3 new file mode 100644 index 0000000..12c7dff Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x0E34BC18.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x119FC2F5.mp3 b/sound/soundmaster/vending_machine_ac/0x119FC2F5.mp3 new file mode 100644 index 0000000..11810ad Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x119FC2F5.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x129C3159.mp3 b/sound/soundmaster/vending_machine_ac/0x129C3159.mp3 new file mode 100644 index 0000000..8621e14 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x129C3159.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x140F470D.mp3 b/sound/soundmaster/vending_machine_ac/0x140F470D.mp3 new file mode 100644 index 0000000..02f5c51 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x140F470D.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x15B2EC01.mp3 b/sound/soundmaster/vending_machine_ac/0x15B2EC01.mp3 new file mode 100644 index 0000000..7c1956c Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x15B2EC01.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1645E267.mp3 b/sound/soundmaster/vending_machine_ac/0x1645E267.mp3 new file mode 100644 index 0000000..866cb2a Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1645E267.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1B1BB6D3.mp3 b/sound/soundmaster/vending_machine_ac/0x1B1BB6D3.mp3 new file mode 100644 index 0000000..7f6d281 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1B1BB6D3.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1C9F58ED.mp3 b/sound/soundmaster/vending_machine_ac/0x1C9F58ED.mp3 new file mode 100644 index 0000000..2701be1 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1C9F58ED.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1D1361CC.mp3 b/sound/soundmaster/vending_machine_ac/0x1D1361CC.mp3 new file mode 100644 index 0000000..043b6ee Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1D1361CC.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1D1519DC.mp3 b/sound/soundmaster/vending_machine_ac/0x1D1519DC.mp3 new file mode 100644 index 0000000..53a2cda Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1D1519DC.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1F6B0AF7.mp3 b/sound/soundmaster/vending_machine_ac/0x1F6B0AF7.mp3 new file mode 100644 index 0000000..6dbade4 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1F6B0AF7.mp3 differ diff --git a/sound/soundmaster/vending_machine_ac/0x1F8DFFB8.mp3 b/sound/soundmaster/vending_machine_ac/0x1F8DFFB8.mp3 new file mode 100644 index 0000000..3bf3719 Binary files /dev/null and b/sound/soundmaster/vending_machine_ac/0x1F8DFFB8.mp3 differ