From 744cb37c1aff2fcbf9e1f2504b7bd21c49761070 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sat, 20 May 2023 18:09:35 +0500 Subject: [PATCH] Shared cleanup and Discord Presence --- FIXES.md | 10 +- .../entities/weapons/runnerhands/shared.lua | 5 +- .../beatrun/gamemode/cl/DiscordPresence.lua | 65 ++ .../gamemodes/beatrun/gamemode/sh/Balance.lua | 24 +- .../beatrun/gamemode/sh/Checkpoints.lua | 42 +- .../gamemodes/beatrun/gamemode/sh/Climb.lua | 166 +++-- .../beatrun/gamemode/sh/Conflicts.lua | 6 +- .../beatrun/gamemode/sh/CrouchJump.lua | 17 +- .../gamemodes/beatrun/gamemode/sh/Damage.lua | 48 +- .../beatrun/gamemode/sh/DataTheft.lua | 18 +- .../gamemodes/beatrun/gamemode/sh/Dive.lua | 33 +- .../beatrun/gamemode/sh/Endless_Run.lua | 16 +- .../gamemodes/beatrun/gamemode/sh/Grapple.lua | 92 ++- .../beatrun/gamemode/sh/Infection.lua | 115 ++-- .../gamemodes/beatrun/gamemode/sh/Ladder.lua | 25 +- .../gamemodes/beatrun/gamemode/sh/MP_Sync.lua | 19 +- .../gamemodes/beatrun/gamemode/sh/Melee.lua | 104 ++-- .../beatrun/gamemode/sh/MenuBinds.lua | 4 +- .../gamemodes/beatrun/gamemode/sh/Misc.lua | 70 +-- .../gamemodes/beatrun/gamemode/sh/Monkey.lua | 17 +- .../beatrun/gamemode/sh/PuristMode.lua | 8 +- .../beatrun/gamemode/sh/Quickturn.lua | 35 +- .../gamemodes/beatrun/gamemode/sh/Replay.lua | 84 +-- .../gamemodes/beatrun/gamemode/sh/Rope.lua | 10 +- .../beatrun/gamemode/sh/SafetyRoll.lua | 25 +- .../gamemodes/beatrun/gamemode/sh/Sliding.lua | 160 ++--- .../beatrun/gamemode/sh/Sounds_!Precache.lua | 4 +- .../beatrun/gamemode/sh/Sounds_Cloth.lua | 83 +-- .../beatrun/gamemode/sh/Sounds_Footsteps.lua | 548 +++------------- .../beatrun/gamemode/sh/Sounds_Handsteps.lua | 77 +-- .../beatrun/gamemode/sh/Sounds_Melee.lua | 57 +- .../beatrun/gamemode/sh/Sounds_Misc.lua | 78 +-- .../beatrun/gamemode/sh/Sounds_VO.lua | 153 +---- .../beatrun/gamemode/sh/Sounds_zzzEnd.lua | 2 +- .../beatrun/gamemode/sh/SwingPipe.lua | 21 +- .../beatrun/gamemode/sh/TimeSlow.lua | 16 +- .../beatrun/gamemode/sh/Vaulting.lua | 220 +++---- .../gamemodes/beatrun/gamemode/sh/Wallrun.lua | 96 +-- .../beatrun/gamemode/sh/WallrunME.lua | 63 +- .../gamemodes/beatrun/gamemode/sh/Zipline.lua | 36 +- .../beatrun/gamemode/sh/_Helpers.lua | 69 +- .../beatrun/gamemode/sh/sh_buildmode.lua | 587 ++++++++---------- .../beatrun/gamemode/sh/sh_freerunsysall.lua | 78 +-- .../gamemodes/beatrun/gamemode/sv/blind.lua | 2 +- lua/bin/gmcl_gdiscord_win32.dll | Bin 0 -> 43520 bytes 45 files changed, 1288 insertions(+), 2120 deletions(-) create mode 100644 beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua create mode 100644 lua/bin/gmcl_gdiscord_win32.dll diff --git a/FIXES.md b/FIXES.md index 2c89f6f..2dcd4ff 100644 --- a/FIXES.md +++ b/FIXES.md @@ -1,8 +1,12 @@ -# Сделанные мной фиксы +# Сделанные мной фиксы и добавления +* Разрешение Overdrive на сервере - Beatrun_AllowOvedriveInMultiplayer. +* Небольшой толчёк камеры при нырянии. +* Discord Rich Presence + * Фикс трёх букв из-за которых нихуя не работало. * Быстрый поворот на земле (ПКМ пока бежишь/стоишь) включён по умолчанию (Beatrun_QuickturnGround). * Быстрый поворот только с руками бегуна (Фикс поворотов при прицеливании и т.п.). -* Убрал ваш SteamID в углу потому что могу. * Фикс ошибки запуска курса. * Фикс использования хука (пробел по стене когда вы в воздухе) и это починило сохранение времени. -* Фикс сортировки таблицы лидеров. \ No newline at end of file +* Фикс сортировки таблицы лидеров. +* Убрал ваш SteamID в углу потому что могу. \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua b/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua index b1d99f2..470ef71 100644 --- a/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua +++ b/beatrun/gamemodes/beatrun/entities/weapons/runnerhands/shared.lua @@ -349,10 +349,13 @@ end local tr = {} local tr_result = {} + +local allow_overdrive = CreateClientConVar("Beatrun_AllowOvedriveInMultiplayer", "0", false, false, "Allow ovedrive on servers") + function SWEP:PrimaryAttack() local ply = self.Owner - if ply:KeyDown(IN_USE) and game.SinglePlayer() then + if ply:KeyDown(IN_USE) and (game.SinglePlayer() or allow_overdrive:GetBool()) then local mult = (ply:InOverdrive() and 1) or 1.25 local fovmult = (mult == 1 and 1) or 1.1 ply:SetMEMoveLimit(ply:GetMEMoveLimit()*0.75) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua b/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua new file mode 100644 index 0000000..28152af --- /dev/null +++ b/beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua @@ -0,0 +1,65 @@ +if file.Find("lua/bin/gmcl_gdiscord_*.dll", "GAME")[1] == nil then return end +require("gdiscord") + +local image = "default" +local discord_id = "1109438051496775682" +local refresh_time = 60 +local discord_start = discord_start or -1 + +function DiscordUpdate() + local rpc_data = {} + + if game.SinglePlayer() then + rpc_data["state"] = "Singleplayer" + else + local ip = game.GetIPAddress() + + if ip == "loopback" then + if GetConVar("p2p_enabled"):GetBool() then + rpc_data["state"] = "Peer 2 Peer" + else + rpc_data["state"] = "Local Server" + end + else + -- rpc_data["state"] = string.Replace(ip, ":27015", "") + rpc_data["state"] = "Dedicated Server" + end + end + + rpc_data["partySize"] = player.GetCount() + rpc_data["partyMax"] = game.MaxPlayers() + + if game.SinglePlayer() then + rpc_data["partyMax"] = 0 + end + + local level = LocalPlayer():GetLevel() + local customname = hook.Run("BeatrunHUDCourse") + local course = customname and customname or Course_Name ~= "" and Course_Name or "Freeplay" + + if course == nil then + course = "Freeplay" + end + + rpc_data["details"] = "Level: " .. level .. " | Map: " .. game.GetMap() + rpc_data["startTimestamp"] = discord_start + + rpc_data["largeImageKey"] = image + rpc_data["largeImageText"] = course + + print("UPDATING DISCORD RPC") + DiscordUpdateRPC(rpc_data) +end + +hook.Add("Initialize", "UpdateDiscordStatus", function() + timer.Simple(10, function() + discord_start = os.time() + + DiscordRPCInitialize(discord_id) + DiscordUpdate() + + if timer.Exists("DiscordRPCTimer") then timer.Remove("DiscordRPCTimer") end + + timer.Create("DiscordRPCTimer", refresh_time, 0, DiscordUpdate) + end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Balance.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Balance.lua index c0c476f..550c601 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Balance.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Balance.lua @@ -1,9 +1,7 @@ local dircache = nil -hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume, filter, skipcheck) - if IsValid(ply:GetBalanceEntity()) then - return - end +hook.Add("PlayerFootstepME", "Balance", function(ply, pos, foot, sound, volume, filter, skipcheck) + if IsValid(ply:GetBalanceEntity()) then return end if not ply.BalanceTrace then ply.BalanceTrace = {} @@ -16,6 +14,7 @@ hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume, local tr = ply.BalanceTrace local trout = ply.BalanceTraceOut + tr.filter = ply tr.start = pos tr.endpos = pos - Vector(0, 0, 25) @@ -25,7 +24,8 @@ hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume, if trout.Entity.Balance then ply:SetBalance(0.1) ply:SetBalanceEntity(trout.Entity) - timer.Simple(0, function () + + timer.Simple(0, function() ParkourEvent("walkbalancefwd", ply) end) @@ -37,18 +37,21 @@ hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume, end end end) -hook.Add("SetupMove", "Balance", function (ply, mv, cmd) + +hook.Add("SetupMove", "Balance", function(ply, mv, cmd) if IsValid(ply:GetBalanceEntity()) then local balance = ply:GetBalanceEntity() mv:SetForwardSpeed(math.max(mv:GetForwardSpeed() * 0.01, 0)) - local dist, nearest, distlen = util.DistanceToLine(balance:GetPos(), balance:GetPos() + balance:GetAngles():Up() * balance:GetBalanceLength(), mv:GetOrigin()) + local _, nearest, distlen = util.DistanceToLine(balance:GetPos(), balance:GetPos() + balance:GetAngles():Up() * balance:GetBalanceLength(), mv:GetOrigin()) local distend = balance:GetPos():Distance(balance:GetPos() + balance:GetAngles():Up() * balance:GetBalanceLength()) + nearest.z = mv:GetOrigin().z mv:SetOrigin(nearest) mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP))) + cmd:RemoveKey(IN_JUMP) local tr = ply.BalanceTrace @@ -111,6 +114,7 @@ hook.Add("SetupMove", "Balance", function (ply, mv, cmd) if ang:Forward():Dot(bang:Up()) > 0.5 then local fallpos = mv:GetOrigin() + ply:GetBalanceEntity():GetAngles():Right() * 0.75 * ply:GetBalance() + tr.start = fallpos tr.endpos = fallpos @@ -123,6 +127,7 @@ hook.Add("SetupMove", "Balance", function (ply, mv, cmd) end else local fallpos = mv:GetOrigin() + ply:GetBalanceEntity():GetAngles():Right() * -0.75 * ply:GetBalance() + tr.start = fallpos tr.endpos = fallpos @@ -147,7 +152,7 @@ end) local angy = 0 local attack2 = false -hook.Add("CreateMove", "Balance", function (cmd) +hook.Add("CreateMove", "Balance", function(cmd) local ply = LocalPlayer() if IsValid(ply:GetBalanceEntity()) and IsValid(BodyAnim) then @@ -179,6 +184,7 @@ hook.Add("CreateMove", "Balance", function (cmd) ang.y = angy cmd:SetViewAngles(ang) + BodyAnim:SetPoseParameter("lean_roll", math.Clamp(ply:GetBalance(), -60, 60)) if IsValid(BodyAnimArmCopy) then @@ -220,4 +226,4 @@ hook.Add("CreateMove", "Balance", function (cmd) lockang2 = false dircache = nil end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua index 5721795..51b9c81 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua @@ -50,7 +50,7 @@ function LoadCheckpoints() end if CLIENT then - timer.Simple(1, function () + timer.Simple(1, function() for k, v in pairs(ents.FindByClass("tt_cp")) do if IsValid(v) and v.GetCPNum then Checkpoints[v:GetCPNum()] = v @@ -65,9 +65,9 @@ function LoadCheckpoints() end if CLIENT then - local FastStart = CreateClientConVar("Beatrun_FastStart", "0", true, true, "Faster start countdown") + CreateClientConVar("Beatrun_FastStart", "0", true, true, "Faster start countdown") - net.Receive("Checkpoint_Hit", function () + net.Receive("Checkpoint_Hit", function() local timetaken = CurTime() - lastcptime local vspb = nil @@ -107,7 +107,8 @@ if CLIENT then print(timetaken, vspb) end) - net.Receive("Checkpoint_Finish", function () + + net.Receive("Checkpoint_Finish", function() table.insert(cptimes, CurTime() - lastcptime) local totaltime = CurTime() - Course_StartTime @@ -145,7 +146,7 @@ if CLIENT then end if SERVER then - net.Receive("Checkpoint_Finish", function (len, ply) + net.Receive("Checkpoint_Finish", function(len, ply) local pb = net.ReadFloat() or 0 local svtime = CurTime() - ply.Course_StartTime @@ -165,10 +166,13 @@ function FinishCourse(ply) ply:ScreenFade(SCREENFADE.IN, finishcolor, 0, 4) ply:SetLaggedMovementValue(0.1) ply:DrawViewModel(false) + net.Start("Checkpoint_Finish") net.Send(ply) + ply:SetNW2Int("CPNum", -1) - timer.Simple(4, function () + + timer.Simple(4, function() ply:SetLaggedMovementValue(1) ply:DrawViewModel(true) end) @@ -176,11 +180,8 @@ end local countdown = 0 local countdownalpha = 255 -local countdowntext = { - "Ready", - "Set", - "Go!!" -} + +local countdowntext = {"Ready", "Set", "Go!!"} local function StartCountdown() local CT = CurTime() @@ -206,7 +207,7 @@ local function StartCountdownHUD() surface.SetFont("DermaLarge") surface.SetTextColor(255, 255, 255, countdownalpha) - local w, h = surface.GetTextSize(text) + local w, _ = surface.GetTextSize(text) surface.SetTextPos(ScrW() * 0.5 - w * 0.5, ScrH() * 0.3) surface.DrawText(text) @@ -234,8 +235,7 @@ function CourseHUD() if incourse then local text = string.FormattedTime(totaltime, "%02i:%02i:%02i") - local w, h = surface.GetTextSize(text) - + local w, _ = surface.GetTextSize(text) surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + vpz) surface.DrawText(text) end @@ -248,8 +248,7 @@ function CourseHUD() end text = speed .. " km/h" - w, h = surface.GetTextSize(text) - + w, _ = surface.GetTextSize(text) surface.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.85 + vpz) surface.DrawText(text) end @@ -264,7 +263,8 @@ function CourseHUD() end if timealpha > 0 then - local w, h = surface.GetTextSize(timetext) + local w, _ = surface.GetTextSize(timetext) + timealpha = math.max(0, timealpha - FrameTime() * 250) timecolor.a = math.min(255, timealpha) @@ -303,9 +303,7 @@ function SaveReplayData() local replay = util.TableToJSON(LocalPlayer().ReplayTicks) local dir = "beatrun/replays/" .. game.GetMap() .. "/" - if not replay then - return - end + if not replay then return end file.CreateDir(dir) file.Write(dir .. Course_ID .. ".txt", util.Compress(replay)) @@ -351,7 +349,7 @@ function StartCourse(spawntime) end end -net.Receive("BeatrunSpawn", function () +net.Receive("BeatrunSpawn", function() local spawntime = net.ReadFloat() local replay = net.ReadBool() @@ -362,4 +360,4 @@ net.Receive("BeatrunSpawn", function () if LocalPlayer().GetInfoNum then StartCourse(spawntime) end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua index a0bdb08..11c7968 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Climb.lua @@ -1,17 +1,14 @@ -local ClimbingTimes = { - 5, - 1.25, - 1, - 1, - nil, - 2 -} +local ClimbingTimes = {5, 1.25, 1, 1, nil, 2} + +--[[ local CLIMB_HANG = 1 local CLIMB_HEAVEUP = 2 local CLIMB_STRAFELEFT = 3 local CLIMB_STRAFERIGHT = 4 local CLIMB_FOLDEDSTART = 5 local CLIMB_FOLDEDHEAVEUP = 6 + + local climb1 = { followplayer = false, animmodelstring = "climbanim", @@ -21,15 +18,14 @@ local climb1 = { smoothend = true, AnimString = "climb1" } -local climbstrings = { - "climb1", - "climb2" -} + +local climbstrings = {"climb1", "climb2"} +]] if game.SinglePlayer() and SERVER then util.AddNetworkString("Climb_SPFix") elseif game.SinglePlayer() and CLIENT then - net.Receive("Climb_SPFix", function () + net.Receive("Climb_SPFix", function() local lock = net.ReadBool() local neweyeang = net.ReadBool() local ang = net.ReadAngle() @@ -54,11 +50,13 @@ local function ClimbingEnd(ply, mv, cmd) local tr = { filter = ply } + tr.mins, tr.maxs = ply:GetHull() tr.start = mv:GetOrigin() tr.endpos = tr.start tr.mask = MASK_PLAYERSOLID tr.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT + local trout = util.TraceHull(tr) if trout.Hit then @@ -90,10 +88,10 @@ local function ClimbingEnd(ply, mv, cmd) if game.SinglePlayer() then net.Start("Climb_SPFix") - net.WriteBool(false) - net.WriteBool(false) - net.WriteAngle(angle_zero) - net.WriteBool(false) + net.WriteBool(false) + net.WriteBool(false) + net.WriteAngle(angle_zero) + net.WriteBool(false) net.Send(ply) end end @@ -102,10 +100,12 @@ local function ClimbingThink(ply, mv, cmd) if ply:GetClimbing() == 5 then if mv:KeyPressed(IN_FORWARD) and ply:GetClimbingDelay() < CurTime() + 0.65 or mv:KeyDown(IN_FORWARD) and ply:GetClimbingDelay() < CurTime() then ParkourEvent("hangfoldedheaveup", ply) + ply:SetClimbing(6) ply:SetClimbingTime(0) elseif ply:GetClimbingDelay() < CurTime() then ParkourEvent("hangfoldedendhang", ply) + ply:SetClimbing(1) ply:SetClimbingDelay(CurTime() + 1.35) end @@ -124,6 +124,7 @@ local function ClimbingThink(ply, mv, cmd) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) mv:SetUpSpeed(0) + ClimbingEnd(ply, mv, cmd) return @@ -138,20 +139,24 @@ local function ClimbingThink(ply, mv, cmd) if game.SinglePlayer() then net.Start("Climb_SPFix") - net.WriteBool(false) - net.WriteBool(false) - net.WriteAngle(angle_zero) - net.WriteBool(false) + net.WriteBool(false) + net.WriteBool(false) + net.WriteAngle(angle_zero) + net.WriteBool(false) net.Send(ply) end end if mv:KeyDown(IN_DUCK) then mv:SetOrigin(ply:GetClimbingStart() - ply:GetClimbingAngle():Forward() * 5) + ply:SetMoveType(MOVETYPE_WALK) + mv:SetButtons(0) + ply:SetClimbing(0) ply:SetCrouchJumpBlocked(true) + ParkourEvent("hangend", ply) if CLIENT_IFTP() then @@ -182,10 +187,10 @@ local function ClimbingThink(ply, mv, cmd) lockang = false BodyLimitX = 90 BodyLimitY = 180 + local ang = ply:EyeAngles() ang.x = 0 ang.z = 0 - BodyAnim:SetAngles(ang) elseif game.SinglePlayer() then ply:SendLua("lockang2=false lockang=false BodyLimitX=90 BodyLimitY=180 local ang=LocalPlayer():EyeAngles() ang.x=0 ang.z=0 BodyAnim:SetAngles(ang)") @@ -194,9 +199,7 @@ local function ClimbingThink(ply, mv, cmd) local ang = cmd:GetViewAngles() ang.x = math.min(ang.x, 0) ang = ang:Forward() - ang:Mul(350) - ang.z = 250 mv:SetVelocity(ang) @@ -209,6 +212,7 @@ local function ClimbingThink(ply, mv, cmd) local trout = ply.ClimbingTraceSafetyOut local mins, maxs = ply:GetHull() mins.z = maxs.z * 0.25 + tr.start = ply:GetClimbingEnd() tr.endpos = tr.start tr.maxs = maxs @@ -241,33 +245,36 @@ local function ClimbingThink(ply, mv, cmd) local tr = ply.ClimbingTraceEnd local trout = ply.ClimbingTraceEndOut - local oldstart = tr.start - local oldend = tr.endpos + -- local oldstart = tr.start + -- local oldend = tr.endpos local start = mv:GetOrigin() + wallang:Forward() * 20 + Vector(0, 0, 100) + dir + tr.start = start tr.endpos = start - Vector(0, 0, 80) util.TraceLine(tr) - if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then - return false - end + if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end local fail = trout.Fraction < 0.25 or trout.Fraction > 0.5 if not fail then local ostart = tr.start local oendpos = tr.endpos + tr.start = ply:GetClimbingEnd() + dir tr.endpos = tr.start - Vector(0, 0, 100) util.TraceLine(tr) dir.z = trout.HitPos.z - mv:GetOrigin().z - 77 + tr.endpos = oendpos tr.start = ostart tr = ply.ClimbingTraceSafety + trout = ply.ClimbingTraceSafetyOut + tr.start = mv:GetOrigin() + dir - wallang:Forward() * 0.533 tr.endpos = tr.start @@ -307,9 +314,7 @@ local function ClimbingThink(ply, mv, cmd) util.TraceLine(tr) - if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then - return false - end + if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end local fail = trout.Fraction < 0.25 or trout.Fraction == 1 @@ -319,7 +324,9 @@ local function ClimbingThink(ply, mv, cmd) local poslerp = LerpVector(lerp, ply:GetClimbingStart(), ply:GetClimbingEnd()) ply:SetClimbingEndOld(trout.HitPos) + mv:SetOrigin(poslerp) + ply:SetClimbingTime(ply:GetClimbingTime() + FrameTime() * lerprate) end @@ -334,10 +341,10 @@ local function ClimbingThink(ply, mv, cmd) if ply:GetClimbing() == 2 or ply:GetClimbing() == 6 then if game.SinglePlayer() then net.Start("Climb_SPFix") - net.WriteBool(false) - net.WriteBool(false) - net.WriteAngle(angle_zero) - net.WriteBool(false) + net.WriteBool(false) + net.WriteBool(false) + net.WriteAngle(angle_zero) + net.WriteBool(false) net.Send(ply) end @@ -351,6 +358,7 @@ local function ClimbingThink(ply, mv, cmd) local poslerp = LerpVector(lerp, ply:GetClimbingStart(), ply:GetClimbingEnd()) mv:SetOrigin(poslerp) + ply:SetClimbingTime(lerp + FrameTime() * lerprate) end @@ -385,10 +393,14 @@ local function ClimbingCheck(ply, mv, cmd) local eyeang = ply:EyeAngles() local oldpos = mv:GetOrigin() + eyeang.x = 0 + local tr = ply.ClimbingTrace local trout = ply.ClimbingTraceOut + mins.z = 45 + tr.start = mv:GetOrigin() if ply:GetDive() then @@ -405,24 +417,14 @@ local function ClimbingCheck(ply, mv, cmd) mins.z = 0 - if not trout.Hit then - return - end + if not trout.Hit then return end local wallang = trout.HitNormal:Angle() wallang.y = wallang.y - 180 - if wallang.x ~= 0 then - return - end - - if math.abs(math.AngleDifference(wallang.y, eyeang.y)) > 50 then - return - end - - if IsValid(trout.Entity) and trout.Entity.NoClimbing then - return - end + if wallang.x ~= 0 then return end + if math.abs(math.AngleDifference(wallang.y, eyeang.y)) > 50 then return end + if IsValid(trout.Entity) and trout.Entity.NoClimbing then return end ply:SetClimbingAngle(wallang) @@ -430,6 +432,7 @@ local function ClimbingCheck(ply, mv, cmd) local trout = ply.ClimbingTraceEndOut local upvalue = ply:GetWallrun() == 1 and Vector(0, 0, 90) or Vector(0, 0, 65) local plymins, plymaxs = ply:GetHull() + tr.start = mv:GetOrigin() + wallang:Forward() * 45 + upvalue tr.endpos = tr.start - Vector(0, 0, 90) tr.maxs = plymaxs @@ -439,11 +442,9 @@ local function ClimbingCheck(ply, mv, cmd) util.TraceLine(tr) - if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then - return false - end + if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end - local fraction = trout.Fraction + -- local fraction = trout.Fraction local detectionlen = 60 if trout.Fraction <= 0 or trout.Fraction >= 0.5 then @@ -452,18 +453,15 @@ local function ClimbingCheck(ply, mv, cmd) util.TraceLine(tr) - if trout.Fraction <= 0 or trout.Fraction >= 0.5 then - return - end + if trout.Fraction <= 0 or trout.Fraction >= 0.5 then return end detectionlen = 25 end local endpos = trout.HitPos - local height = trout.Fraction + -- local height = trout.Fraction local startpos = ply.ClimbingTraceOut.HitPos startpos.z = trout.HitPos.z - 77 - startpos:Add(wallang:Forward() * 0.533) if ply:GetDive() then @@ -495,48 +493,43 @@ local function ClimbingCheck(ply, mv, cmd) local tr = ply.ClimbingTraceSafety local trout = ply.ClimbingTraceSafetyOut + tr.filter = ply tr.start = endpos tr.endpos = tr.start - wallang:Forward() * detectionlen util.TraceLine(tr) - if trout.Hit then - return - end + if trout.Hit then return end tr.start = startpos + Vector(0, 0, 77) tr.endpos = tr.start + wallang:Forward() * detectionlen * 0.5 util.TraceLine(tr) - if trout.Hit then - return - end + if trout.Hit then return end - local steep = trout.HitNormal:Distance(Vector(0, 0, 1)) > 0.01 + -- local steep = trout.HitNormal:Distance(Vector(0, 0, 1)) > 0.01 local tr = ply.ClimbingTraceSafety local trout = ply.ClimbingTraceSafetyOut + tr.start = mv:GetOrigin() tr.endpos = tr.start + Vector(0, 0, 75) util.TraceLine(tr) - if trout.Hit then - return - end + if trout.Hit then return end local origin = mv:GetOrigin() local tr = ply.ClimbingTraceSafety local trout = ply.ClimbingTraceSafetyOut + tr.start = startpos tr.endpos = startpos util.TraceLine(tr) - if trout.Hit then - return - end + if trout.Hit then return end startpos.z = startpos.z ply.ClimbingStartPosCache = startpos @@ -551,7 +544,6 @@ local function ClimbingCheck(ply, mv, cmd) if ply:GetWallrun() ~= 1 then startpos.z = startpos.z + 17 - mv:SetOrigin(startpos) end @@ -610,8 +602,8 @@ local function ClimbingCheck(ply, mv, cmd) end local wr = ply:GetWallrun() - local wrtime = ply:GetWallrunTime() - CurTime() - local vel = mv:GetVelocity() + -- local wrtime = ply:GetWallrunTime() - CurTime() + -- local vel = mv:GetVelocity() if wr ~= 0 then ply:SetWallrun(0) @@ -649,6 +641,7 @@ local function ClimbingCheck(ply, mv, cmd) local trout = ply.ClimbingTraceSafetyOut local mins, maxs = ply:GetCollisionBounds() mins.z = maxs.z * 0.25 + tr.start = ply:GetClimbingEnd() tr.endpos = tr.start tr.maxs = maxs @@ -672,6 +665,7 @@ local function ClimbingCheck(ply, mv, cmd) if folded then ply:SetClimbing(5) ply:SetClimbingDelay(CurTime() + 0.8) + ParkourEvent("hangfoldedstart", ply) else local event = "climbhard" @@ -690,7 +684,7 @@ local function ClimbingCheck(ply, mv, cmd) if IsFirstTimePredicted() then if CLIENT or game.SinglePlayer() then - timer.Simple(0.05, function () + timer.Simple(0.05, function() ply:EmitSound("Bump.Concrete") end) end @@ -704,7 +698,6 @@ local function ClimbingCheck(ply, mv, cmd) if folded then DoImpactBlur(8) - lockang2 = false lockang = true end @@ -712,9 +705,9 @@ local function ClimbingCheck(ply, mv, cmd) if game.SinglePlayer() then net.Start("Climb_SPFix") - net.WriteBool(false) - net.WriteBool(true) - net.WriteAngle(wallang) + net.WriteBool(false) + net.WriteBool(true) + net.WriteAngle(wallang) if folded then ply:SendLua("DoImpactBlur(8)") @@ -726,12 +719,12 @@ local function ClimbingCheck(ply, mv, cmd) end if CLIENT and IsFirstTimePredicted() then - timer.Simple(0, function () + timer.Simple(0, function() BodyLimitX = 80 BodyLimitY = 170 end) elseif game.SinglePlayer() then - timer.Simple(0, function () + timer.Simple(0, function() ply:SendLua("BodyLimitX=80 BodyLimitY=170") end) end @@ -746,14 +739,13 @@ local function ClimbingCheck(ply, mv, cmd) mv:SetUpSpeed(0) end -hook.Add("SetupMove", "Climbing", function (ply, mv, cmd) + +hook.Add("SetupMove", "Climbing", function(ply, mv, cmd) if ply:GetClimbing() == nil or not ply:Alive() then ply:SetClimbing(0) end - if IsValid(ply:GetSwingbar()) then - return - end + if IsValid(ply:GetSwingbar()) then return end if (not ply:GetCrouchJump() or ply:GetDive()) and not ply:GetJumpTurn() and (mv:KeyDown(IN_FORWARD) or mv:GetVelocity().z < -50 or ply:GetWallrun() == 1) and ply:GetClimbing() == 0 and ply:GetWallrun() ~= 4 and not ply:OnGround() and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:GetMoveType() ~= MOVETYPE_LADDER then ClimbingCheck(ply, mv, cmd) @@ -762,4 +754,4 @@ hook.Add("SetupMove", "Climbing", function (ply, mv, cmd) if ply:GetClimbing() ~= 0 then ClimbingThink(ply, mv, cmd) end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Conflicts.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Conflicts.lua index fd6cc40..0af1f88 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Conflicts.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Conflicts.lua @@ -1,7 +1,5 @@ local problematichooks = { - SetupMove = { - "vmanip_vault" - } + SetupMove = {"vmanip_vault"} } local function RemoveConflicting() @@ -14,4 +12,4 @@ local function RemoveConflicting() hook.Remove("InitPostEntity", "RemoveConflicting") end -hook.Add("InitPostEntity", "RemoveConflicting", RemoveConflicting) +hook.Add("InitPostEntity", "RemoveConflicting", RemoveConflicting) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua b/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua index 008adfc..8101005 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/CrouchJump.lua @@ -6,15 +6,17 @@ local punchthink = Angle() if SERVER then util.AddNetworkString("CrouchJumpSP") elseif CLIENT and game.SinglePlayer() then - net.Receive("CrouchJumpSP", function () + net.Receive("CrouchJumpSP", function() local ply = LocalPlayer() if BodyAnimArmCopy then BodyAnimCycle = 0 BodyAnimCrouchLerp = 0 BodyAnimCrouchLerpZ = ply:GetPos().z - 32 + local ang = ply:EyeAngles() ang.x = 0 + ply.OrigEyeAng = ang BodyLimitX = 40 @@ -23,7 +25,7 @@ elseif CLIENT and game.SinglePlayer() then end) end -hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd) +hook.Add("SetupMove", "CrouchJump", function(ply, mv, cmd) if ply:OnGround() and ply:GetCrouchJumpBlocked() then ply:SetCrouchJumpBlocked(false) end @@ -55,12 +57,14 @@ hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd) if game.SinglePlayer() then net.Start("CrouchJumpSP") - net.WriteBool(true) + net.WriteBool(true) net.Send(ply) + ply:SetNW2Float("BodyAnimCrouchLerpZ", ply:GetPos().z - 32) end ParkourEvent("coil", ply) + ply:SetCrouchJump(true) ply:SetCrouchJumpTime(CurTime() + 1) ply:ViewPunch(punch) @@ -78,7 +82,7 @@ hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd) if game.SinglePlayer() then net.Start("CrouchJumpSP") - net.WriteBool(false) + net.WriteBool(false) net.Send(ply) end @@ -122,7 +126,8 @@ hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd) end end end) -hook.Add("CreateMove", "VManipCrouchJumpDuck", function (cmd) + +hook.Add("CreateMove", "VManipCrouchJumpDuck", function(cmd) local ply = LocalPlayer() if ply:GetCrouchJump() and ply:GetMoveType() == MOVETYPE_WALK and not ply:OnGround() and not ply:GetDive() then @@ -133,4 +138,4 @@ hook.Add("CreateMove", "VManipCrouchJumpDuck", function (cmd) cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_BULLRUSH)) cmd:RemoveKey(IN_DUCK) end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Damage.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Damage.lua index c873058..dd0d4ac 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Damage.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Damage.lua @@ -1,38 +1,30 @@ if SERVER then util.AddNetworkString("DBNO") else - net.Receive("DBNO", function () + net.Receive("DBNO", function() DoJumpTurn() end) end -hook.Add("ScalePlayerDamage", "MissedMe", function (ply, hitgroup, dmginfo) - if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() then - return - end +hook.Add("ScalePlayerDamage", "MissedMe", function(ply, hitgroup, dmginfo) + if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() then return end local vel = ply:GetVelocity() local vel_len = vel:Length() - if vel_len > 310 or ply:GetSliding() and vel_len > 100 or ply:GetWallrun() > 0 and vel_len > 200 or ply:GetJumpTurn() and not ply:OnGround() then - return true - end + if vel_len > 310 or ply:GetSliding() and vel_len > 100 or ply:GetWallrun() > 0 and vel_len > 200 or ply:GetJumpTurn() and not ply:OnGround() then return true end end) -hook.Add("EntityTakeDamage", "MissedMe", function (victim, dmginfo) - if not victim:IsPlayer() then - return - end + +hook.Add("EntityTakeDamage", "MissedMe", function(victim, dmginfo) + if not victim:IsPlayer() then return end local dmgtype = dmginfo:GetDamageType() - if victim:GetSliding() and (dmgtype == DMG_SLASH or dmgtype == DMG_CLUB) then - return true - end + if victim:GetSliding() and (dmgtype == DMG_SLASH or dmgtype == DMG_CLUB) then return true end end) -hook.Add("PlayerShouldTakeDamage", "DBNO", function (ply, attacker) - if not IsValid(attacker) then - return - end + +hook.Add("PlayerShouldTakeDamage", "DBNO", function(ply, attacker) + if not IsValid(attacker) then return end local class = attacker:GetClass() @@ -48,7 +40,7 @@ hook.Add("PlayerShouldTakeDamage", "DBNO", function (ply, attacker) ply:SetLocalVelocity(atteyeang:Forward() * 100 + Vector(0, 0, 100)) if game.SinglePlayer() then - timer.Simple(0, function () + timer.Simple(0, function() net.Start("DBNO") net.Send(ply) end) @@ -58,24 +50,21 @@ hook.Add("PlayerShouldTakeDamage", "DBNO", function (ply, attacker) end end - if ply:GetJumpTurn() and not ply:OnGround() and attacker:IsNPC() then - return false - end + if ply:GetJumpTurn() and not ply:OnGround() and attacker:IsNPC() then return false end end) if CLIENT then local radial = Material("radial.png") local dmgalpha = 0 - hook.Add("HUDPaint", "NTScreenEffects", function () + hook.Add("HUDPaint", "NTScreenEffects", function() local ply = LocalPlayer() - if not ply:Alive() then - return - end + if not ply:Alive() then return end local w = ScrW() local h = ScrH() + dmgalpha = math.min(300 * math.abs(ply:Health() / ply:GetMaxHealth() - 1), 255) surface.SetMaterial(radial) @@ -88,7 +77,7 @@ if CLIENT then end if SERVER then - hook.Add("PlayerPostThink", "HealthRegen", function (ply) + hook.Add("PlayerPostThink", "HealthRegen", function(ply) if not ply.LastHP then ply.LastHP = ply:Health() ply.RegenTime = 0 @@ -102,10 +91,9 @@ if SERVER then if ply:Alive() and ply.RegenTime < CurTime() and ply:Health() < ply:GetMaxHealth() then ply:SetHealth(math.Approach(ply:Health(), ply:GetMaxHealth(), 1)) - ply.RegenTime = CurTime() + 0.05 end ply.LastHP = ply:Health() end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/DataTheft.lua b/beatrun/gamemodes/beatrun/gamemode/sh/DataTheft.lua index de53875..1f6cb92 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/DataTheft.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/DataTheft.lua @@ -1,9 +1,7 @@ GM_DATATHEFT = 1 + DATATHEFT_LOADOUTS = { - { - "weapon_ss2_colt", - "weapon_ss2_circularsaw" - } + {"weapon_ss2_colt", "weapon_ss2_circularsaw"} } if SERVER then @@ -12,6 +10,7 @@ if SERVER then function Beatrun_StartDataTheft() SetGlobalBool(GM_DATATHEFT, true) + net.Start("DataTheft_Start") net.Broadcast() @@ -28,7 +27,6 @@ if SERVER then else for l, b in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do local wep = v:Give(b) - v:GiveAmmo(300, wep:GetPrimaryAmmoType()) end end @@ -42,8 +40,8 @@ if SERVER then local function DataTheftSync(ply) if GetGlobalBool(GM_DATATHEFT) and not ply.DataTheftSynced then net.Start("Infection_Sync") - net.WriteFloat(Infection_StartTime) - net.WriteFloat(Infection_EndTime) + net.WriteFloat(Infection_StartTime) + net.WriteFloat(Infection_EndTime) net.Send(ply) ply.DataTheftSynced = true @@ -91,14 +89,14 @@ if CLIENT then end end - net.Receive("DataTheft_Sync", function () + net.Receive("DataTheft_Sync", function() hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName) end) local chatcolor = Color(200, 200, 200) - net.Receive("DataTheft_Start", function () + net.Receive("DataTheft_Start", function() hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName) chat.AddText(chatcolor, "Data Theft! Kill players to collect data, deposit data in banks") end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua index 78d98a5..cbe3666 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Dive.lua @@ -1,35 +1,30 @@ -local totsugeki = CreateConVar("Beatrun_Totsugeki", 1, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}, "Oh no...", 0, 1) -local totsugekispam = CreateConVar("Beatrun_TotsugekiSpam", 0, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}, "OH NO...", 0, 1) -local totsugekiheading = CreateConVar("Beatrun_TotsugekiHeading", 0, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}, "Can we dive on the x axis?", 0, 1) -local totsugekidir = CreateConVar("Beatrun_TotsugekiDir", 0, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}, "Can we dive into another dir?", 0, 1) +local totsugeki = CreateConVar("Beatrun_Totsugeki", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Oh no...", 0, 1) +local totsugekispam = CreateConVar("Beatrun_TotsugekiSpam", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "OH NO...", 0, 1) +local totsugekiheading = CreateConVar("Beatrun_TotsugekiHeading", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Can we dive on the x axis?", 0, 1) +local totsugekidir = CreateConVar("Beatrun_TotsugekiDir", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Can we dive into another dir?", 0, 1) local function Dive(ply, mv, cmd) if (not ply:GetDive() or ply:GetDive() and ply.QuakeJumping and totsugeki:GetBool() and totsugekispam:GetBool()) and ply:GetCrouchJump() and mv:KeyPressed(IN_ATTACK2) then local vel = mv:GetVelocity() local vel2 = Vector(vel) vel2.z = 0 + local vel2len = vel2:Length() local ang = cmd:GetViewAngles() ang.x = 0 + local velmul = 15 / (math.max(vel2len - 100, 40) * 0.003) vel:Add(ang:Forward() * velmul) vel:Add(Vector(0, 0, 70)) + mv:SetVelocity(vel) + ply:SetCrouchJumpTime(CurTime() + 1.65) ply:SetDive(true) + + ply:ViewPunch(Angle(-6,0,0)) + ParkourEvent("divestart", ply) if ply:UsingRH() and ply:GetActiveWeapon():GetQuakeJumping() and totsugeki:GetBool() then @@ -40,12 +35,14 @@ local function Dive(ply, mv, cmd) local effectdata = EffectData() effectdata:SetOrigin(vPoint) + util.Effect("WaterSurfaceExplosion", effectdata) elseif CLIENT_IFTP() then local vPoint = mv:GetOrigin() local effectdata = EffectData() effectdata:SetOrigin(vPoint) + util.Effect("WaterSurfaceExplosion", effectdata) end @@ -73,7 +70,6 @@ local function Dive(ply, mv, cmd) if ply:GetMoveType() == MOVETYPE_NOCLIP or ply:WaterLevel() >= 3 or not ply:Alive() then ply:SetDive(false) ply:SetCrouchJump(false) - ply.DiveSliding = false ParkourEvent("diveslideend", ply) @@ -89,7 +85,6 @@ local function Dive(ply, mv, cmd) if ply:OnGround() and ply:GetSafetyRollKeyTime() <= CurTime() then ply.DiveSliding = true - ply:SetDive(false) elseif ply:OnGround() and mv:KeyDown(IN_BULLRUSH) then mv:SetButtons(0) @@ -97,4 +92,4 @@ local function Dive(ply, mv, cmd) end end -hook.Add("SetupMove", "Dive", Dive) +hook.Add("SetupMove", "Dive", Dive) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Endless_Run.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Endless_Run.lua index 9e58b87..a6a1c2b 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Endless_Run.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Endless_Run.lua @@ -1,21 +1,17 @@ print("h") +--[[ local prefabs = { basic_floor = { - { - Vector(), - Vector(300, 300, 50), - 0, - 0, - 0 - } + {Vector(), Vector(300, 300, 50), 0, 0, 0} } } +]] function SpawnPrefab(pos, data) for k, v in ipairs(data) do - local mins = v[1] - local maxs = v[2] + -- local mins = v[1] + -- local maxs = v[2] local offsetx = v[3] or 0 local offsety = v[4] or 0 local offsetz = v[5] or 0 @@ -23,4 +19,4 @@ function SpawnPrefab(pos, data) offsetvec:Add(pos) end -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua index bf1e06f..61c8602 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Grapple.lua @@ -1,26 +1,16 @@ if CLIENT then local circle = Material("circlesmooth.png", "nocull smooth") - hook.Add("HUDPaint", "grappleicon", function () + hook.Add("HUDPaint", "grappleicon", function() local ply = LocalPlayer() - if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then - return - end - - if not ply:Alive() or Course_Name ~= "" then - return - end + if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end + if not ply:Alive() or Course_Name ~= "" then return end local activewep = ply:GetActiveWeapon() - if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then - return - end - - if GetGlobalBool(GM_INFECTION) then - return - end + if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then return end + if GetGlobalBool(GM_INFECTION) then return end if not ply.GrappleHUD_tr then ply.GrappleHUD_tr = {} @@ -35,6 +25,7 @@ if CLIENT then local w2s = ply:GetGrapplePos():ToScreen() cam.End3D() + surface.SetDrawColor(255, 255, 255) surface.SetMaterial(circle) surface.DrawTexturedRect(w2s.x - SScaleX(4), w2s.y - SScaleY(4), SScaleX(8), SScaleY(8)) @@ -42,9 +33,7 @@ if CLIENT then return end - if ply:EyeAngles().x > -15 or ply:GetWallrun() ~= 0 then - return - end + if ply:EyeAngles().x > -15 or ply:GetWallrun() ~= 0 then return end local trout = ply:GetEyeTrace() local dist = trout.HitPos:DistToSqr(ply:GetPos()) @@ -55,6 +44,7 @@ if CLIENT then local w2s = trout.HitPos:ToScreen() cam.End3D() + surface.SetDrawColor(255, 255, 255) surface.SetMaterial(circle) surface.DrawTexturedRect(w2s.x - SScaleX(4), w2s.y - SScaleY(4), SScaleX(8), SScaleY(8)) @@ -64,18 +54,10 @@ end local zpunchstart = Angle(2, 0, 0) -hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) - if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then - return - end - - if not ply:Alive() or Course_Name ~= "" then - return - end - - if GetGlobalBool(GM_INFECTION) and not ply:GetNW2Entity("Swingrope") then - return - end +hook.Add("SetupMove", "Grapple", function(ply, mv, cmd) + if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end + if not ply:Alive() or Course_Name ~= "" then return end + if GetGlobalBool(GM_INFECTION) and not ply:GetNW2Entity("Swingrope") then return end local activewep = ply:GetActiveWeapon() local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands" @@ -98,6 +80,7 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) vel.z = -math.abs(vel.z) mv:SetVelocity(vel) + ply:SetGrapplePos(trout.HitPos) ply:SetGrappling(true) ply:SetGrappleLength(mv:GetOrigin():Distance(trout.HitPos)) @@ -112,6 +95,7 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) ply:ViewPunch(zpunchstart) grappled = true + ply.GrappleLengthOld = ply:GetGrappleLength() end end @@ -119,7 +103,7 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) if ply:GetGrappling() then local startshrink = (ply.GrappleLengthOld or 0) - ply:GetGrappleLength() < 200 local shmovemul = startshrink and 4 or 1 - local gpos = ply:GetGrapplePos() + -- local gpos = ply:GetGrapplePos() local pos = mv:GetOrigin() local eyepos = mv:GetOrigin() eyepos.z = eyepos.z + 64 @@ -135,16 +119,16 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) local ang = cmd:GetViewAngles() ang.x = 0 ang = ang:Forward() - ang:Mul(200) - ang.z = 200 mv:SetVelocity(mv:GetVelocity() * 0.5 + ang) + ply:SetNW2Entity("Swingrope", nil) end ParkourEvent("jump", ply) + table.Empty(ply.ZiplineTraceOut) return @@ -160,14 +144,16 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) ply:SetGrappleLength(ply:GetGrappleLength() - FrameTime() * 250) end - local vel = mv:GetVelocity() + -- local vel = mv:GetVelocity() local ang = cmd:GetViewAngles() ang.x = 0 + local fmove = ang:Forward() * mv:GetForwardSpeed() * 6e-05 * shmovemul local smove = ang:Right() * mv:GetSideSpeed() * 2.5e-05 * shmovemul local newvel = fmove + smove local gposd = ply:GetGrapplePos() local posd = mv:GetOrigin() + gposd.z = 0 posd.z = 0 newvel.z = gposd:Distance(posd) / ply:GetGrappleLength() * 5 @@ -177,10 +163,12 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) if ply:GetGrappleLength() < ply:GetGrapplePos():Distance(pos) and not ply:OnGround() then local tr = ply.Grapple_tr local trout = ply.Grapple_trout - tr.start = mv:GetOrigin() - tr.endpos = mv:GetOrigin() - local mins, maxs = ply:GetHull() + tr.start = mv:GetOrigin() + + tr.endpos = mv:GetOrigin() + + local mins, maxs = ply:GetHull() mins:Mul(1.01) maxs:Mul(1.01) @@ -192,7 +180,6 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd) util.TraceHull(tr) local vel = pos - ply:GetGrapplePos() - vel:Normalize() if not trout.Hit then @@ -219,7 +206,7 @@ local ropetop = Vector() local ropelerp = 0 local ropedown = Vector(0, 0, 20) -hook.Add("PostDrawTranslucentRenderables", "GrappleBeam", function () +hook.Add("PostDrawTranslucentRenderables", "GrappleBeam", function() local ply = LocalPlayer() if ply:GetGrappling() then @@ -229,39 +216,35 @@ hook.Add("PostDrawTranslucentRenderables", "GrappleBeam", function () BA = BodyAnim end - if not IsValid(BA) then - return - end + if not IsValid(BA) then return end BA:SetupBones() local rhand = BA:LookupBone("ValveBiped.Bip01_R_Finger41") local lhand = BA:LookupBone("ValveBiped.Bip01_L_Finger21") - if BA:GetBoneMatrix(rhand) == nil then - return - end + if BA:GetBoneMatrix(rhand) == nil then return end local rhandpos = BA:GetBoneMatrix(rhand):GetTranslation() - - if not rhandpos then - return - end + if not rhandpos then return end rhandpos:Sub(BA:GetRight() * 2.5) local lhandpos = BA:GetBoneMatrix(lhand):GetTranslation() ropetop:Set(lhandpos) + render.SetMaterial(cablemat) render.StartBeam(2) local up = (rhandpos - lhandpos):Angle():Forward() - up:Mul(20) + rhandpos:Add(up) + render.DrawBeam(LerpVector(ropelerp, lhandpos - ropedown, rhandpos), lhandpos, 1.5, 0, 1) render.DrawBeam(ropetop, ply:GetGrapplePos(), 1.5, 0, 1) + BodyAnim:SetSequence("grapplecenter") ropelerp = math.Approach(ropelerp, 1, FrameTime() * 2) @@ -283,9 +266,7 @@ function CreateSwingrope(startpos, length) end local function Swingrope(ply, mv, cmd) - if not ply.ZiplineTrace then - return - end + if not ply.ZiplineTrace then return end if not IsValid(ply:GetZipline()) and not ply:GetGrappling() and not ply:Crouching() and not ply:OnGround() and ply:GetZiplineDelay() < CurTime() then local trout = ply.ZiplineTraceOut @@ -296,9 +277,11 @@ local function Swingrope(ply, mv, cmd) local startpos = trentity:GetStartPos() local endpos = trentity:GetEndPos() local bestpos = endpos.z < startpos.z and startpos or endpos + vel.z = -math.abs(vel.z) mv:SetVelocity(vel) + ply:SetGrapplePos(bestpos) ply:SetGrappling(true) ply:SetGrappleLength(mv:GetOrigin():Distance(bestpos)) @@ -312,6 +295,7 @@ local function Swingrope(ply, mv, cmd) ply:SetNW2Entity("Swingrope", trentity) local eyeang = cmd:GetViewAngles() + vel.z = 0 eyeang.x = 0 @@ -320,4 +304,4 @@ local function Swingrope(ply, mv, cmd) end end -hook.Add("SetupMove", "Swingrope", Swingrope) +hook.Add("SetupMove", "Swingrope", Swingrope) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Infection.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Infection.lua index 3f8fa36..d0825a7 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Infection.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Infection.lua @@ -48,28 +48,26 @@ if SERVER then for k, v in pairs(player.GetAll()) do if not didgun and not ended and v:Alive() and not v:GetNW2Bool("Infected") then hook.Run("Infection_LastManGun", v) - didgun = true - break end end end end - net.Receive("Infection_Touch", function (len, ply) + net.Receive("Infection_Touch", function(len, ply) local victim = net.ReadEntity() - if ended or not ply:Alive() or not ply:GetNW2Bool("Infected") or victim:GetNW2Bool("Infected") then - return - end + if ended or not ply:Alive() or not ply:GetNW2Bool("Infected") or victim:GetNW2Bool("Infected") then return end if IsValid(victim) and victim:IsPlayer() and ply:GetPos():Distance(victim:GetPos()) < 300 then victim:SetNW2Bool("Infected", true) + net.Start("Infection_Announce") - net.WriteEntity(ply) - net.WriteEntity(victim) + net.WriteEntity(ply) + net.WriteEntity(victim) net.Broadcast() + victim:SetNW2Float("PBTime", CurTime() - Infection_StartTime) local humancount = HumanCount() @@ -79,13 +77,14 @@ if SERVER then if humancount < 1 then victim:EmitSound("blackout_hit_0" .. rand(1, 3) .. ".wav") + net.Start("Infection_End") - net.WriteFloat(CurTime()) + net.WriteFloat(CurTime()) net.Broadcast() ended = true - timer.Simple(15, function () + timer.Simple(15, function() if ended and GetGlobalBool(GM_INFECTION) then Beatrun_StartInfection() end @@ -99,8 +98,8 @@ if SERVER then local function InfectionSync(ply) if GetGlobalBool(GM_INFECTION) and not ply.InfectionSynced then net.Start("Infection_Sync") - net.WriteFloat(Infection_StartTime) - net.WriteFloat(Infection_EndTime) + net.WriteFloat(Infection_StartTime) + net.WriteFloat(Infection_EndTime) net.Send(ply) ply.InfectionSynced = true @@ -137,27 +136,26 @@ if SERVER then if numinfected == 1 then local infected = players[rand(#players)] - infected:SetNW2Bool("Infected", true) + net.Start("Infection_XPReward") - net.WriteBool(false) + net.WriteBool(false) net.Send(infected) else table.Shuffle(players) for i = 1, numinfected do players[i]:SetNW2Bool("Infected", true) + net.Start("Infection_XPReward") - net.WriteBool(false) + net.WriteBool(false) net.Send(players[i]) end end end local function InfectionTimer() - if not GetGlobalBool(GM_INFECTION) then - return - end + if not GetGlobalBool(GM_INFECTION) then return end if player.GetCount() <= 1 then Beatrun_StopInfection() @@ -174,7 +172,7 @@ if SERVER then local timeremaining = Infection_EndTime - CurTime() if not didmusic and revealed and timeremaining <= 60 and timeremaining >= 50 and player.GetCount() >= 5 and cachedhumancount == 1 then - timer.Simple(0.1, function () + timer.Simple(0.1, function() for k, v in ipairs(player.GetAll()) do if v:Alive() and not v:GetNW2Bool("Infected") then net.Start("Infection_LastMan") @@ -196,12 +194,12 @@ if SERVER then end net.Start("Infection_End") - net.WriteFloat(CurTime()) + net.WriteFloat(CurTime()) net.Broadcast() ended = true - timer.Simple(15, function () + timer.Simple(15, function() if ended and GetGlobalBool(GM_INFECTION) then Beatrun_StartInfection() end @@ -210,21 +208,14 @@ if SERVER then end function Beatrun_StartInfection() - if GetGlobalBool(GM_INFECTION) and not ended then - return - end - - if Course_Name ~= "" then - return - end - - if player.GetCount() < 2 then - return - end + if GetGlobalBool(GM_INFECTION) and not ended then return end + if Course_Name ~= "" then return end + if player.GetCount() < 2 then return end net.Start("Infection_Start") - net.WriteFloat(CurTime()) + net.WriteFloat(CurTime()) net.Broadcast() + SetGlobalBool(GM_INFECTION, true) revealed = false @@ -232,6 +223,7 @@ if SERVER then didmusic = false didgun = false cachedhumancount = 0 + local players = player.GetAll() for k, v in ipairs(players) do @@ -256,9 +248,7 @@ if SERVER then end function InfectionDeath(ply) - if not GetGlobalBool(GM_INFECTION) then - return - end + if not GetGlobalBool(GM_INFECTION) then return end if revealed and Infection_StartTime < CurTime() and not ply:GetNW2Bool("Infected") then if ply.InfectionWuzHere then @@ -266,9 +256,10 @@ if SERVER then end ply:SetNW2Bool("Infected", true) + net.Start("Infection_Announce") - net.WriteEntity(ply) - net.WriteEntity(ply) + net.WriteEntity(ply) + net.WriteEntity(ply) net.Broadcast() local humancount = HumanCount() @@ -278,12 +269,12 @@ if SERVER then if humancount < 1 then net.Start("Infection_End") - net.WriteFloat(CurTime()) + net.WriteFloat(CurTime()) net.Broadcast() ended = true - timer.Simple(15, function () + timer.Simple(15, function() if ended and GetGlobalBool(GM_INFECTION) then Beatrun_StartInfection() end @@ -293,7 +284,7 @@ if SERVER then local timeremaining = Infection_EndTime - CurTime() if timeremaining <= 70 and timeremaining >= 50 and player.GetCount() > 6 and humancount == 1 then - timer.Simple(0.1, function () + timer.Simple(0.1, function() for k, v in ipairs(player.GetAll()) do if v:Alive() and not v:GetNW2Bool("Infected") then net.Start("Infection_LastMan") @@ -339,8 +330,10 @@ if CLIENT then ang.x = 0 ang.z = 0 ang.y = ang.y + 180 + view.origin = pos view.angles = ang + lookingbehind = true LocalPlayer():DrawViewModel(false) @@ -373,26 +366,28 @@ if CLIENT then local chatcolor = Color(200, 200, 200) - net.Receive("Infection_Start", function () + net.Receive("Infection_Start", function() local start = net.ReadFloat() local noclipbind = input.LookupBinding("noclip") or "n" noclipkey = input.GetKeyCode(noclipbind) endtime = 0 + Infection_StartTime = start + 10 Infection_EndTime = start + 190 hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName) hook.Add("CalcView", "InfectionCalcView", InfectionCalcView) + chat.AddText(chatcolor, "Infection! Touch other players to infect them\n", math.max(math.floor(player.GetCount() / 4), 1) .. " player(s) will become infected in 10s") end) local music = nil - net.Receive("Infection_End", function () + net.Receive("Infection_End", function() local survivors = "" endtime = net.ReadFloat() - timer.Simple(0.5, function () + timer.Simple(0.5, function() for k, v in ipairs(player.GetAll()) do if not v:GetNW2Bool("Infected") then survivors = survivors .. v:Nick() .. ", " @@ -418,8 +413,9 @@ if CLIENT then music:Stop() end end) - net.Receive("Infection_LastMan", function () - sound.PlayFile("sound/music/infection_countdown.mp3", "", function (station, errCode, errStr) + + net.Receive("Infection_LastMan", function() + sound.PlayFile("sound/music/infection_countdown.mp3", "", function(station, errCode, errStr) if IsValid(station) then station:SetVolume(0.5) station:Play() @@ -432,7 +428,7 @@ if CLIENT then local red = Color(255, 25, 25) local yellow = Color(255, 255, 100) - net.Receive("Infection_Announce", function () + net.Receive("Infection_Announce", function() local attacker = net.ReadEntity() local victim = net.ReadEntity() @@ -440,7 +436,7 @@ if CLIENT then if attacker == victim then chat.AddText(attacker, red, " died!") else - chat.AddText(attacker, red, " has infected ", victim, "!") + chat.AddText(attacker, red, " has infected ", yellow, victim, "!") end attacker.InfectionTouchDelay = CurTime() + 3 @@ -452,9 +448,7 @@ if CLIENT then end) local function InfectionHUD() - if not GetGlobalBool(GM_INFECTION) then - return - end + if not GetGlobalBool(GM_INFECTION) then return end surface.SetTextColor(color_white) surface.SetFont("BeatrunHUD") @@ -466,8 +460,9 @@ if CLIENT then end remainingtime = math.max(remainingtime, 0) + local timer = string.FormattedTime(remainingtime, "%02i:%02i:%02i") - local tw, th = surface.GetTextSize(timer) + local tw, _ = surface.GetTextSize(timer) surface.SetTextPos(ScrW() * 0.5 - tw * 0.5, ScrH() * 0.25) surface.DrawText(timer) @@ -485,36 +480,36 @@ if CLIENT then ["$pp_colour_mulr"] = 0 } - hook.Add("BeatrunSpawn", "InfectionSpawnDelay", function () + hook.Add("BeatrunSpawn", "InfectionSpawnDelay", function() LocalPlayer().InfectionTouchDelay = CurTime() + 6 end) local function BeatrunInfectedVision() if GetGlobalBool(GM_INFECTION) and LocalPlayer():GetNW2Bool("Infected") then tab["$pp_colour_colour"] = CurTime() > (LocalPlayer().InfectionTouchDelay or 0) and 0.91 or 0.1 - DrawColorModify(tab) end end hook.Add("HUDPaint", "InfectionHUD", InfectionHUD) hook.Add("RenderScreenspaceEffects", "BeatrunInfectedVision", BeatrunInfectedVision) - net.Receive("Infection_XPReward", function () + + net.Receive("Infection_XPReward", function() local humanwin = net.ReadBool() if humanwin then - chat.AddText(chatcolor, "You were awarded 200 XP for surviving") LocalPlayer():AddXP(200) + chat.AddText(chatcolor, "You were awarded 200 XP for surviving") else - chat.AddText(chatcolor, "You were awarded 100 XP for spawning as an infected") LocalPlayer():AddXP(100) + chat.AddText(chatcolor, "You were awarded 100 XP for spawning as an infected") end end) - net.Receive("Infection_Sync", function () + + net.Receive("Infection_Sync", function() endtime = 0 Infection_StartTime = net.ReadFloat() Infection_EndTime = net.ReadFloat() - hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName) end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua index 16b6f8a..123c365 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Ladder.lua @@ -1,7 +1,7 @@ if SERVER and game.SinglePlayer() then util.AddNetworkString("Ladder_SPFix") elseif CLIENT and game.SinglePlayer() then - net.Receive("Ladder_SPFix", function () + net.Receive("Ladder_SPFix", function() local ply = LocalPlayer() local ang = ply:EyeAngles() ang.y = ply:GetLadder():GetAngles().y - 180 @@ -17,16 +17,16 @@ end local function LadderCheck(ply, mv, cmd, ladder) local ladderang = ladder:GetAngles() - if math.abs(math.AngleDifference(cmd:GetViewAngles().y, ladderang.y - 180)) > 30 then - return false - end + if math.abs(math.AngleDifference(cmd:GetViewAngles().y, ladderang.y - 180)) > 30 then return false end local zlevel = mv:GetOrigin().z local newpos = ladder:GetPos() + ladderang:Forward() * 19 newpos.z = zlevel + ladderang.z = 0 ladderang.x = 0 ladderang.y = ladderang.y - 180 + local origin = mv:GetOrigin() if CLIENT then @@ -56,13 +56,15 @@ local function LadderCheck(ply, mv, cmd, ladder) local event = ply:OnGround() and "ladderenter" or "ladderenterhang" ParkourEvent(event, ply) + ply:SetLadderStartPos(mv:GetOrigin()) ply:SetLadderEndPos(newpos) + mv:SetOrigin(newpos) + ply:SetLadderEntering(true) ply:SetLadderHand(true) ply:SetMoveType(MOVETYPE_NOCLIP) - ply.LadderEnd = false ply.LadderHardStart = not ply:OnGround() @@ -78,6 +80,7 @@ end local function LadderThink(ply, mv, cmd, ladder) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) + cmd:ClearMovement() if ply:GetLadderEntering() then @@ -152,6 +155,7 @@ local function LadderThink(ply, mv, cmd, ladder) if ladder:GetLadderHeight() <= ply:GetLadderHeight() and not ply.LadderEnd then if not ply.LadderTrace then ply.LadderTraceOut = {} + ply.LadderTrace = { mask = MASK_SHOT_HULL, collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT, @@ -163,6 +167,7 @@ local function LadderThink(ply, mv, cmd, ladder) local tr = ply.LadderTrace local trout = ply.LadderTraceOut + ply.LadderTrace.start = mv:GetOrigin() + Vector(0, 0, 100) + ladder:GetAngles():Forward() * -35 ply.LadderTrace.endpos = ply.LadderTrace.start - Vector(0, 0, 150) ply.LadderTrace.filter = ply @@ -174,8 +179,8 @@ local function LadderThink(ply, mv, cmd, ladder) ply:SetLadderLerp(0) ply:SetLadderStartPos(mv:GetOrigin()) ply:SetLadderEndPos(trout.HitPos) - ply.LadderEnd = true + local event = ply:GetLadderHand() and "ladderexittoplefthand" or "ladderexittoprighthand" ParkourEvent(event, ply) @@ -261,18 +266,18 @@ function CreateLadder(pos, angy, mul) ladderang[2] = angy if not mul then - local ledgedetect = nil + -- local ledgedetect = nil maxheight = util.QuickTrace(pos, laddertraceup).HitPos - maxheight:Sub(ladderang:Forward() * 10) - maxheight = util.QuickTrace(maxheight, laddertracedown).HitPos.z + mul = (maxheight - pos.z) / 125 + 0.1 end local ladder = ents.Create("br_ladder") pos:Add(ladderang:Forward() * 10) + ladder:SetPos(pos) ladder:SetAngles(ladderang) ladder:Spawn() @@ -280,4 +285,4 @@ function CreateLadder(pos, angy, mul) return ladder end -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/MP_Sync.lua b/beatrun/gamemodes/beatrun/gamemode/sh/MP_Sync.lua index 355fc33..843b3d5 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/MP_Sync.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/MP_Sync.lua @@ -1,5 +1,5 @@ if CLIENT then - hook.Add("InitPostEntity", "JoinSync", function () + hook.Add("InitPostEntity", "JoinSync", function() net.Start("JoinSync") net.SendToServer() end) @@ -7,18 +7,19 @@ end if SERVER then util.AddNetworkString("JoinSync") - net.Receive("JoinSync", function (len, ply) + + net.Receive("JoinSync", function(len, ply) if not ply.Synced then net.Start("BuildMode_Sync") - net.WriteFloat(Course_StartPos.x) - net.WriteFloat(Course_StartPos.y) - net.WriteFloat(Course_StartPos.z) - net.WriteFloat(Course_StartAng) - net.WriteString(Course_Name) - net.WriteString(Course_ID) + net.WriteFloat(Course_StartPos.x) + net.WriteFloat(Course_StartPos.y) + net.WriteFloat(Course_StartPos.z) + net.WriteFloat(Course_StartAng) + net.WriteString(Course_Name) + net.WriteString(Course_ID) net.Send(ply) ply.Synced = true end end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua index 0ca4168..f365e25 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Melee.lua @@ -1,7 +1,5 @@ -local kickglitch = CreateConVar("Beatrun_KickGlitch", 1, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}) +local kickglitch = CreateConVar("Beatrun_KickGlitch", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}) + local tr = {} local tr_result = {} MELEE_WRRIGHT = 6 @@ -10,66 +8,48 @@ MELEE_DROPKICK = 4 MELEE_AIRKICK = 3 MELEE_SLIDEKICK = 2 MELEE_PUNCH = 1 + local meleedata = { { - "meleeslide", - 0.15, - 1, - function (ply, mv, cmd) + "meleeslide", 0.15, 1, function(ply, mv, cmd) ply:CLViewPunch(Angle(2, 0, 0)) end, - angle_zero, - 20 + angle_zero, 20 }, { - "meleeslide", - 0.175, - 0.6, - function (ply, mv, cmd) + "meleeslide", 0.175, 0.6, function(ply, mv, cmd) if CLIENT_IFTP() then ply:CLViewPunch(Angle(0.05, 0, -1)) elseif game.SinglePlayer() then ply:ViewPunch(Angle(0.1, 0, -1.5)) end end, - Angle(-4, 0, 0), - 50, - true + Angle(-4, 0, 0), 50, true }, { - "meleeairstill", - 0.1, - 1, - function (ply, mv, cmd) + "meleeairstill", 0.1, 1, function(ply, mv, cmd) if CLIENT_IFTP() then ply:CLViewPunch(Angle(0.5, 0, -0.1)) elseif game.SinglePlayer() then ply:ViewPunch(Angle(1, 0, -0.25)) end end, - Angle(-15, 0, -5), - 50 + Angle(-15, 0, -5), 50 }, { - "meleeair", - 0.15, - 1, - function (ply, mv, cmd) + "meleeair", 0.15, 1, function(ply, mv, cmd) if CLIENT_IFTP() then ply:CLViewPunch(Angle(0.05, 0, -1)) elseif game.SinglePlayer() then ply:ViewPunch(Angle(0.1, 0, -1.5)) end end, - Angle(-5, 0, -2.5), - 50 + Angle(-5, 0, -2.5), 50 } } + meleedata[5] = { - "meleewrleft", - 0.2, - 0.75, - function (ply, mv, cmd) + "meleewrleft", 0.2, 0.75, function(ply, mv, cmd) if CLIENT_IFTP() then ply:CLViewPunch(Angle(0.075, 0, 1)) elseif game.SinglePlayer() then @@ -90,14 +70,11 @@ meleedata[5] = { ply:SetEyeAngles(ang) end end, - Angle(-5, 0, 2.5), - 80 + Angle(-5, 0, 2.5), 80 } + meleedata[6] = { - "meleewrright", - 0.2, - 0.75, - function (ply, mv, cmd) + "meleewrright", 0.2, 0.75, function(ply, mv, cmd) if CLIENT_IFTP() then ply:CLViewPunch(Angle(0.075, 0, -1)) elseif game.SinglePlayer() then @@ -118,9 +95,9 @@ meleedata[6] = { ply:SetEyeAngles(ang) end end, - Angle(-5, 0, -2.5), - 80 + Angle(-5, 0, -2.5), 80 } + local doors = { prop_door_rotating = true, func_door_rotating = true @@ -131,14 +108,10 @@ local function KeyMelee(ply, mv) end local function MeleeType(ply, mv, cmd) - if IsValid(ply:GetZipline()) or ply:GetGrappling() or IsValid(ply:GetLadder()) then - return 0 - end + if IsValid(ply:GetZipline()) or ply:GetGrappling() or IsValid(ply:GetLadder()) then return 0 end if ply:GetWallrun() ~= 0 then - if ply:GetWallrun() == 1 then - return ply:GetMelee() - end + if ply:GetWallrun() == 1 then return ply:GetMelee() end ply:SetMelee(ply:GetWallrun() == 3 and MELEE_WRLEFT or MELEE_WRRIGHT) elseif not ply:OnGround() then @@ -156,17 +129,15 @@ end local function MeleeCheck(ply, mv, cmd) local melee = MeleeType(ply, mv, cmd) - if melee == 0 then - return - end + if melee == 0 then return end ParkourEvent(meleedata[melee][1], ply) + ply:SetMeleeTime(CurTime() + meleedata[melee][2]) ply:SetMeleeDelay(CurTime() + meleedata[melee][3]) ply.MeleeDir = mv:GetVelocity() ply.MeleeDir.z = 0 - ply.MeleeDir:Normalize() if ply.MeleeDir:Length() < 1 then @@ -193,13 +164,15 @@ local function MeleeThink(ply, mv, cmd) ply:LagCompensation(true) ply:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST, true) + util.TraceHull(tr) + ply:LagCompensation(false) if ply:GetMelee() >= 5 then local vel = mv:GetVelocity() - vel:Add(ply:GetWallrunDir() * 0.5 * vel:Length()) + mv:SetVelocity(vel) end @@ -216,20 +189,20 @@ local function MeleeThink(ply, mv, cmd) if SERVER and IsValid(ent) and (not ent:IsPlayer() or Course_Name == "" and not GetGlobalBool(GM_INFECTION) and GetConVar("sbox_playershurtplayers"):GetBool()) then local d = DamageInfo() - d:SetDamage(meleedata[ply:GetMelee()][6]) d:SetAttacker(ply) d:SetInflictor(ply) d:SetDamageType(DMG_CLUB) d:SetDamagePosition(tr.start) d:SetDamageForce(ply:EyeAngles():Forward() * 7000) + ent:TakeDamageInfo(d) if SERVER and ent:GetClass() == "func_breakable_surf" then ent:Input("Shatter", nil, nil, Vector(0, 0, 250)) - timer.Simple(0, function () - local BLEH = ents.Create("prop_physics") + timer.Simple(0, function() + local BLEH = ents.Create("prop_physics") BLEH:SetPos(tr_result.HitPos) BLEH:SetAngles(Angle(0, 0, 0)) BLEH:SetModel("models/props_junk/wood_crate001a.mdl") @@ -237,7 +210,8 @@ local function MeleeThink(ply, mv, cmd) BLEH:SetCollisionGroup(COLLISION_GROUP_WORLD) BLEH:Spawn() BLEH:Activate() - timer.Simple(0.01, function () + + timer.Simple(0.01, function() if BLEH and IsValid(BLEH) then BLEH:Remove() end @@ -250,9 +224,7 @@ local function MeleeThink(ply, mv, cmd) end if doors[ent:GetClass()] then - if ent:GetInternalVariable("m_bLocked") then - return - end + if ent:GetInternalVariable("m_bLocked") then return end local speed = ent:GetInternalVariable("speed") @@ -263,17 +235,17 @@ local function MeleeThink(ply, mv, cmd) ent:SetSaveValue("speed", ent.oldspeed * 4) ent:Use(ply) - ent.bashdelay = CurTime() + 1 - ent:SetCycle(1) ent:Fire("Lock") - timer.Simple(1, function () + + timer.Simple(1, function() if IsValid(ent) then ent:SetSaveValue("speed", ent.oldspeed) ent:Fire("Unlock") end end) + ent:EmitSound("Door.Barge") return false @@ -289,7 +261,7 @@ local function MeleeThink(ply, mv, cmd) end end -hook.Add("SetupMove", "Melee", function (ply, mv, cmd) +hook.Add("SetupMove", "Melee", function(ply, mv, cmd) if not ply:Alive() then ply:SetMeleeTime(0) ply:SetMelee(0) @@ -300,12 +272,10 @@ hook.Add("SetupMove", "Melee", function (ply, mv, cmd) if ply:GetMeleeDelay() < CurTime() and ply:GetMelee() ~= 0 then if kickglitch:GetBool() and ply:GetMelee() >= 5 and mv:KeyDown(IN_JUMP) and not ply:OnGround() then local vel = mv:GetVelocity() - vel:Mul(1.25) - vel.z = 300 - mv:SetVelocity(vel) + ParkourEvent("jumpslow", ply) end @@ -320,4 +290,4 @@ hook.Add("SetupMove", "Melee", function (ply, mv, cmd) if ply:GetMeleeTime() ~= 0 then MeleeThink(ply, mv, cmd) end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/MenuBinds.lua b/beatrun/gamemodes/beatrun/gamemode/sh/MenuBinds.lua index 2d8a767..3dc01ec 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/MenuBinds.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/MenuBinds.lua @@ -1,5 +1,5 @@ -hook.Add("PlayerButtonDown", "PlayerButtonDownWikiExample", function (ply, button) +hook.Add("PlayerButtonDown", "PlayerButtonDownWikiExample", function(ply, button) if (game.SinglePlayer() or CLIENT and IsFirstTimePredicted()) and button == KEY_F4 then ply:ConCommand("Beatrun_CourseMenu") end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Misc.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Misc.lua index 2a656b0..8cf3ad0 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Misc.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Misc.lua @@ -3,37 +3,20 @@ if SERVER then util.AddNetworkString("SPParkourEvent") - local spawn = { - "PlayerGiveSWEP", - "PlayerSpawnEffect", - "PlayerSpawnNPC", - "PlayerSpawnObject", - "PlayerSpawnProp", - "PlayerSpawnRagdoll", - "PlayerSpawnSENT", - "PlayerSpawnSWEP", - "PlayerSpawnVehicle" - } + local spawn = {"PlayerGiveSWEP", "PlayerSpawnEffect", "PlayerSpawnNPC", "PlayerSpawnObject", "PlayerSpawnProp", "PlayerSpawnRagdoll", "PlayerSpawnSENT", "PlayerSpawnSWEP", "PlayerSpawnVehicle"} local function BlockSpawn(ply) - if not ply:IsSuperAdmin() then - return false - end + if not ply:IsSuperAdmin() then return false end end for k, v in ipairs(spawn) do hook.Add(v, "BlockSpawn", BlockSpawn) end - hook.Add("IsSpawnpointSuitable", "NoSpawnFrag", function (ply) - return true - end) - hook.Add("AllowPlayerPickup", "AllowAdminsPickUp", function (ply, ent) - local sa = ply:IsSuperAdmin() + hook.Add("IsSpawnpointSuitable", "NoSpawnFrag", function(ply) return true end) - if not sa then - return false - end + hook.Add("AllowPlayerPickup", "AllowAdminsPickUp", function(ply, ent) + if not ply:IsSuperAdmin() then return false end end) function meta:GTAB(minutes) @@ -43,7 +26,7 @@ if SERVER then v:EmitSound("gtab.mp3", 0, 100, 1) end - timer.Simple(7.5, function () + timer.Simple(7.5, function() if IsValid(self) and self:SteamID64() == ID then self:Ban(minutes, "GTAB") @@ -60,20 +43,18 @@ if CLIENT then CreateClientConVar("Beatrun_CPSave", 1, true, true, "Respawning during a course will go back to the last hit checkpoint", 0, 1) end -hook.Add("PlayerNoClip", "BlockNoClip", function (ply, enabled) +hook.Add("PlayerNoClip", "BlockNoClip", function(ply, enabled) if enabled and Course_Name ~= "" and ply:GetNW2Int("CPNum", 1) ~= -1 then ply:SetNW2Int("CPNum", -1) if CLIENT_IFTP() then notification.AddLegacy("Noclip Enabled: Respawn to run the course", NOTIFY_ERROR, 2) elseif SERVER and game.SinglePlayer() then - ply:SendLua("notification.AddLegacy( \"Noclip Enabled: Respawn to run the course\", NOTIFY_ERROR, 2 )") + ply:SendLua("notification.AddLegacy(\"Noclip Enabled: Respawn to run the course\", NOTIFY_ERROR, 2)") end end - if enabled and (GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT)) then - return false - end + if enabled and (GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT)) then return false end end) function ParkourEvent(event, ply, ignorepred) @@ -82,13 +63,13 @@ function ParkourEvent(event, ply, ignorepred) if game.SinglePlayer() and SERVER then net.Start("SPParkourEvent") - net.WriteString(event) + net.WriteString(event) net.Broadcast() end end end -hook.Add("SetupMove", "JumpDetect", function (ply, mv, cmd) +hook.Add("SetupMove", "JumpDetect", function(ply, mv, cmd) if ply:OnGround() and not ply:GetWasOnGround() and mv:GetVelocity():Length() > 50 and ply:GetMEMoveLimit() < 375 then local vel = mv:GetVelocity() vel.z = 0 @@ -141,19 +122,17 @@ hook.Add("SetupMove", "JumpDetect", function (ply, mv, cmd) ply:SetWasOnGround(ply:OnGround()) end) -hook.Add("CanProperty", "BlockProperty", function (ply) - if not ply:IsSuperAdmin() then - return false - end + +hook.Add("CanProperty", "BlockProperty", function(ply) + if not ply:IsSuperAdmin() then return false end end) -hook.Add("CanDrive", "BlockDrive", function (ply) - if not ply:IsSuperAdmin() then - return false - end + +hook.Add("CanDrive", "BlockDrive", function(ply) + if not ply:IsSuperAdmin() then return false end end) if CLIENT and game.SinglePlayer() then - net.Receive("SPParkourEvent", function () + net.Receive("SPParkourEvent", function() local event = net.ReadString() hook.Run("OnParkour", event, LocalPlayer()) @@ -161,7 +140,7 @@ if CLIENT and game.SinglePlayer() then end if SERVER then - hook.Add("OnEntityCreated", "RemoveMirrors", function (ent) + hook.Add("OnEntityCreated", "RemoveMirrors", function(ent) if IsValid(ent) and ent:GetClass() == "func_reflective_glass" then SafeRemoveEntityDelayed(ent, 0.1) end @@ -172,9 +151,7 @@ if CLIENT then local blur = Material("pp/blurscreen") function draw_blur(a, d) - if render.GetDXLevel() < 90 then - return - end + if render.GetDXLevel() < 90 then return end surface.SetDrawColor(255, 255, 255) surface.SetMaterial(blur) @@ -189,12 +166,11 @@ if CLIENT then local draw_blur = draw_blur local impactblurlerp = 0 - local lastintensity = 0 + -- local lastintensity = 0 - hook.Add("HUDPaint", "DrawImpactBlur", function () + hook.Add("HUDPaint", "DrawImpactBlur", function() if impactblurlerp > 0 then impactblurlerp = math.Approach(impactblurlerp, 0, 25 * FrameTime()) - draw_blur(math.min(impactblurlerp, 10), 4) end end) @@ -203,4 +179,4 @@ if CLIENT then impactblurlerp = intensity lastintensity = intensity end -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Monkey.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Monkey.lua index 34812bb..b581516 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Monkey.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Monkey.lua @@ -6,8 +6,10 @@ local function SwingbarCheck(ply, mv, cmd) mins.x = mins.x * 1.5 maxs.y = maxs.y * 1.5 mins.y = mins.y * 1.5 + local tr = ply.Monkey_tr local trout = ply.Monkey_trout + tr.start = mv:GetOrigin() tr.endpos = tr.start tr.maxs = maxs @@ -22,9 +24,7 @@ local function SwingbarCheck(ply, mv, cmd) local dot = cmd:GetViewAngles():Forward():Dot(swingbar:GetAngles():Forward()) local dir = dot > 0 and true or false - if math.abs(dot) < 0.7 then - return - end + if math.abs(dot) < 0.7 then return end if CLIENT then swingbar:SetPredictable(true) @@ -39,7 +39,9 @@ local function SwingbarCheck(ply, mv, cmd) ply:SetSBPeak(0) ply:SetDive(false) ply:SetCrouchJump(false) + ParkourEvent("swingbar", ply) + mv:SetVelocity(vector_origin) if mv:KeyDown(IN_FORWARD) or mv:GetVelocity():Length() > 150 then @@ -55,7 +57,7 @@ local function SwingbarCheck(ply, mv, cmd) end local radius = 30 -local red = Color(255, 0, 0, 200) +-- local red = Color(255, 0, 0, 200) local circlepos = Vector() local axis = Vector(0, 0, 1) local dummyvec = Vector(1000, 1000, 1000) @@ -95,6 +97,7 @@ local function SwingbarThink(ply, mv, cmd) circlepos:Rotate(ang) pos = pos + circlepos + local origin = startlerp < 1 and LerpVector(startlerp, mv:GetOrigin(), pos) or pos ply:SetSBStartLerp(math.min(startlerp + 10 * FrameTime(), 1)) @@ -122,7 +125,6 @@ local function SwingbarThink(ply, mv, cmd) ply:SetSBOffsetSpeed(math.Approach(math.min(ply:GetSBOffsetSpeed(), 0), -1, math.abs(ply:GetSBOffset() / 100 - 1) * 5 * FrameTime())) else local a = (ply:GetSBOffset() - 50) / 50 - ply:SetSBOffsetSpeed(math.Approach(ply:GetSBOffsetSpeed(), 0, a * 5 * FrameTime())) end @@ -143,6 +145,7 @@ local function SwingbarThink(ply, mv, cmd) local ang = cmd:GetViewAngles() ang.x = 0 + local vel = ang:Forward() * 125 * ply:GetSBOffsetSpeed() vel.z = ply:GetSBOffset() * 2 @@ -150,7 +153,9 @@ local function SwingbarThink(ply, mv, cmd) ply:SetSwingbarLast(ply:GetSwingbar()) ply:SetSwingbar(nil) ply:SetWallrunDir(dummyvec) + mv:SetVelocity(vel) + ply:SetSBDelay(CurTime() + 1) if CLIENT_IFTP() or game.SinglePlayer() then @@ -184,4 +189,4 @@ local function Swingbar(ply, mv, cmd) end end -hook.Add("SetupMove", "Swingbar", Swingbar) +hook.Add("SetupMove", "Swingbar", Swingbar) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua b/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua index fb0f913..1ee8e66 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/PuristMode.lua @@ -2,10 +2,7 @@ if CLIENT then PuristMode = CreateClientConVar("Beatrun_PuristMode", "1", true, true, "Purist mode is a clientside preference that severely weakens the ability to strafe while in the air, which is how Mirror's Edge games handle this.\n0 = No restrictions\n1 = Reduced move speed in the air") end -local PuristModeForce = CreateConVar("Beatrun_PuristModeForce", 0, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}, "Force players to adhere to purist rules", 0, 1) +local PuristModeForce = CreateConVar("Beatrun_PuristModeForce", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Force players to adhere to purist rules", 0, 1) local function PuristMove(ply, mv, cmd) if not ply:OnGround() and not ply:GetGrappling() then @@ -14,10 +11,11 @@ local function PuristMove(ply, mv, cmd) if (purist > 0 or PuristModeForce:GetBool()) and ply:WaterLevel() == 0 then mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.001) mv:SetSideSpeed(mv:GetSideSpeed() * 0.001) + cmd:SetForwardMove(cmd:GetForwardMove() * 0.001) cmd:SetSideMove(cmd:GetSideMove() * 0.001) end end end -hook.Add("SetupMove", "PuristMove", PuristMove) +hook.Add("SetupMove", "PuristMove", PuristMove) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua index 203ffc5..1470fac 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Quickturn.lua @@ -3,13 +3,11 @@ if CLIENT then end function DoJumpTurn(lookbehind) - if not LocalPlayer():Alive() then - return - end + if not LocalPlayer():Alive() then return end VMLegs:Remove() - BodyAnim:SetSequence("jumpturnfly") + BodyAnim:SetSequence("jumpturnfly") BodyAnimCycle = 0 BodyAnimSpeed = 1 BodyLimitX = 40 @@ -17,13 +15,12 @@ function DoJumpTurn(lookbehind) if lookbehind then local vel = LocalPlayer():GetVelocity() - vel:Normalize() - vel.z = 0 - local ang = vel:Angle() + local ang = vel:Angle() ang:RotateAroundAxis(Vector(0, 0, 1), 180) + BodyAnim:SetAngles(ang) LocalPlayer().OrigEyeAng = ang @@ -31,9 +28,7 @@ function DoJumpTurn(lookbehind) end function DoJumpTurnStand() - if not LocalPlayer():Alive() then - return - end + if not LocalPlayer():Alive() then return end VMLegs:Remove() @@ -43,6 +38,7 @@ function DoJumpTurnStand() BodyAnim:SetSequence("jumpturnlandstandgun") else BodyAnim:SetSequence("jumpturnlandstand") + ParkourEvent("jumpturnlandstand", LocalPlayer(), game.SinglePlayer()) end @@ -67,11 +63,13 @@ local function Quickturn(ply, mv, cmd) if mv:KeyPressed(IN_JUMP) and (mv:KeyDown(IN_MOVELEFT) or mv:KeyDown(IN_MOVERIGHT)) then keypressed = true + ply.vwrturn = mv:KeyDown(IN_MOVERIGHT) and 1 or -1 + local eyeang = cmd:GetViewAngles() eyeang.x = 0 - ply.vwrdot = -ply:GetWallrunDir():Dot(eyeang:Forward()) + ply.vwrdot = -ply:GetWallrunDir():Dot(eyeang:Forward()) ply:SetWallrunTime(CurTime()) ply:SetQuickturn(true) ply:SetQuickturnTime(CurTime()) @@ -84,8 +82,10 @@ local function Quickturn(ply, mv, cmd) local eyedir = cmd:GetViewAngles() eyedir.x = 0 eyedir = eyedir:Forward() + local vel = mv:GetVelocity() vel.z = 0 + local lookahead = vel:GetNormalized():Dot(eyedir) >= 0.85 local lookbehind = vel:GetNormalized():Dot(eyedir) < -0.5 @@ -100,9 +100,7 @@ local function Quickturn(ply, mv, cmd) ply:SetJumpTurn(true) - if lookbehind then - return - end + if lookbehind then return end ply:ViewPunch(Angle(2.5, 0, 5)) end @@ -121,9 +119,7 @@ local function Quickturn(ply, mv, cmd) usingrh = activewep:GetClass() == "runnerhands" end - if not usingrh and ply:GetWallrun() >= 2 then - return - end + if not usingrh and ply:GetWallrun() >= 2 then return end ply:SetQuickturn(true) ply:SetQuickturnTime(CurTime()) @@ -138,7 +134,6 @@ local function Quickturn(ply, mv, cmd) BodyLimitY = 180 BodyAnimCycle = 0 BodyAnimSpeed = 2 - BodyAnim:SetSequence("wallrunverticalturn") elseif game.SinglePlayer() then ply:SendLua("BodyLimitX=90 BodyLimitY=180 BodyAnimCycle=0 BodyAnim:SetSequence(\"wallrunverticalturn\")") @@ -195,6 +190,7 @@ local function Quickturn(ply, mv, cmd) mv:SetSideSpeed(0) mv:SetUpSpeed(0) mv:SetButtons(0) + cmd:ClearMovement() if not ply:OnGround() and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:WaterLevel() < 3 then @@ -233,6 +229,7 @@ local function Quickturn(ply, mv, cmd) local diff = CurTime() - ply:GetQuickturnTime() local lerptime = diff * 6.5 local lerp = Lerp(math.min(lerptime, 1), ply:GetQuickturnAng().y, target.y) + target.y = lerp if CLIENT_IFTP() or game.SinglePlayer() then @@ -247,4 +244,4 @@ local function Quickturn(ply, mv, cmd) end end -hook.Add("SetupMove", "Quickturn", Quickturn) +hook.Add("SetupMove", "Quickturn", Quickturn) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Replay.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Replay.lua index 1574e02..b4ba4a5 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Replay.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Replay.lua @@ -3,13 +3,8 @@ if SERVER then end function ReplayCmd(ply, cmd) - if not ply.ReplayRecording then - return - end - - if cmd:TickCount() == 0 then - return - end + if not ply.ReplayRecording then return end + if cmd:TickCount() == 0 then return end if not ply.ReplayFirstTick and cmd:TickCount() ~= 0 then ply.ReplayFirstTick = cmd:TickCount() @@ -26,19 +21,9 @@ function ReplayCmd(ply, cmd) local curtick = cmd:TickCount() - ply.ReplayFirstTick + 1 if ang == 0 then - ply.ReplayTicks[curtick] = { - cmd:GetButtons(), - cmd:GetForwardMove(), - cmd:GetSideMove() - } + ply.ReplayTicks[curtick] = {cmd:GetButtons(), cmd:GetForwardMove(), cmd:GetSideMove()} else - ply.ReplayTicks[curtick] = { - cmd:GetButtons(), - ang.x, - ang.y, - cmd:GetForwardMove(), - cmd:GetSideMove() - } + ply.ReplayTicks[curtick] = {cmd:GetButtons(), ang.x, ang.y, cmd:GetForwardMove(), cmd:GetSideMove()} end if curtick > 23760 then @@ -51,13 +36,8 @@ end hook.Add("StartCommand", "ReplayStart", ReplayCmd) function ReplayStart(ply) - if not game.SinglePlayer() then - return - end - - if ply.InReplay then - return - end + if not game.SinglePlayer() then return end + if ply.InReplay then return end print("Starting Replay") @@ -69,26 +49,17 @@ function ReplayStart(ply) end function ReplayStop(ply, debugdump) - if not game.SinglePlayer() then - return - end - - if not ply.ReplayTicks then - return - end - - if ply.InReplay then - return - end + if not game.SinglePlayer() then return end + if not ply.ReplayTicks then return end + if ply.InReplay then return end print("Ending Replay (" .. #ply.ReplayTicks .. "ticks)") ply.InReplay = false ply.ReplayRecording = false - local debugdata = { - ply.ReplayStartPos, - ply.ReplayTicks - } + + local debugdata = {ply.ReplayStartPos, ply.ReplayTicks} + local replay = util.Compress(util.TableToJSON(debugdata)) local dir = "beatrun/replays/" .. game.GetMap() .. "/" @@ -99,15 +70,11 @@ end local RFF = true function ReplayPlayback(ply, cmd) - if not ply.InReplay or not ply.ReplayTicks then - return - end + if not ply.InReplay or not ply.ReplayTicks then return end local cmdtc = cmd:TickCount() - if cmdtc == 0 then - return - end + if cmdtc == 0 then return end if not ply.ReplayFirstTick then ply.ReplayFirstTick = cmdtc @@ -164,31 +131,31 @@ function ReplayPlayback(ply, cmd) if TUTORIALMODE then net.Start("ReplayTutorialPos") - net.WriteVector(ply.ReplayStartPos) + net.WriteVector(ply.ReplayStartPos) net.SendToServer() + TutorialClearEvents() end end end function ReplaySendToClient(ply) - if not game.SinglePlayer() then - return - end + if not game.SinglePlayer() then return end local replaydata = util.JSONToTable(util.Decompress(file.Read("beatrun/replays/" .. game.GetMap() .. "/replaydump.txt", "DATA"))) + ply.ReplayFirstTick = false ply.ReplayStartPos = replaydata[1] ply.ReplayTicks = replaydata[2] - ply:SetNWBool("InReplay", true) + net.Start("ReplaySendToClient") net.Send(ply) ply.InReplay = true - ply:SetPos(ply.ReplayStartPos) ply:SetVelocity(vector_origin) + hook.Add("StartCommand", "ReplayPlay", ReplayPlayback) end @@ -220,23 +187,25 @@ if CLIENT then surface.SetTextPos(5, ScrH() * 0.975) local text = TUTORIALMODE and "" or "*Clientside replay: may not be accurate " - surface.DrawText(text .. tickcount .. "/" .. #LocalPlayer().ReplayTicks) end end function ReplayBegin() LocalPlayer().InReplay = true + RFF = CurTime() + 1 hook.Add("StartCommand", "ReplayPlay", ReplayPlayback) hook.Add("RenderScreenspaceEffects", "BeatrunReplayVision", BeatrunReplayVision) hook.Add("HUDPaint", "BeatrunReplayHUD", BeatrunReplayHUD) + surface.PlaySound("friends/friend_join.wav") end net.Receive("ReplayRequest", ReplayBegin) - net.Receive("ReplaySendToClient", function (length) + + net.Receive("ReplaySendToClient", function(length) if length < 100 then LocalPlayer().ReplayTicks = util.JSONToTable(util.Decompress(file.Read("beatrun/replays/" .. game.GetMap() .. "/replaydump.txt", "DATA")))[2] else @@ -244,7 +213,6 @@ if CLIENT then end LocalPlayer().ReplayFirstTick = false - ReplayBegin() end) end @@ -258,6 +226,6 @@ function ReplayCancel(ply) ply.ReplayFirstTick = false net.Start("ReplayRequest") - net.WriteBool(true) + net.WriteBool(true) net.SendToServer() -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Rope.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Rope.lua index 94279a5..eb3a147 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Rope.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Rope.lua @@ -1,7 +1,7 @@ local yaw = 0 local pitch = 0 -hook.Add("CreateMove", "Rope", function (cmd) +hook.Add("CreateMove", "Rope", function(cmd) local ply = LocalPlayer() local vtl = viewtiltlerp @@ -15,16 +15,22 @@ hook.Add("CreateMove", "Rope", function (cmd) local ang = LocalPlayer():EyeAngles() ang.x = 0 + local grapplepos = LocalPlayer():GetGrapplePos() local vel = LocalPlayer():GetVelocity() vel.z = 0 + velf = vel:Dot(ang:Forward()) * 80 velr = vel:Dot(ang:Right()) * 80 + grapplepos.z = 0 + local mul = (grapplepos - LocalPlayer():EyePos()):Dot(ang:Forward()) > 0 and 1 or -1 grapplepos = vel * mul + local y = math.Clamp(-grapplepos:Dot(ang:Forward()), -90, 90) local p = math.Clamp(-grapplepos:Dot(ang:Right()), -90, 90) + pitch = Lerp(FrameTime() * 1.5, pitch, p) yaw = Lerp(FrameTime() * 1.5, yaw, y) @@ -34,4 +40,4 @@ hook.Add("CreateMove", "Rope", function (cmd) BodyAnimArmCopy:SetPoseParameter("rope_pitch", pitch) viewtiltlerp.z = -pitch * 0.1 -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua index 1753c83..bae2b9e 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SafetyRoll.lua @@ -9,11 +9,13 @@ local function SafetyRollThink(ply, mv, cmd) if speed <= -350 and not ply:OnGround() and not ply:GetWasOnGround() and (mv:KeyPressed(IN_SPEED) or mv:KeyPressed(IN_DUCK) or mv:KeyPressed(IN_BULLRUSH)) then ply:SetSafetyRollKeyTime(CurTime() + 0.5) + mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_DUCK))) end if CurTime() < ply:GetSafetyRollTime() then ply.FootstepLand = false + local ang = ply:GetSafetyRollAng() mv:SetSideSpeed(0) @@ -25,6 +27,7 @@ local function SafetyRollThink(ply, mv, cmd) vel.y = 0 mv:SetVelocity(ply:GetSafetyRollAng():Forward() * 200 + vel) + ply:SetMEMoveLimit(400) else mv:SetVelocity(vector_origin) @@ -45,7 +48,7 @@ local roll = { AnimString = "rollanim" } -net.Receive("RollAnimSP", function () +net.Receive("RollAnimSP", function() if net.ReadBool() then roll.AnimString = "land" roll.animmodelstring = "mirroranim" @@ -64,7 +67,8 @@ net.Receive("RollAnimSP", function () RemoveBodyAnim() StartBodyAnim(roll) end) -hook.Add("SetupMove", "EvadeRoll", function (ply, mv, cmd) + +hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) if ply:GetJumpTurn() and ply:OnGround() and mv:KeyPressed(IN_BACK) then local ang = cmd:GetViewAngles() @@ -96,18 +100,20 @@ hook.Add("SetupMove", "EvadeRoll", function (ply, mv, cmd) StartBodyAnim(roll) elseif game.SinglePlayer() then net.Start("RollAnimSP") - net.WriteBool(false) - net.WriteBool(true) + net.WriteBool(false) + net.WriteBool(true) net.Send(ply) end end end) -hook.Add("OnPlayerHitGround", "SafetyRoll", function (ply, water, floater, speed) + +hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed) local tr = { filter = ply, start = ply:GetPos() } tr.endpos = tr.start - Vector(0, 0, 150) + local out = util.TraceLine(tr) local normal = out.HitNormal local sang = normal:Angle() @@ -115,6 +121,7 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function (ply, water, floater, speed if sang.x <= 314 and not ply:InOverdrive() and (speed >= 350 or ply:GetDive()) and speed < 800 and (CurTime() < ply:GetSafetyRollKeyTime() and not ply:GetDive() or ply:GetDive() and not ply:KeyDown(IN_DUCK)) and not ply:GetJumpTurn() and (not ply:Crouching() or ply:GetDive()) then ply:SetCrouchJump(false) ply:SetDive(false) + ParkourEvent("roll", ply) local ang = ply:EyeAngles() @@ -157,8 +164,8 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function (ply, water, floater, speed StartBodyAnim(roll) elseif game.SinglePlayer() then net.Start("RollAnimSP") - net.WriteBool(land) - net.WriteBool(false) + net.WriteBool(land) + net.WriteBool(false) net.Send(ply) end end @@ -169,7 +176,7 @@ if SERVER then br_mat = true } - hook.Add("GetFallDamage", "SafetyRoll", function (ply, speed) + hook.Add("GetFallDamage", "SafetyRoll", function(ply, speed) local groundent = ply:GetGroundEntity() if IsValid(groundent) and safelandents[groundent:GetClass()] then @@ -188,4 +195,4 @@ if SERVER then return 0 end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua index 6a297a4..6df770b 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sliding.lua @@ -1,51 +1,27 @@ local qslide_duration = 3 local qslide_speedmult = 1 + local slide_sounds = { - [MAT_DIRT] = { - "datae/fol_slide_dirt_01.wav", - "datae/fol_slide_dirt_02.wav", - "datae/fol_slide_dirt_03.wav", - "datae/fol_slide_dirt_04.wav" - }, - [MAT_SAND] = { - "datae/fol_slide_sand_01.wav", - "datae/fol_slide_sand_02.wav", - "datae/fol_slide_sand_03.wav", - "datae/fol_slide_sand_04.wav" - }, - [MAT_METAL] = { - "datae/fol_slide_metal_01.wav", - "datae/fol_slide_metal_02.wav", - "datae/fol_slide_metal_03.wav" - }, - [MAT_GLASS] = { - "datae/fol_slide_glass_01.wav", - "datae/fol_slide_glass_02.wav", - "datae/fol_slide_glass_03.wav", - "datae/fol_slide_glass_04.wav" - }, - [MAT_GRATE] = { - "datae/fol_slide_grate_01.wav" - }, - [MAT_SLOSH] = { - "ambient/water/water_splash1.wav", - "ambient/water/water_splash2.wav", - "ambient/water/water_splash3.wav" - }, - [MAT_WOOD] = { - "datae/fol_slide_generic_01.wav", - "datae/fol_slide_generic_02.wav", - "datae/fol_slide_generic_03.wav" - } + [MAT_DIRT] = {"datae/fol_slide_dirt_01.wav", "datae/fol_slide_dirt_02.wav", "datae/fol_slide_dirt_03.wav", "datae/fol_slide_dirt_04.wav"}, + [MAT_SAND] = {"datae/fol_slide_sand_01.wav", "datae/fol_slide_sand_02.wav", "datae/fol_slide_sand_03.wav", "datae/fol_slide_sand_04.wav"}, + [MAT_METAL] = {"datae/fol_slide_metal_01.wav", "datae/fol_slide_metal_02.wav", "datae/fol_slide_metal_03.wav"}, + [MAT_GLASS] = {"datae/fol_slide_glass_01.wav", "datae/fol_slide_glass_02.wav", "datae/fol_slide_glass_03.wav", "datae/fol_slide_glass_04.wav"}, + [MAT_GRATE] = {"datae/fol_slide_grate_01.wav"}, + [MAT_SLOSH] = {"ambient/water/water_splash1.wav", "ambient/water/water_splash2.wav", "ambient/water/water_splash3.wav"}, + [MAT_WOOD] = {"datae/fol_slide_generic_01.wav", "datae/fol_slide_generic_02.wav", "datae/fol_slide_generic_03.wav"} } + local slideloop_sounds = { [0] = "MirrorsEdge/Slide/ME_FootStep_ConcreteSlideLoop.wav", [MAT_GLASS] = "MirrorsEdge/Slide/ME_FootStep_GlassSlideLoop.wav" } + slide_sounds[MAT_GRASS] = slide_sounds[MAT_DIRT] slide_sounds[MAT_SNOW] = slide_sounds[MAT_DIRT] slide_sounds[MAT_VENT] = slide_sounds[MAT_METAL] slide_sounds[0] = slide_sounds[MAT_DIRT] + +--[[ local animtable = { lockang = false, allowmove = true, @@ -59,6 +35,8 @@ local animtable = { camjoint = "camerajoint", usefullbody = 2 } +]] + local blocked = false local function SlidingAnimThink() @@ -79,18 +57,19 @@ local function SlidingAnimThink() if IsValid(ba) then ply.OrigEyeAng:Set(ply:GetSlidingAngle()) - ply.OrigEyeAng.x = 0 + local tr = util.QuickTrace(ply:GetPos(), Vector(0, 0, -64), ply) local normal = tr.HitNormal local oldang = ba:GetAngles() local ang = ba:GetAngles() local slidey = ply:GetSlidingAngle().y + oldang[2] = slidey ang[2] = slidey ang.x = math.max(normal:Angle().x + 90, 360) - local newang = LerpAngle(20 * FrameTime(), oldang, ang) + local newang = LerpAngle(20 * FrameTime(), oldang, ang) ba:SetAngles(newang) BodyLimitX = math.min(40 + ang[1] - 360, 60) @@ -99,15 +78,11 @@ local function SlidingAnimThink() end local function SlidingAnimStart() - if not IsFirstTimePredicted() and not game.SinglePlayer() then - return - end + if not IsFirstTimePredicted() and not game.SinglePlayer() then return end local ply = LocalPlayer() - if not ply:Alive() then - return - end + if not ply:Alive() then return end deleteonend = false BodyLimitY = 80 @@ -131,24 +106,19 @@ local function SlidingAnimStart() end BodyAnim:SetAngles(ply:GetSlidingAngle()) - ply.OrigEyeAng = ply:GetSlidingAngle() if ply:Crouching() or CurTime() < ply:GetCrouchJumpTime() then BodyAnimCycle = 0.1 - BodyAnim:SetCycle(0.1) end CamShake = ply:GetSlidingSlippery() - hook.Add("Think", "SlidingAnimThink", SlidingAnimThink) end local function SlidingAnimEnd(slippery, diving) - if not IsValid(BodyAnim) then - return - end + if not IsValid(BodyAnim) then return end local ply = LocalPlayer() @@ -162,21 +132,17 @@ local function SlidingAnimEnd(slippery, diving) if not slippery then if not ply.DiveSliding and not diving then BodyAnimString = "meslideend" - BodyAnim:ResetSequence("meslideend") else ply.DiveSliding = false - ParkourEvent("diveslideend", ply, true) end BodyAnimCycle = 0 - BodyAnim:SetCycle(0) - BodyAnimSpeed = 1.3 - timer.Simple(0.2, function () + timer.Simple(0.2, function() if ply:Alive() and BodyAnimString == "meslideend" and BodyAnimArmCopy and not ply:GetSliding() and not ply:OnGround() then BodyAnimCycle = 0 camjoint = "eyes" @@ -189,17 +155,19 @@ local function SlidingAnimEnd(slippery, diving) camjoint = "eyes" end - timer.Simple(0.5, function () + timer.Simple(0.5, function() if ply:Alive() and BodyAnimArmCopy and not ply:GetSliding() then camjoint = "eyes" + BodyLimitY = 180 BodyLimitX = 90 + CamIgnoreAng = true end end) if blocked then - timer.Simple(0.35, function () + timer.Simple(0.35, function() if IsValid(BodyAnim) then BodyAnim:SetSequence("crouchstill") end @@ -216,11 +184,13 @@ if game.SinglePlayer() then util.AddNetworkString("sliding_spfix") util.AddNetworkString("sliding_spend") else - net.Receive("sliding_spfix", function () + net.Receive("sliding_spfix", function() SlidingAnimStart() end) - net.Receive("sliding_spend", function () + + net.Receive("sliding_spend", function() blocked = net.ReadBool() + local slippery = net.ReadBool() local diving = net.ReadBool() @@ -230,15 +200,16 @@ if game.SinglePlayer() then end local slidepunch = Angle(2.5, 0, -0.5) -local slidepunchend = Angle(3, 0, -3.5) +-- local slidepunchend = Angle(3, 0, -3.5) local trace_down = Vector(0, 0, 32) -local trace_up = Vector(0, 0, 32) +-- local trace_up = Vector(0, 0, 32) local trace_tbl = {} local function SlideSurfaceSound(ply, pos) trace_tbl.start = pos trace_tbl.endpos = pos - trace_down trace_tbl.filter = ply + local tr = util.TraceLine(trace_tbl) local sndtable = slide_sounds[tr.MatType] or slide_sounds[0] @@ -255,14 +226,15 @@ end local function SlideLoopSound(ply, pos, mat) local sndtable = slideloop_sounds[mat] or slideloop_sounds[0] - ply.SlideLoopSound = CreateSound(ply, sndtable) + ply.SlideLoopSound = CreateSound(ply, sndtable) ply.SlideLoopSound:PlayEx(0.05, 100) end -local COORD_FRACTIONAL_BITS = 5 -local COORD_DENOMINATOR = bit.lshift(1, COORD_FRACTIONAL_BITS) -local COORD_RESOLUTION = 1 / COORD_FRACTIONAL_BITS +-- local COORD_FRACTIONAL_BITS = 5 +-- local COORD_DENOMINATOR = bit.lshift(1, COORD_FRACTIONAL_BITS) +-- local COORD_RESOLUTION = 1 / COORD_FRACTIONAL_BITS + local metaent = FindMetaTable("Entity") metaent.oldOnGround = metaent.oldOnGround or metaent.OnGround @@ -270,10 +242,8 @@ function metaent:OnGround() return self:IsPlayer() and self:GetSlidingSlippery() or self:oldOnGround() end -hook.Add("SetupMove", "qslide", function (ply, mv, cmd) - if not ply:Alive() then - return - end +hook.Add("SetupMove", "qslide", function(ply, mv, cmd) + if not ply:Alive() then return end if not ply.OldDuckSpeed then ply.OldDuckSpeed = ply:GetDuckSpeed() @@ -284,6 +254,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) local speed = mv:GetVelocity() speed.z = 0 speed = speed:Length() + local runspeed = ply:GetRunSpeed() local slidetime = math.max(0.1, qslide_duration) local ducking = mv:KeyDown(IN_DUCK) @@ -295,6 +266,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if not ply.SlideSlipperyTrace then local mins, maxs = ply:GetHull() ply.SlideSlipperyTraceOut = {} + ply.SlideSlipperyTrace = { mask = MASK_SHOT_HULL, collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT, @@ -324,8 +296,9 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if slipperytraceout.Fraction > 0 and slipperytraceout.Fraction < 1 and not slipperytraceout.StartSolid then local slipnormal = slipperytraceout.HitNormal local hitpos = slipperytraceout.HitPos - local delta = math.abs(mv:GetOrigin().z - hitpos.z) local ent = slipperytraceout.Entity + -- local delta = math.abs(mv:GetOrigin().z - hitpos.z) + slipperytrace.start = safestart slipperytrace.endpos = safestart - Vector(0, 0, 120) @@ -337,6 +310,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if sang.x > 315 and sang.x < 330 then mv:SetOrigin(hitpos) + ply:SetGroundEntity(ent) ply:SetCrouchJumpBlocked(false) @@ -350,6 +324,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) dmg:SetDamageType(DMG_FALL) dmg:SetDamage(1000) + ply:TakeDamageInfo(dmg) end end @@ -363,6 +338,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) slipperytrace.endpos = slipperytrace.start - Vector(0, 0, 32) util.TraceHull(slipperytrace) + ply:SetSlidingSlipperyUpdate(CT + 0.25) end @@ -398,7 +374,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) vel = 230 ply:SetDive(false) - ply.DiveSliding = false end @@ -410,7 +385,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) ply:SetSliding(true) local slidecalctime = slidetime * math.min(vel / 300, 1) - ply:SetSlidingTime(CT + slidecalctime) if not ply:Crouching() then @@ -426,14 +400,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) else local ang = cmd:GetViewAngles() ang.x = 0 - ply:SetSlidingAngle(ang) end end ply:SetSlidingVel(vel) ply:SetSlidingStrafe(0) - ply.SlidingInitTime = CT if game.SinglePlayer() then @@ -452,12 +424,13 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if game.SinglePlayer() then net.Start("sliding_spfix") - net.WriteBool(ply:GetDive()) + net.WriteBool(ply:GetDive()) net.Send(ply) end if CLIENT_IFTP() then SlidingAnimStart() + hook.Add("Think", "SlidingAnimThink", SlidingAnimThink) end elseif (not ducking and ply:GetMelee() == 0 and not slippery or not onground) and sliding then @@ -466,10 +439,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if not ducking then ply.SlideHull = ply.SlideHull or {} ply.SlideHullOut = ply.SlideHullOut or {} + local hulltr = ply.SlideHull local hulltrout = ply.SlideHullOut local mins, maxs = ply:GetHull() local origin = mv:GetOrigin() + hulltr.start = origin hulltr.endpos = origin hulltr.maxs = maxs @@ -497,9 +472,9 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if game.SinglePlayer() then net.Start("sliding_spend") - net.WriteBool(blocked) - net.WriteBool(false) - net.WriteBool(ply.DiveSliding) + net.WriteBool(blocked) + net.WriteBool(false) + net.WriteBool(ply.DiveSliding) net.Send(ply) ply.DiveSliding = false @@ -516,6 +491,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) end ply:ConCommand("-duck") + ply:SetViewOffsetDucked(Vector(0, 0, 32)) end @@ -528,7 +504,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) eyeang = eyeang:Forward() ply:SetViewOffsetDucked(Vector(0, 0, 28) + eyeang * -25) - local slidedelta = (ply:GetSlidingTime() - CT) / slidetime local speed = ply:GetSlidingVel() * math.min(1.75, (ply:GetSlidingTime() - CT + 0.5) / slidetime) * qslide_speedmult @@ -562,9 +537,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if mv:KeyPressed(IN_JUMP) then local vel = mv:GetVelocity() - vel:Mul(math.min(math.max(speed, 300) / 300, 1)) - vel.z = 175 ply:SetSliding(false) @@ -578,9 +551,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) end mv:SetOrigin(mv:GetOrigin() + Vector(0, 0, 33)) + ply:SetGroundEntity(nil) ply:SetSlidingSlippery(false) + mv:SetVelocity(vel) + ParkourEvent("jumpslide", ply) end end @@ -605,7 +581,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) end ply.DiveSliding = false - ply:SetSlidingTime(0) ply:SetSliding(false) ply:SetQuickturn(true) @@ -622,6 +597,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) ply:ViewPunch(Angle(2.5, 0, 5)) ply:SetViewOffsetDucked(Vector(0, 0, 17)) ply:SetViewOffset(Vector(0, 0, 64)) + mv:SetOrigin(mv:GetOrigin() + Vector(0, 0, 48)) mv:SetVelocity(mv:GetVelocity() * 0.75 + Vector(0, 0, 251)) end @@ -641,9 +617,9 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if SERVER and game.SinglePlayer() then net.Start("sliding_spend") - net.WriteBool(false) - net.WriteBool(slippery) - net.WriteBool(ply.DiveSliding) + net.WriteBool(false) + net.WriteBool(slippery) + net.WriteBool(ply.DiveSliding) net.Send(ply) elseif CLIENT_IFTP() then SlidingAnimEnd(slippery, ply.DiveSliding) @@ -667,6 +643,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) if CLIENT then DoJumpTurn(false) + BodyAnim:SetSequence("meslideendprone") elseif game.SinglePlayer() then ply:SendLua("DoJumpTurn(false) BodyAnim:SetSequence('meslideendprone')") @@ -682,12 +659,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd) ply:SetUnDuckSpeed(ply.OldUnDuckSpeed) end end) -hook.Add("PlayerFootstep", "qslidestep", function (ply) - if ply:GetSliding() then - return true - end + +hook.Add("PlayerFootstep", "qslidestep", function(ply) + if ply:GetSliding() then return true end end) -hook.Add("StartCommand", "qslidespeed", function (ply, cmd) + +hook.Add("StartCommand", "qslidespeed", function(ply, cmd) if ply:GetSliding() then cmd:RemoveKey(IN_SPEED) @@ -696,11 +673,10 @@ hook.Add("StartCommand", "qslidespeed", function (ply, cmd) end cmd:ClearMovement() - local slidetime = math.max(0.1, qslide_duration) if (ply:GetSlidingTime() - CurTime()) / slidetime > 0.8 and (ply.SlidingInitTime > CurTime() - 0.25 or ply:GetSlidingSlippery()) then cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_DUCK)) end end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_!Precache.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_!Precache.lua index d094571..bcae2eb 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_!Precache.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_!Precache.lua @@ -1,10 +1,12 @@ soundAdd_old = sound.Add local function soundAdd_detour(tbl) - if !tbl.name then return end + if not tbl.name then return end soundAdd_old(tbl) + timer.Simple(2, function() util.PrecacheSound(tbl.name) end) end + sound.Add = soundAdd_detour \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Cloth.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Cloth.lua index 0846954..862be5e 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Cloth.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Cloth.lua @@ -3,95 +3,42 @@ sound.Add({ volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish1.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish10.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish11.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish12.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish2.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish3.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish4.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish5.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish6.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish7.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish8.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish1.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish10.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish11.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish12.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish2.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish3.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish4.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish5.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish6.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish7.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish8.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Vault_Swish9.wav"} }) + sound.Add({ name = "Cloth.MovementRun", volume = 0.75, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run1.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run2.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run3.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run4.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run5.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run6.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run7.wav", - "MirrorsEdge/Cloth/ME_Cloth_Movement_Run8.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Cloth/ME_Cloth_Movement_Run1.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run2.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run3.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run4.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run5.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run6.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run7.wav", "MirrorsEdge/Cloth/ME_Cloth_Movement_Run8.wav"} }) + sound.Add({ name = "Cloth.RollLand", volume = 1, level = 35, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land1.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land2.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land3.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land4.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land5.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land6.wav", - "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land7.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land1.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land2.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land3.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land4.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land5.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land6.wav", "MirrorsEdge/Cloth/ME_Faith_Cloth_Roll_Land7.wav"} }) + sound.Add({ name = "Cloth.Roll", volume = 1, level = 75, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Body_Roll_01.wav", - "MirrorsEdge/Body_Roll_02.wav", - "MirrorsEdge/Body_Roll_03.wav", - "MirrorsEdge/Body_Roll_04.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Body_Roll_01.wav", "MirrorsEdge/Body_Roll_02.wav", "MirrorsEdge/Body_Roll_03.wav", "MirrorsEdge/Body_Roll_04.wav"} }) + sound.Add({ name = "Cloth.FallShortHard", volume = 1, level = 75, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Cloth/BF_Short_Hard_1a.wav", - "MirrorsEdge/Cloth/BF_Short_Hard_1b.wav", - "MirrorsEdge/Cloth/BF_Short_Hard_1c.wav", - "MirrorsEdge/Cloth/BF_Short_Hard_1d.wav", - "MirrorsEdge/Cloth/BF_Short_Hard_1e.wav", - "MirrorsEdge/Cloth/BF_Short_Hard_1f.wav" - } -}) + pitch = {90, 110}, + sound = {"MirrorsEdge/Cloth/BF_Short_Hard_1a.wav", "MirrorsEdge/Cloth/BF_Short_Hard_1b.wav", "MirrorsEdge/Cloth/BF_Short_Hard_1c.wav", "MirrorsEdge/Cloth/BF_Short_Hard_1d.wav", "MirrorsEdge/Cloth/BF_Short_Hard_1e.wav", "MirrorsEdge/Cloth/BF_Short_Hard_1f.wav"} +}) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Footsteps.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Footsteps.lua index 4da4862..647fae7 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Footsteps.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Footsteps.lua @@ -3,631 +3,251 @@ sound.Add({ volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun1.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun10.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun11.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun12.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun13.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun14.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun2.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun3.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun4.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun5.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun6.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun7.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun8.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun1.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun10.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun11.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun12.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun13.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun14.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun2.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun3.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun4.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun5.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun6.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun7.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun8.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRun9.wav"} }) + sound.Add({ name = "Release.Concrete", volume = 1, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease1.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease2.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease3.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease4.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease5.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease6.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease7.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease8.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease9.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease10.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease11.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease12.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease13.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease14.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease1.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease2.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease3.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease4.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease5.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease6.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease7.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease8.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease9.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease10.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease11.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease12.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease13.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_ConcreteRunRelease14.wav"} }) + sound.Add({ name = "Land.Concrete", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land1.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land2.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land3.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land4.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land5.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land6.wav", - "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land7.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land1.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land2.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land3.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land4.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land5.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land6.wav", "MirrorsEdge/Footsteps/Concrete/ME_FootStep_Concrete_Land7.wav"} }) + sound.Add({ name = "Footsteps.Glass", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun1.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun10.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun11.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun12.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun13.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun14.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun15.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun16.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun17.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun18.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun19.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun2.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun20.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun3.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun4.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun5.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun6.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun7.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun8.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun1.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun10.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun11.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun12.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun13.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun14.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun15.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun16.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun17.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun18.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun19.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun2.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun20.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun3.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun4.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun5.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun6.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun7.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun8.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRun9.wav"} }) + sound.Add({ name = "Release.Glass", volume = 1, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease1.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease2.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease3.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease4.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease5.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease6.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease7.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease8.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease1.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease2.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease3.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease4.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease5.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease6.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease7.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease8.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPaneRunRelease9.wav"} }) + sound.Add({ name = "Land.Glass", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand1.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand2.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand3.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand4.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand5.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand6.wav", - "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand7.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand1.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand2.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand3.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand4.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand5.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand6.wav", "MirrorsEdge/Footsteps/Glass/ME_FootStep_GlassPanelLand7.wav"} }) + sound.Add({ name = "Footsteps.Metal", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint1.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint10.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint11.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint12.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint13.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint14.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint15.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint16.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint17.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint18.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint19.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint2.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint20.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint3.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint4.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint5.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint6.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint7.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint8.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint1.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint10.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint11.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint12.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint13.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint14.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint15.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint16.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint17.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint18.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint19.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint2.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint20.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint3.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint4.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint5.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint6.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint7.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint8.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint9.wav"} }) + sound.Add({ name = "Release.Metal", volume = 0.3, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release1.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release10.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release11.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release12.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release13.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release14.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release15.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release2.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release3.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release4.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release5.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release6.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release7.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release8.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release1.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release10.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release11.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release12.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release13.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release14.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release15.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release2.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release3.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release4.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release5.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release6.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release7.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release8.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Polished_Sprint_Release9.wav"} }) + sound.Add({ name = "Footsteps.Duct", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun7.wav", - "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun8.wav", - "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun9.wav", - "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun10.wav", - "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun11.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun7.wav", "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun8.wav", "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun9.wav", "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun10.wav", "MirrorsEdge/Footsteps/Metal/ME_FootStep_MetalDuctRun11.wav"} }) + sound.Add({ name = "Footsteps.Gantry", volume = 0.5, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_01.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_02.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_03.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_04.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_05.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_06.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_07.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_08.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_09.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_01.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_02.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_03.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_04.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_05.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_06.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_07.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_08.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Steps_Sprint_New_09.wav"} }) + sound.Add({ name = "Release.Gantry", volume = 0.5, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release1.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release2.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release3.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release4.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release5.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release6.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release7.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release8.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release1.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release2.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release3.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release4.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release5.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release6.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release7.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release8.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Metal_Gantry_Release9.wav"} }) + sound.Add({ name = "Metal.Ringout", volume = 0.5, level = 50, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts1.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts2.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts3.wav", - "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts4.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts1.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts2.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts3.wav", "MirrorsEdge/Footsteps/Metal/ME_Footsteps_Master_Metal_Vault_Ringouts4.wav"} }) + sound.Add({ name = "Footsteps.Wood", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant1.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant10.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant11.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant12.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant13.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant14.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant15.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant2.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant3.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant4.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant5.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant6.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant7.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant8.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant1.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant10.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant11.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant12.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant13.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant14.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant15.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant2.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant3.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant4.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant5.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant6.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant7.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant8.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunFootplant9.wav"} }) + sound.Add({ name = "Release.Wood", volume = 1, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease1.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease10.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease11.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease12.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease13.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease14.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease15.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease2.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease3.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease4.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease5.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease6.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease7.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease8.wav", - "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease1.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease10.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease11.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease12.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease13.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease14.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease15.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease2.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease3.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease4.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease5.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease6.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease7.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease8.wav", "MirrorsEdge/Footsteps/Wood/ME_FootStep_WoodGeneric_RunRelease9.wav"} }) + sound.Add({ name = "Footsteps.Water", volume = 0.25, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step1.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step10.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step11.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step12.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step13.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step2.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step3.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step4.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step5.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step6.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step7.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step8.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step1.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step10.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step11.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step12.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step13.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step2.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step3.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step4.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step5.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step6.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step7.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step8.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Step9.wav"} }) + sound.Add({ name = "Release.Water", volume = 1, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release1.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release10.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release11.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release12.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release13.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release14.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release2.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release3.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release4.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release5.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release6.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release7.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release8.wav", - "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release1.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release10.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release11.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release12.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release13.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release14.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release2.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release3.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release4.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release5.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release6.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release7.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release8.wav", "MirrorsEdge/Footsteps/Water/ME_Faith_Water_Shallow_Sprint_Release9.wav"} }) + sound.Add({ name = "Footsteps.Gravel", volume = 0.25, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint1.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint10.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint11.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint12.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint13.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint2.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint3.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint4.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint5.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint6.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint7.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint8.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint1.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint10.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint11.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint12.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint13.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint2.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint3.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint4.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint5.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint6.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint7.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint8.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint9.wav"} }) + sound.Add({ name = "Release.Gravel", volume = 1, level = 30, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith1.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith10.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith11.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith12.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith13.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith14.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith2.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith3.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith4.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith5.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith6.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith7.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith8.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith1.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith10.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith11.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith12.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith13.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith14.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith2.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith3.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith4.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith5.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith6.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith7.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith8.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Sprint_Release_Faith9.wav"} }) + sound.Add({ name = "Land.Gravel", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy1.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy10.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy11.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy2.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy3.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy4.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy5.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy6.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy7.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy8.wav", - "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy1.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy10.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy11.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy2.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy3.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy4.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy5.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy6.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy7.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy8.wav", "MirrorsEdge/Footsteps/Gravel/ME_Footsteps_Gravel_Land_Heavy9.wav"} }) + sound.Add({ name = "Footsteps.LadderHeavy", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Ladder/LadderFootstepHvy_01.ogg", - "MirrorsEdge/Ladder/LadderFootstepHvy_02.ogg", - "MirrorsEdge/Ladder/LadderFootstepHvy_03.ogg", - "MirrorsEdge/Ladder/LadderFootstepHvy_04.ogg", - "MirrorsEdge/Ladder/LadderFootstepHvy_05.ogg", - "MirrorsEdge/Ladder/LadderFootstepHvy_06.ogg" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Ladder/LadderFootstepHvy_01.ogg", "MirrorsEdge/Ladder/LadderFootstepHvy_02.ogg", "MirrorsEdge/Ladder/LadderFootstepHvy_03.ogg", "MirrorsEdge/Ladder/LadderFootstepHvy_04.ogg", "MirrorsEdge/Ladder/LadderFootstepHvy_05.ogg", "MirrorsEdge/Ladder/LadderFootstepHvy_06.ogg"} }) + sound.Add({ name = "Footsteps.LadderMedium", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Ladder/LadderFootstepMed_01.ogg", - "MirrorsEdge/Ladder/LadderFootstepMed_02.ogg", - "MirrorsEdge/Ladder/LadderFootstepMed_03.ogg", - "MirrorsEdge/Ladder/LadderFootstepMed_04.ogg", - "MirrorsEdge/Ladder/LadderFootstepMed_05.ogg", - "MirrorsEdge/Ladder/LadderFootstepMed_06.ogg" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Ladder/LadderFootstepMed_01.ogg", "MirrorsEdge/Ladder/LadderFootstepMed_02.ogg", "MirrorsEdge/Ladder/LadderFootstepMed_03.ogg", "MirrorsEdge/Ladder/LadderFootstepMed_04.ogg", "MirrorsEdge/Ladder/LadderFootstepMed_05.ogg", "MirrorsEdge/Ladder/LadderFootstepMed_06.ogg"} }) + sound.Add({ name = "Release.Ladder", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Ladder/LadderFootstepRelease_01.ogg", - "MirrorsEdge/Ladder/LadderFootstepRelease_02.ogg", - "MirrorsEdge/Ladder/LadderFootstepRelease_03.ogg", - "MirrorsEdge/Ladder/LadderFootstepRelease_04.ogg", - "MirrorsEdge/Ladder/LadderFootstepRelease_05.ogg", - "MirrorsEdge/Ladder/LadderFootstepRelease_06.ogg" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Ladder/LadderFootstepRelease_01.ogg", "MirrorsEdge/Ladder/LadderFootstepRelease_02.ogg", "MirrorsEdge/Ladder/LadderFootstepRelease_03.ogg", "MirrorsEdge/Ladder/LadderFootstepRelease_04.ogg", "MirrorsEdge/Ladder/LadderFootstepRelease_05.ogg", "MirrorsEdge/Ladder/LadderFootstepRelease_06.ogg"} }) + sound.Add({ name = "OWallrun.Concrete", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith1.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith10.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith11.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith12.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith13.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith14.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith2.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith3.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith4.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith5.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith6.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith7.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith8.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith9.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith1.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith10.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith11.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith12.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith13.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith14.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith2.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith3.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith4.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith5.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith6.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith7.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith8.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Slow_Faith9.wav"} }) + sound.Add({ name = "OWallrunFast.Concrete", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith1.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith2.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith3.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith4.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith5.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith6.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith7.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith8.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith9.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith10.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith11.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith12.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith13.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith14.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith15.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith16.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith17.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith18.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith19.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith20.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith21.wav", - "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith22.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith1.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith2.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith3.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith4.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith5.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith6.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith7.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith8.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith9.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith10.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith11.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith12.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith13.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith14.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith15.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith16.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith17.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith18.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith19.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith20.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith21.wav", "MirrorsEdge/Footsteps/Concrete/ME_Footsteps_Congrete_Clean_WallRun_Fast_Faith22.wav"} }) + sound.Add({ name = "Wallrun.Concrete", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_01.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_02.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_03.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_04.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_05.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_06.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_01.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_02.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_03.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_04.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_05.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRun_06.wav"} }) + sound.Add({ name = "WallrunRelease.Concrete", volume = 1, level = 35, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_01.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_02.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_03.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_04.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_05.wav", - "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_06.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_01.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_02.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_03.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_04.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_05.wav", "MirrorsEdge/Footsteps/Concrete/ConcreteFootStepWallRunRelease_06.wav"} }) + sound.Add({ name = "Footsteps.Spark", volume = 0.2, level = 40, channel = CHAN_STATIC, - pitch = { - 85, - 115 - }, - sound = { - "bigspark1.wav", - "bigspark2.wav" - } + pitch = {85, 115}, + sound = {"bigspark1.wav", "bigspark2.wav"} }) + sound.Add({ name = "CyborgRun", volume = 0.75, sound = "cyborgrun.wav", level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - } + pitch = {90, 110} }) FOOTSTEPS_LUT = { @@ -643,6 +263,7 @@ FOOTSTEPS_LUT = { ["player/footsteps/wood"] = "Wood", ["player/footsteps/chainlink"] = "Gantry" } + FOOTSTEPS_RELEASE_LUT = { ["player/footsteps/woodpanel"] = "Wood", ["player/footsteps/gravel"] = "Gravel", @@ -656,9 +277,10 @@ FOOTSTEPS_RELEASE_LUT = { ["player/footsteps/wood"] = "Wood", ["player/footsteps/chainlink"] = "Gantry" } + FOOTSTEPS_LAND_LUT = { ["physics/glass/glass_sheet_step"] = "Glass", ["player/footsteps/concrete"] = "Concrete", ["player/footsteps/sand"] = "Gravel", ["player/footsteps/gravel"] = "Gravel" -} +} \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Handsteps.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Handsteps.lua index 5d24a1a..8341b18 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Handsteps.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Handsteps.lua @@ -3,86 +3,33 @@ sound.Add({ volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_01.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_02.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_03.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_04.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_01.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_02.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_03.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepSoft_04.wav"} }) + sound.Add({ name = "Handsteps.ConcreteHard", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_01.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_02.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_03.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_01.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_02.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_03.wav"} }) + sound.Add({ name = "Handsteps.Ladder", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 75, - 90 - }, - sound = { - "MirrorsEdge/Ladder/LadderHandstep_01.ogg", - "MirrorsEdge/Ladder/LadderHandstep_02.ogg", - "MirrorsEdge/Ladder/LadderHandstep_03.ogg", - "MirrorsEdge/Ladder/LadderHandstep_04.ogg", - "MirrorsEdge/Ladder/LadderHandstep_05.ogg", - "MirrorsEdge/Ladder/LadderHandstep_06.ogg", - "MirrorsEdge/Ladder/LadderHandstep_07.ogg", - "MirrorsEdge/Ladder/LadderHandstep_08.ogg", - "MirrorsEdge/Ladder/LadderHandstep_09.ogg", - "MirrorsEdge/Ladder/LadderHandstep_10.ogg", - "MirrorsEdge/Ladder/LadderHandstep_21.ogg", - "MirrorsEdge/Ladder/LadderHandstep_22.ogg", - "MirrorsEdge/Ladder/LadderHandstep_23.ogg", - "MirrorsEdge/Ladder/LadderHandstep_24.ogg", - "MirrorsEdge/Ladder/LadderHandstep_25.ogg", - "MirrorsEdge/Ladder/LadderHandstep_26.ogg", - "MirrorsEdge/Ladder/LadderHandstep_27.ogg", - "MirrorsEdge/Ladder/LadderHandstep_28.ogg", - "MirrorsEdge/Ladder/LadderHandstep_29.ogg", - "MirrorsEdge/Ladder/LadderHandstep_30.ogg", - "MirrorsEdge/Ladder/LadderHandstep_41.ogg", - "MirrorsEdge/Ladder/LadderHandstep_42.ogg", - "MirrorsEdge/Ladder/LadderHandstep_43.ogg", - "MirrorsEdge/Ladder/LadderHandstep_44.ogg", - "MirrorsEdge/Ladder/LadderHandstep_45.ogg", - "MirrorsEdge/Ladder/LadderHandstep_46.ogg", - "MirrorsEdge/Ladder/LadderHandstep_47.ogg", - "MirrorsEdge/Ladder/LadderHandstep_48.ogg", - "MirrorsEdge/Ladder/LadderHandstep_49.ogg", - "MirrorsEdge/Ladder/LadderHandstep_50.ogg" - } + pitch = {75, 90}, + sound = {"MirrorsEdge/Ladder/LadderHandstep_01.ogg", "MirrorsEdge/Ladder/LadderHandstep_02.ogg", "MirrorsEdge/Ladder/LadderHandstep_03.ogg", "MirrorsEdge/Ladder/LadderHandstep_04.ogg", "MirrorsEdge/Ladder/LadderHandstep_05.ogg", "MirrorsEdge/Ladder/LadderHandstep_06.ogg", "MirrorsEdge/Ladder/LadderHandstep_07.ogg", "MirrorsEdge/Ladder/LadderHandstep_08.ogg", "MirrorsEdge/Ladder/LadderHandstep_09.ogg", "MirrorsEdge/Ladder/LadderHandstep_10.ogg", "MirrorsEdge/Ladder/LadderHandstep_21.ogg", "MirrorsEdge/Ladder/LadderHandstep_22.ogg", "MirrorsEdge/Ladder/LadderHandstep_23.ogg", "MirrorsEdge/Ladder/LadderHandstep_24.ogg", "MirrorsEdge/Ladder/LadderHandstep_25.ogg", "MirrorsEdge/Ladder/LadderHandstep_26.ogg", "MirrorsEdge/Ladder/LadderHandstep_27.ogg", "MirrorsEdge/Ladder/LadderHandstep_28.ogg", "MirrorsEdge/Ladder/LadderHandstep_29.ogg", "MirrorsEdge/Ladder/LadderHandstep_30.ogg", "MirrorsEdge/Ladder/LadderHandstep_41.ogg", "MirrorsEdge/Ladder/LadderHandstep_42.ogg", "MirrorsEdge/Ladder/LadderHandstep_43.ogg", "MirrorsEdge/Ladder/LadderHandstep_44.ogg", "MirrorsEdge/Ladder/LadderHandstep_45.ogg", "MirrorsEdge/Ladder/LadderHandstep_46.ogg", "MirrorsEdge/Ladder/LadderHandstep_47.ogg", "MirrorsEdge/Ladder/LadderHandstep_48.ogg", "MirrorsEdge/Ladder/LadderHandstep_49.ogg", "MirrorsEdge/Ladder/LadderHandstep_50.ogg"} }) + sound.Add({ name = "Handsteps.ConcreteRelease", volume = 0.5, level = 40, channel = CHAN_STATIC, - pitch = { - 75, - 90 - }, - sound = { - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_01.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_02.wav", - "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_03.wav" - } -}) + pitch = {75, 90}, + sound = {"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_01.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_02.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_03.wav"} +}) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Melee.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Melee.lua index 864f84c..3cdf7d4 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Melee.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Melee.lua @@ -3,66 +3,33 @@ sound.Add({ volume = 1, level = 50, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "melee/foot1.wav", - "melee/foot2.wav", - "melee/foot3.wav", - "melee/foot4.wav", - "melee/foot5.wav" - } + pitch = {90, 110}, + sound = {"melee/foot1.wav", "melee/foot2.wav", "melee/foot3.wav", "melee/foot4.wav", "melee/foot5.wav"} }) + sound.Add({ name = "Melee.Fist", volume = 1, level = 45, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "melee/fist1.wav", - "melee/fist2.wav", - "melee/fist3.wav", - "melee/fist4.wav", - "melee/fist5.wav" - } + pitch = {90, 110}, + sound = {"melee/fist1.wav", "melee/fist2.wav", "melee/fist3.wav", "melee/fist4.wav", "melee/fist5.wav"} }) + sound.Add({ name = "Melee.LegSwoosh", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "melee/legswoosh1.wav", - "melee/legswoosh2.wav", - "melee/legswoosh3.wav", - "melee/legswoosh4.wav" - } + pitch = {90, 110}, + sound = {"melee/legswoosh1.wav", "melee/legswoosh2.wav", "melee/legswoosh3.wav", "melee/legswoosh4.wav"} }) + sound.Add({ name = "Melee.ArmSwoosh", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "melee/armswoosh1.wav", - "melee/armswoosh2.wav", - "melee/armswoosh3.wav", - "melee/armswoosh4.wav", - "melee/armswoosh5.wav", - "melee/armswoosh6.wav" - } -}) + pitch = {90, 110}, + sound = {"melee/armswoosh1.wav", "melee/armswoosh2.wav", "melee/armswoosh3.wav", "melee/armswoosh4.wav", "melee/armswoosh5.wav", "melee/armswoosh6.wav"} +}) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua index 1f7386a..148bef4 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_Misc.lua @@ -3,80 +3,46 @@ sound.Add({ volume = 1, level = 50, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/ME_BodyConcreteBump1.wav", - "MirrorsEdge/ME_BodyConcreteBump2.wav", - "MirrorsEdge/ME_BodyConcreteBump3.wav", - "MirrorsEdge/ME_BodyConcreteBump4.wav", - "MirrorsEdge/ME_BodyConcreteBump5.wav", - "MirrorsEdge/ME_BodyConcreteBump6.wav", - "MirrorsEdge/ME_BodyConcreteBump7.wav", - "MirrorsEdge/ME_BodyConcreteBump8.wav", - "MirrorsEdge/ME_BodyConcreteBump9.wav", - "MirrorsEdge/ME_BodyConcreteBump10.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/ME_BodyConcreteBump1.wav", "MirrorsEdge/ME_BodyConcreteBump2.wav", "MirrorsEdge/ME_BodyConcreteBump3.wav", "MirrorsEdge/ME_BodyConcreteBump4.wav", "MirrorsEdge/ME_BodyConcreteBump5.wav", "MirrorsEdge/ME_BodyConcreteBump6.wav", "MirrorsEdge/ME_BodyConcreteBump7.wav", "MirrorsEdge/ME_BodyConcreteBump8.wav", "MirrorsEdge/ME_BodyConcreteBump9.wav", "MirrorsEdge/ME_BodyConcreteBump10.wav"} }) + sound.Add({ name = "Door.Barge", volume = 1, level = 60, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge1.wav", - "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge2.wav", - "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge3.wav", - "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge4.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge1.wav", "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge2.wav", "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge3.wav", "MirrorsEdge/GameplayObjects/ME_Door_Generic_Barge4.wav"} }) + sound.Add({ name = "FenceClimb", volume = 1, level = 60, channel = CHAN_STATIC, - pitch = { - 95, - 105 - }, - sound = { - "MirrorsEdge/GameplayObjects/Fence_01.wav", - "MirrorsEdge/GameplayObjects/Fence_02.wav" - } + pitch = {95, 105}, + sound = {"MirrorsEdge/GameplayObjects/Fence_01.wav", "MirrorsEdge/GameplayObjects/Fence_02.wav"} }) + sound.Add({ name = "FenceClimbEnd", volume = 0.5, sound = "MirrorsEdge/GameplayObjects/Fence.wav", level = 60, channel = CHAN_STATIC, - pitch = { - 95, - 105 - } + pitch = {95, 105} }) + sound.Add({ name = "Vault", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Vault_01.wav", - "MirrorsEdge/Vault_02.wav", - "MirrorsEdge/Vault_03.wav", - "MirrorsEdge/Vault_04.wav" - } + pitch = {90, 110}, + sound = {"MirrorsEdge/Vault_01.wav", "MirrorsEdge/Vault_02.wav", "MirrorsEdge/Vault_03.wav", "MirrorsEdge/Vault_04.wav"} }) + sound.Add({ name = "ZiplineStart", volume = 1, @@ -85,6 +51,7 @@ sound.Add({ level = 40, channel = CHAN_STATIC }) + sound.Add({ name = "ZiplineEnd", volume = 1, @@ -93,6 +60,7 @@ sound.Add({ level = 40, channel = CHAN_STATIC }) + sound.Add({ name = "ZiplineLoop", volume = 1, @@ -101,18 +69,12 @@ sound.Add({ level = 40, channel = CHAN_STATIC }) + sound.Add({ name = "Land.Ladder", volume = 1, level = 40, channel = CHAN_STATIC, - pitch = { - 90, - 110 - }, - sound = { - "MirrorsEdge/Ladder/Ladder_Land_01.ogg", - "MirrorsEdge/Ladder/Ladder_Land_02.ogg", - "MirrorsEdge/Ladder/Ladder_Land_03.ogg" - } -}) + pitch = {90, 110}, + sound = {"MirrorsEdge/Ladder/Ladder_Land_01.ogg", "MirrorsEdge/Ladder/Ladder_Land_02.ogg", "MirrorsEdge/Ladder/Ladder_Land_03.ogg"} +}) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_VO.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_VO.lua index 67ddf73..1349c4f 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_VO.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_VO.lua @@ -1,7 +1,5 @@ -local FaithVO = CreateConVar("Beatrun_FaithVO", 0, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}) +local FaithVO = CreateConVar("Beatrun_FaithVO", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}) + local meta = FindMetaTable("Player") sound.Add({ @@ -10,205 +8,106 @@ sound.Add({ pitch = 100, level = 40, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Strain_Soft_1.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_2.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_3.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_4.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_5.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_6.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_7.wav", - "MirrorsEdge/VO/Faith/Strain_Soft_8.wav" - } + sound = {"MirrorsEdge/VO/Faith/Strain_Soft_1.wav", "MirrorsEdge/VO/Faith/Strain_Soft_2.wav", "MirrorsEdge/VO/Faith/Strain_Soft_3.wav", "MirrorsEdge/VO/Faith/Strain_Soft_4.wav", "MirrorsEdge/VO/Faith/Strain_Soft_5.wav", "MirrorsEdge/VO/Faith/Strain_Soft_6.wav", "MirrorsEdge/VO/Faith/Strain_Soft_7.wav", "MirrorsEdge/VO/Faith/Strain_Soft_8.wav"} }) + sound.Add({ name = "Faith.StrainMedium", volume = 0.75, pitch = 100, level = 40, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Strain_Medium_1.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_2.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_3.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_4.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_5.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_6.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_7.wav", - "MirrorsEdge/VO/Faith/Strain_Medium_8.wav" - } + sound = {"MirrorsEdge/VO/Faith/Strain_Medium_1.wav", "MirrorsEdge/VO/Faith/Strain_Medium_2.wav", "MirrorsEdge/VO/Faith/Strain_Medium_3.wav", "MirrorsEdge/VO/Faith/Strain_Medium_4.wav", "MirrorsEdge/VO/Faith/Strain_Medium_5.wav", "MirrorsEdge/VO/Faith/Strain_Medium_6.wav", "MirrorsEdge/VO/Faith/Strain_Medium_7.wav", "MirrorsEdge/VO/Faith/Strain_Medium_8.wav"} }) + sound.Add({ name = "Faith.StrainHard", volume = 0.75, pitch = 100, level = 40, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Strain_Hard_1.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_2.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_3.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_4.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_5.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_6.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_7.wav", - "MirrorsEdge/VO/Faith/Strain_Hard_8.wav" - } + sound = {"MirrorsEdge/VO/Faith/Strain_Hard_1.wav", "MirrorsEdge/VO/Faith/Strain_Hard_2.wav", "MirrorsEdge/VO/Faith/Strain_Hard_3.wav", "MirrorsEdge/VO/Faith/Strain_Hard_4.wav", "MirrorsEdge/VO/Faith/Strain_Hard_5.wav", "MirrorsEdge/VO/Faith/Strain_Hard_6.wav", "MirrorsEdge/VO/Faith/Strain_Hard_7.wav", "MirrorsEdge/VO/Faith/Strain_Hard_8.wav"} }) + sound.Add({ name = "Faith.Impact", volume = 0.75, pitch = 100, level = 40, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Impact_Med_01.wav", - "MirrorsEdge/VO/Faith/Impact_Med_02.wav", - "MirrorsEdge/VO/Faith/Impact_Med_03.wav", - "MirrorsEdge/VO/Faith/Impact_Med_04.wav", - "MirrorsEdge/VO/Faith/Impact_Med_05.wav", - "MirrorsEdge/VO/Faith/Impact_Med_06.wav", - "MirrorsEdge/VO/Faith/Impact_Med_07.wav", - "MirrorsEdge/VO/Faith/Impact_Med_08.wav", - "MirrorsEdge/VO/Faith/Impact_Med_09.wav", - "MirrorsEdge/VO/Faith/Impact_Med_10.wav", - "MirrorsEdge/VO/Faith/Impact_Med_11.wav", - "MirrorsEdge/VO/Faith/Impact_Med_12.wav", - "MirrorsEdge/VO/Faith/Impact_Med_13.wav", - "MirrorsEdge/VO/Faith/Impact_Med_14.wav" - } + sound = {"MirrorsEdge/VO/Faith/Impact_Med_01.wav", "MirrorsEdge/VO/Faith/Impact_Med_02.wav", "MirrorsEdge/VO/Faith/Impact_Med_03.wav", "MirrorsEdge/VO/Faith/Impact_Med_04.wav", "MirrorsEdge/VO/Faith/Impact_Med_05.wav", "MirrorsEdge/VO/Faith/Impact_Med_06.wav", "MirrorsEdge/VO/Faith/Impact_Med_07.wav", "MirrorsEdge/VO/Faith/Impact_Med_08.wav", "MirrorsEdge/VO/Faith/Impact_Med_09.wav", "MirrorsEdge/VO/Faith/Impact_Med_10.wav", "MirrorsEdge/VO/Faith/Impact_Med_11.wav", "MirrorsEdge/VO/Faith/Impact_Med_12.wav", "MirrorsEdge/VO/Faith/Impact_Med_13.wav", "MirrorsEdge/VO/Faith/Impact_Med_14.wav"} }) + sound.Add({ name = "Faith.Breath.SoftShortIn", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_01.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_02.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_03.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_04.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_05.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_06.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_07.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_08.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Soft_Short_In_01.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_02.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_03.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_04.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_05.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_06.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_07.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_In_08.wav"} }) + sound.Add({ name = "Faith.Breath.SoftShortOut", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_01.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_02.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_03.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_04.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_05.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_06.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_07.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_08.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_01.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_02.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_03.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_04.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_05.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_06.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_07.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Short_Out_08.wav"} }) + sound.Add({ name = "Faith.Breath.SoftLongIn", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_01.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_02.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_03.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_04.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_05.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_06.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Soft_Long_In_01.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_02.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_03.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_04.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_05.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_In_06.wav"} }) + sound.Add({ name = "Faith.Breath.SoftLongOut", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_01.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_02.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_03.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_04.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_05.wav", - "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_06.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_01.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_02.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_03.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_04.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_05.wav", "MirrorsEdge/VO/Faith/Breath_Soft_Long_Out_06.wav"} }) + sound.Add({ name = "Faith.Breath.MediumShortIn", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_01.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_02.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_03.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_04.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_05.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_06.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_07.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_08.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Medium_Short_In_01.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_02.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_03.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_04.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_05.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_06.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_07.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_In_08.wav"} }) + sound.Add({ name = "Faith.Breath.MediumShortOut", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_01.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_02.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_03.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_04.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_05.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_06.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_07.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_08.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_01.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_02.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_03.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_04.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_05.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_06.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_07.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Short_Out_08.wav"} }) + sound.Add({ name = "Faith.Breath.MediumLongIn", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_01.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_02.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_03.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_04.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_05.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_06.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_07.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_08.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Medium_Long_In_01.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_02.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_03.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_04.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_05.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_06.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_07.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_In_08.wav"} }) + sound.Add({ name = "Faith.Breath.MediumLongOut", volume = 0.75, pitch = 100, level = 35, channel = CHAN_VOICE, - sound = { - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_01.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_02.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_03.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_04.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_05.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_06.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_07.wav", - "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_08.wav" - } + sound = {"MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_01.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_02.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_03.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_04.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_05.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_06.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_07.wav", "MirrorsEdge/VO/Faith/Breath_Medium_Long_Out_08.wav"} }) function meta:FaithVO(vo) @@ -221,4 +120,4 @@ function meta:FaithVO(vo) self:EmitSound(vo) end -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_zzzEnd.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_zzzEnd.lua index a0d6dd8..8011861 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_zzzEnd.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Sounds_zzzEnd.lua @@ -1,2 +1,2 @@ sound.Add = soundAdd_old -soundAdd_old = nil +soundAdd_old = nil \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua b/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua index 20b4d70..2b99db7 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/SwingPipe.lua @@ -4,8 +4,10 @@ local function SwingpipeCheck(ply, mv, cmd) mins.x = mins.x * 2 maxs.y = maxs.y * 2 mins.y = mins.y * 2 + local tr = ply.Monkey_tr local trout = ply.Monkey_trout + tr.start = mv:GetOrigin() tr.endpos = tr.start tr.maxs = maxs @@ -19,7 +21,7 @@ local function SwingpipeCheck(ply, mv, cmd) if IsValid(trout.Entity) and trout.Entity:GetClass() == "br_swingpipe" and (ply:GetSwingbarLast() ~= trout.Entity or ply:GetSBDelay() < CurTime()) then local swingpipe = trout.Entity - local dot = cmd:GetViewAngles():Forward():Dot(swingpipe:GetAngles():Forward()) + -- local dot = cmd:GetViewAngles():Forward():Dot(swingpipe:GetAngles():Forward()) if CLIENT then swingpipe:SetPredictable(true) @@ -27,8 +29,10 @@ local function SwingpipeCheck(ply, mv, cmd) local pos = swingpipe:GetPos() pos.z = mv:GetOrigin().z + local entvector = pos - ply:GetShootPos() entvector.z = pos.z + local entdot = entvector:Dot(mv:GetAngles():Right()) local dir = entdot < 0 local trwall = util.QuickTrace(mv:GetOrigin(), mv:GetAngles():Right() * 100 * (dir and -1 or 1), ply) @@ -40,7 +44,6 @@ local function SwingpipeCheck(ply, mv, cmd) end ply.SwingHullCheck = false - ply:SetSwingpipe(swingpipe) ply:SetWallrunTime(0) ply:SetSBDir(dir) @@ -57,8 +60,8 @@ local function SwingpipeCheck(ply, mv, cmd) end end +-- local red = Color(255, 0, 0, 200) local radius = 40 -local red = Color(255, 0, 0, 200) local circlepos = Vector() local axis = Vector(0, 1, 0) @@ -88,7 +91,6 @@ local function SwingpipeThink(ply, mv, cmd) ang:RotateAroundAxis(axis, 90) local angle = math.NormalizeAngle(ply:GetSBOffset() - ply.swingbarang) * math.pi * 2 / 360 - circlepos:SetUnpacked(0, math.cos(angle) * radius * -1, -math.sin(angle) * radius) circlepos:Rotate(ang) @@ -110,10 +112,7 @@ local function SwingpipeThink(ply, mv, cmd) if util.TraceHull({ start = spendpos, endpos = spendpos, - filter = { - ply:GetSwingpipe(), - ply - }, + filter = {ply:GetSwingpipe(), ply}, mins = minhull, maxs = maxhull }).Hit then @@ -149,9 +148,11 @@ local function SwingpipeThink(ply, mv, cmd) if ply:GetSBDir() then ply:SetSBOffset(math.max(ply:GetSBOffset() - 250 * FrameTime() * math.min(startlerp + 0.5 - math.min(math.max(math.abs(ply:GetSBOffset()) - 65, 0) / 30, 0.6), 1.15), -90)) + origin:Add(mv:GetAngles():Right() * 17 * startlerp) else ply:SetSBOffset(math.min(ply:GetSBOffset() + 250 * FrameTime() * math.min(startlerp + 0.5 - math.min(math.max(math.abs(ply:GetSBOffset()) - 65, 0) / 30, 0.6), 1.15), 90)) + origin:Sub(mv:GetAngles():Right() * 17 * startlerp) end @@ -176,7 +177,9 @@ local function SwingpipeThink(ply, mv, cmd) ply:SetSwingbarLast(ply:GetSwingpipe()) ply:SetSwingpipe(nil) ply:SetSBDelay(CurTime() + 0.5) + mv:SetVelocity(cmd:GetViewAngles():Forward() * 260 + Vector(0, 0, 150)) + ParkourEvent("jumpfar", ply) end end @@ -197,4 +200,4 @@ local function Swingpipe(ply, mv, cmd) end end -hook.Add("SetupMove", "Swingpipe", Swingpipe) +hook.Add("SetupMove", "Swingpipe", Swingpipe) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/TimeSlow.lua b/beatrun/gamemodes/beatrun/gamemode/sh/TimeSlow.lua index 0b3b361..43e8bc2 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/TimeSlow.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/TimeSlow.lua @@ -1,6 +1,4 @@ -if not game.SinglePlayer() then - return -end +if not game.SinglePlayer() then return end local slow = false local slowlerp = 1 @@ -9,7 +7,8 @@ local slowspeed = 2 if SERVER then util.AddNetworkString("SlowSounds") - hook.Add("Think", "TimeSlow", function () + + hook.Add("Think", "TimeSlow", function() if slow and slowlerp ~= slowtarget then slowlerp = math.Approach(slowlerp, slowtarget, slowspeed * FrameTime()) @@ -36,7 +35,7 @@ local function TimeSlowSounds(t) end end -net.Receive("SlowSounds", function () +net.Receive("SlowSounds", function() local slowed = net.ReadBool() if slowed then @@ -45,11 +44,12 @@ net.Receive("SlowSounds", function () hook.Remove("EntityEmitSound", "TimeSlow") end end) -concommand.Add("ToggleTimeSlow", function (ply) + +concommand.Add("ToggleTimeSlow", function(ply) slow = not slow net.Start("SlowSounds") - net.WriteBool(slow) + net.WriteBool(slow) net.Send(ply) if slow then @@ -57,4 +57,4 @@ concommand.Add("ToggleTimeSlow", function (ply) else hook.Remove("EntityEmitSound", "TimeSlow") end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua index 1660517..b53fa6b 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Vaulting.lua @@ -73,6 +73,7 @@ end local function Vault1(ply, mv, ang, t, h) local mins, maxs = ply:GetHull() + t.start = mv:GetOrigin() + eyevec + ang:Forward() * 25 t.endpos = t.start - neckvec t.filter = ply @@ -81,17 +82,9 @@ local function Vault1(ply, mv, ang, t, h) t = util.TraceLine(t) - if t.Entity and t.Entity.NoPlayerCollisions then - return false - end - - if t.Entity and t.Entity.IsNPC and t.Entity:IsPlayer() then - return false - end - - if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" then - return false - end + if t.Entity and t.Entity.NoPlayerCollisions then return false end + if t.Entity and t.Entity.IsNPC and t.Entity:IsPlayer() then return false end + if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" then return false end if t.Hit and t.Fraction > 0.3 then local stepup = t.Fraction > 0.65 @@ -105,17 +98,12 @@ local function Vault1(ply, mv, ang, t, h) tsafetyout = util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end TraceSetData(tsafety, t.HitPos, t.HitPos, mins, maxs, ply) tsafetyout = util.TraceHull(tsafety) - - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end TraceParkourMask(h) TraceSetData(h, vaultend, vaultend, mins, maxs, ply) @@ -144,29 +132,25 @@ local function Vault1(ply, mv, ang, t, h) TraceSetData(t, start, vaultendcheck, ply) t = util.TraceLine(t) - - if t.Hit then - return - end + if t.Hit then return end ply:SetMantleStartPos(mv:GetOrigin()) ply:SetMantleEndPos(vaultend) ply:SetMantleLerp(0) ply:SetMantle(1) ply:SetWallrunTime(0) - PlayVaultAnim(ply) - ply:ViewPunch(vpunch1) + PlayVaultAnim(ply) + + ply:ViewPunch(vpunch1) ply.MantleInitVel = mv:GetVelocity() ply.MantleMatType = mat if stepup then ParkourEvent("stepup", ply) - ply.VaultStepUp = true else ParkourEvent("vaultonto", ply) - ply.VaultStepUp = false end @@ -199,25 +183,19 @@ local function Vault2(ply, mv, ang, t, h) local mins, maxs = ply:GetHull() maxs.z = maxs.z * 0.5 + local start = mv:GetOrigin() + chestvec + ang:Forward() * 35 TraceSetData(t, start, start, mins, maxs, ply) TraceParkourMask(t) local vaultpos = t.endpos + ang:Forward() * 35 + t = util.TraceHull(t) - if t.Entity and t.Entity.NoPlayerCollisions then - return false - end - - if t.Entity and t.Entity.IsNPC and t.Entity:IsPlayer() then - return false - end - - if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" then - return false - end + if t.Entity and t.Entity.NoPlayerCollisions then return false end + if t.Entity and t.Entity.IsNPC and t.Entity:IsPlayer() then return false end + if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" then return false end if t.Hit then local tsafety = {} @@ -225,32 +203,27 @@ local function Vault2(ply, mv, ang, t, h) local start = nil TraceParkourMask(tsafety) - tsafety.output = tsafetyout start = mv:GetOrigin() + eyevec - TraceSetData(tsafety, start, start + ang:Forward() * 100, mins, maxs, ply) + util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end - + if tsafetyout.Hit then return false end start = start + ang:Forward() * 100 - TraceSetData(tsafety, start, start - thoraxvec) + util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end start = t.StartPos + chestvec - TraceSetData(h, start, start, mins, maxs, ply) + TraceParkourMask(h) local hulltr = util.TraceHull(h) + mins, maxs = ply:GetHull() TraceSetData(h, vaultpos, vaultpos, mins, maxs, ply) @@ -264,9 +237,10 @@ local function Vault2(ply, mv, ang, t, h) ply:SetMantleData(mv:GetOrigin(), vaultpos, 0, 2) ply:SetWallrunTime(0) - PlayVaultAnim(ply, 1) - ply:ViewPunch(vpunch2) + PlayVaultAnim(ply, 1) + + ply:ViewPunch(vpunch2) ply.MantleInitVel = mv:GetVelocity() ply.MantleInitVel.z = 0 ply.MantleMatType = t.MatType @@ -274,10 +248,11 @@ local function Vault2(ply, mv, ang, t, h) ParkourEvent("vault", ply) if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then - timer.Simple(0.1, function () + timer.Simple(0.1, function() ply:EmitSound("Cloth.VaultSwish") ply:FaithVO("Faith.StrainSoft") end) + ply:EmitSound("Handsteps.ConcreteHard") end @@ -291,28 +266,22 @@ end local function Vault3(ply, mv, ang, t, h) local mins, maxs = ply:GetHull() maxs.z = maxs.z * 0.5 + t.start = mv:GetOrigin() + chestvec + ang:Forward() * 35 t.endpos = t.start t.filter = ply TraceParkourMask(t) - t.maxs = maxs t.mins = mins + local vaultpos = t.endpos + ang:Forward() * 60 + t = util.TraceHull(t) - if t.Entity and t.Entity.NoPlayerCollisions then - return false - end - - if t.Entity and t.Entity.IsNPC and (t.Entity:IsNPC() or t.Entity:IsPlayer()) then - return false - end - - if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" then - return false - end + if t.Entity and t.Entity.NoPlayerCollisions then return false end + if t.Entity and t.Entity.IsNPC and (t.Entity:IsNPC() or t.Entity:IsPlayer()) then return false end + if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" then return false end if t.Hit then local tsafety = {} @@ -320,34 +289,27 @@ local function Vault3(ply, mv, ang, t, h) local start = nil TraceParkourMask(tsafety) - tsafety.output = tsafetyout start = mv:GetOrigin() + eyevec - TraceSetData(tsafety, start, start + ang:Forward() * 150, ply) + util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end start = mv:GetOrigin() + eyevec + ang:Forward() * 150 - TraceSetData(tsafety, start, start - thoraxvec) + util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end start = mv:GetOrigin() + eyevec + ang:Forward() * 150 - TraceSetData(tsafety, start, start - aircheck) + util.TraceLine(tsafety) - if not tsafetyout.Hit then - return false - end + if not tsafetyout.Hit then return false end mins.z = mins.z * 1 h.start = t.StartPos + chestvec @@ -357,14 +319,15 @@ local function Vault3(ply, mv, ang, t, h) h.mins = mins TraceParkourMask(h) - local hulltr = util.TraceHull(h) local mins, maxs = ply:GetHull() + h.start = vaultpos h.endpos = h.start h.filter = ply h.maxs = maxs h.mins = mins + local hulltr2 = util.TraceHull(h) if not hulltr.Hit and not hulltr2.Hit then @@ -374,9 +337,10 @@ local function Vault3(ply, mv, ang, t, h) ply:SetMantleData(mv:GetOrigin(), vaultpos, 0, 3) ply:SetWallrunTime(0) - PlayVaultAnim(ply, 2) - ply:ViewPunch(vpunch3) + PlayVaultAnim(ply, 2) + + ply:ViewPunch(vpunch3) ply.MantleInitVel = mv:GetVelocity() ply.MantleInitVel.z = 0 ply.MantleMatType = t.MatType @@ -384,10 +348,11 @@ local function Vault3(ply, mv, ang, t, h) ParkourEvent("vaultkong", ply) if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then - timer.Simple(0.1, function () + timer.Simple(0.1, function() ply:EmitSound("Cloth.VaultSwish") ply:FaithVO("Faith.StrainSoft") end) + ply:EmitSound("Handsteps.ConcreteHard") end @@ -400,36 +365,36 @@ end function Vault4(ply, mv, ang, t, h) local mins, maxs = ply:GetHull() + t.StartPos = mv:GetOrigin() + eyevec + ang:Forward() * 50 + local vaultpos = mv:GetOrigin() + ang:Forward() * 65 + vault1vec + local tsafety = { start = mv:GetOrigin() + hairvec } + tsafety.endpos = tsafety.start + ang:Forward() * 75 tsafety.filter = ply tsafety.mask = MASK_PLAYERSOLID tsafety.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT + local tsafetyout = util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end tsafety.start = mv:GetOrigin() + aircheck + ang:Forward() * 40 tsafety.endpos = tsafety.start - hairvec + local tsafetyout = util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end - + if tsafetyout.Hit then return false end tsafety.start = mv:GetOrigin() + chestvec tsafety.endpos = tsafety.start + ang:Forward() * 150 + local tsafetyout = util.TraceLine(tsafety) - if not tsafetyout.Hit then - return false - end + if not tsafetyout.Hit then return false end mins.z = mins.z * 1 h.start = vaultpos @@ -439,19 +404,19 @@ function Vault4(ply, mv, ang, t, h) h.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT h.maxs = maxs h.mins = mins + local hsafetyout = util.TraceHull(h) - if hsafetyout.Hit then - return false - end + if hsafetyout.Hit then return false end local startpos = ply:GetWallrun() ~= 1 and mv:GetOrigin() or mv:GetOrigin() + Vector(0, 0, 20) - ang:Forward() * 5 ply:SetMantleData(startpos, vaultpos, 0, 4) ply:SetWallrunTime(0) - PlayVaultAnim(ply, 1) - ply:ViewPunch(Angle(2.5, 0, 0)) + PlayVaultAnim(ply, 1) + + ply:ViewPunch(Angle(2.5, 0, 0)) ply.MantleInitVel = mv:GetVelocity() ply.MantleInitVel.z = 0 ply.MantleMatType = t.MatType @@ -465,21 +430,24 @@ function Vault4(ply, mv, ang, t, h) end if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then - timer.Simple(0.1, function () + timer.Simple(0.1, function() ply:EmitSound("Cloth.VaultSwish") ply:FaithVO("Faith.StrainSoft") end) + ply:EmitSound("Handsteps.ConcreteHard") end if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then tsafety.start = ply:EyePos() tsafety.endpos = tsafety.start + ang:Forward() * 100 + local tsafetyout = util.TraceLine(tsafety) if tsafetyout.MatType == MAT_GRATE then ply:EmitSound("FenceClimb") - timer.Simple(0.45, function () + + timer.Simple(0.45, function() ply:EmitSound("FenceClimbEnd") end) end @@ -489,16 +457,12 @@ function Vault4(ply, mv, ang, t, h) end function Vault5(ply, mv, ang, t, h) - if ply:GetWallrun() == 1 and ply:GetWallrunTime() - CurTime() < 0.75 then - return false - end - - if mv:GetVelocity().z < (not ply:GetDive() and -100 or -1000) then - return false - end + if ply:GetWallrun() == 1 and ply:GetWallrunTime() - CurTime() < 0.75 then return false end + if mv:GetVelocity().z < (not ply:GetDive() and -100 or -1000) then return false end local eyevec = not ply:Crouching() and eyevec or eyevecduck local neckvec = not ply:Crouching() and neckvec or neckvecduck + t.start = mv:GetOrigin() + eyevec + ang:Forward() * 70 t.endpos = t.start - neckvec t.filter = ply @@ -506,15 +470,11 @@ function Vault5(ply, mv, ang, t, h) t.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT t = util.TraceLine(t) - if not t.Hit then - return false - end - - if t.Entity and t.Entity.NoPlayerCollisions then - return false - end + if not t.Hit then return false end + if t.Entity and t.Entity.NoPlayerCollisions then return false end local vaultend = t.HitPos + mantlevec + local tsafety = { start = t.StartPos - ang:Forward() * 70, endpos = t.StartPos, @@ -522,19 +482,17 @@ function Vault5(ply, mv, ang, t, h) mask = MASK_PLAYERSOLID, collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT } + tsafety = util.TraceLine(tsafety) - if tsafety.Hit then - return false - end + if tsafety.Hit then return false end tsafety.start = mv:GetOrigin() + hairvec tsafety.endpos = tsafety.start + ang:Forward() * 60 + local tsafetyout = util.TraceLine(tsafety) - if tsafetyout.Hit then - return false - end + if tsafetyout.Hit then return false end h.start = vaultend h.endpos = h.start @@ -542,6 +500,7 @@ function Vault5(ply, mv, ang, t, h) h.mask = MASK_PLAYERSOLID h.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT h.mins, h.maxs = ply:GetHull() + local hulltr = util.TraceHull(h) if not hulltr.Hit then @@ -554,9 +513,10 @@ function Vault5(ply, mv, ang, t, h) ply:SetMantleLerp(0) ply:SetMantle(5) ply:SetWallrunTime(0) - PlayVaultAnim(ply, false, ang) - ply:ViewPunch(vpunch1) + PlayVaultAnim(ply, false, ang) + + ply:ViewPunch(vpunch1) ply.MantleInitVel = mv:GetVelocity() ply.MantleMatType = t.MatType @@ -572,10 +532,8 @@ function Vault5(ply, mv, ang, t, h) return false end -hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) - if ply.MantleDisabled or IsValid(ply:GetSwingbar()) or ply:GetClimbing() ~= 0 or ply:GetMelee() ~= 0 then - return - end +hook.Add("SetupMove", "BeatrunVaulting", function(ply, mv, cmd) + if ply.MantleDisabled or IsValid(ply:GetSwingbar()) or ply:GetClimbing() ~= 0 or ply:GetMelee() ~= 0 then return end if not ply:Alive() then if ply:GetMantle() ~= 0 then @@ -588,13 +546,12 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) if ply:GetMantle() == 0 then local mvtype = ply:GetMoveType() - if ply:OnGround() or mv:GetVelocity().z < -350 or mvtype == MOVETYPE_NOCLIP or mvtype == MOVETYPE_LADDER then - return - end + if ply:OnGround() or mv:GetVelocity().z < -350 or mvtype == MOVETYPE_NOCLIP or mvtype == MOVETYPE_LADDER then return end end ply.mantletr = ply.mantletr or {} ply.mantlehull = ply.mantlehull or {} + local t = ply.mantletr local h = ply.mantlehull @@ -618,8 +575,11 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) mv:SetSideSpeed(0) mv:SetUpSpeed(0) mv:SetForwardSpeed(0) + cmd:ClearMovement() + mv:SetVelocity(vector_origin) + ply:SetMoveType(MOVETYPE_NOCLIP) local mantletype = ply:GetMantle() @@ -653,6 +613,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) if mlerp < 0.25 then if mlerp > 0.1 then local mult = math.max(0.5, 0.5 + ply.MantleInitVel:Length() / 375 * 0.3 - 0.2) + mlerprate = mlerprate * mult end @@ -686,6 +647,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) end local mult = math.max(0.75, 0.75 + ply.MantleInitVel:Length() / 350 * 0.3 - 0.2) + mlerprate = mlerprate * mult ply:SetMantleLerp(math.Approach(mlerp, 1, mlerprate)) @@ -740,11 +702,13 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) end mlerp = ply:GetMantleLerp() + h.start = mvec h.endpos = h.start h.filter = ply h.mask = MASK_PLAYERSOLID h.mins, h.maxs = ply:GetHull() + local hulltr = util.TraceHull(h) if mlerpend <= mlerp or not hulltr.Hit and (mantletype == 1 and mlerp > 0.4 or mantletype == 2 and mlerp > 0.5 or mantletype == 5 and mlerp > 0.75) then @@ -793,9 +757,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) end local springboardvel = ang:Forward() * math.Clamp((ply.MantleInitVel or vector_origin):Length() * 0.75, 200, 300) + Vector(0, 0, 350) - springboardvel:Mul(ply:GetOverdriveMult()) - springboardvel[3] = springboardvel[3] / ply:GetOverdriveMult() mv:SetVelocity(springboardvel) @@ -810,4 +772,4 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd) mv:SetButtons(0) end end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua index fa898d8..22f1ff8 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Wallrun.lua @@ -2,10 +2,8 @@ local vwrtime = 1.5 local hwrtime = 1.5 tiltdir = 1 local tilt = 0 -PuristWallrun = CreateConVar("Beatrun_PuristWallrun", 1, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}, "'Realistic' wallrunning", 0, 1) + +PuristWallrun = CreateConVar("Beatrun_PuristWallrun", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "'Realistic' wallrunning", 0, 1) function WallrunningTilt(ply, pos, ang, fov) local wr = ply:GetWallrun() @@ -17,7 +15,9 @@ function WallrunningTilt(ply, pos, ang, fov) end ang.z = ang.z + tilt + local tiltspeed = wr >= 2 and math.max(math.abs(tilt / 15 * tiltdir - 1) * 1.75, 0.1) or 1 + tilt = math.Approach(tilt, wr >= 2 and 15 * tiltdir or 0, RealFrameTime() * (wr >= 2 and 30 or 70) * tiltspeed) end @@ -27,28 +27,30 @@ if SERVER then end if CLIENT and game.SinglePlayer() then - net.Receive("BodyAnimWallrun", function () + net.Receive("BodyAnimWallrun", function() local a = net.ReadBool() if a then local ply = LocalPlayer() local eyeang = ply:EyeAngles() + eyeang.x = 0 + ply.WallrunOrigAng = net.ReadAngle() + BodyLimitX = 25 BodyLimitY = 70 BodyAnimCycle = 0 - BodyAnim:SetSequence("wallrunverticalstart") else BodyLimitX = 90 BodyLimitY = 180 BodyAnimCycle = 0 - BodyAnim:SetSequence("jumpair") end end) - net.Receive("WallrunTilt", function () + + net.Receive("WallrunTilt", function() if net.ReadBool() then tiltdir = -1 else @@ -72,6 +74,7 @@ local function WallrunningThink(ply, mv, cmd) if mv:KeyPressed(IN_DUCK) then ply:SetCrouchJumpBlocked(true) ply:SetWallrunTime(0) + mv:SetButtons(mv:GetButtons() - IN_DUCK) end @@ -86,6 +89,7 @@ local function WallrunningThink(ply, mv, cmd) if wr == 4 then local ang = cmd:GetViewAngles() ang.x = 0 + local vel = ang:Forward() * 30 vel.z = 25 @@ -96,6 +100,7 @@ local function WallrunningThink(ply, mv, cmd) if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then ply:SetWallrun(0) ply:SetQuickturn(false) + mv:SetVelocity(vel * 4) local activewep = ply:GetActiveWeapon() @@ -114,12 +119,13 @@ local function WallrunningThink(ply, mv, cmd) if mv:KeyPressed(IN_JUMP) then ParkourEvent("jumpwallrun", ply) + ply:SetSafetyRollKeyTime(CurTime() + 0.001) - vel.z = 30 - vel:Mul(ply:GetOverdriveMult()) + mv:SetVelocity(vel * 8) + ply:SetWallrun(0) ply:SetQuickturn(false) @@ -142,17 +148,18 @@ local function WallrunningThink(ply, mv, cmd) local velz = math.Clamp((ply:GetWallrunTime() - CurTime()) / vwrtime, 0.1, 1) local vecvel = Vector() vecvel.z = 200 * velz - vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50) vecvel:Mul(ply:GetOverdriveMult()) + mv:SetVelocity(vecvel) mv:SetForwardSpeed(0) - mv:SetSideSpeed(0) + mv:SetSideSpeed(0) local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut local eyeang = ply.WallrunOrigAng or Angle() eyeang.x = 0 + tr.start = ply:EyePos() - Vector(0, 0, 5) tr.endpos = tr.start + eyeang:Forward() * 40 tr.filter = ply @@ -281,6 +288,7 @@ local function WallrunningThink(ply, mv, cmd) ply:SetQuickturn(false) ply:SetWallrunTime(0) ply:SetSafetyRollKeyTime(CurTime() + 0.001) + mv:SetVelocity(eyeang:Forward() * math.max(150, vecvel:Length() - 50) + Vector(0, 0, 250)) local event = ply:GetWallrun() == 3 and "jumpwallrunright" or "jumpwallrunleft" @@ -305,7 +313,8 @@ local function WallrunningThink(ply, mv, cmd) if SERVER then ply:EmitSound("Wallrun.Concrete") - timer.Simple(0.025, function () + + timer.Simple(0.025, function() ply:EmitSound("WallrunRelease.Concrete") end) end @@ -327,7 +336,7 @@ local function WallrunningThink(ply, mv, cmd) BodyAnim:SetSequence("jumpair") elseif game.SinglePlayer() and wr == 1 then net.Start("BodyAnimWallrun") - net.WriteBool(false) + net.WriteBool(false) net.Send(ply) end @@ -337,7 +346,7 @@ local function WallrunningThink(ply, mv, cmd) end end -local upcheck = Vector(0, 0, 75) +-- local upcheck = Vector(0, 0, 75) local function WallrunningCheck(ply, mv, cmd) if not ply.WallrunTrace then @@ -347,18 +356,15 @@ local function WallrunningCheck(ply, mv, cmd) local eyeang = ply:EyeAngles() eyeang.x = 0 + local vel = mv:GetVelocity() vel.z = 0 + local timemult = math.max(1 - math.max(ply:GetWallrunCount() - 1, 0) * 0.2, 0.5) local speedmult = math.max(0.9, math.min(vel:Length(), 260) / 250) - if ply:GetGrappling() then - return - end - - if ply:GetJumpTurn() then - return - end + if ply:GetGrappling() then return end + if ply:GetJumpTurn() then return end if PuristWallrun:GetBool() then PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) @@ -369,6 +375,7 @@ local function WallrunningCheck(ply, mv, cmd) if not ply:OnGround() and mv:KeyDown(IN_JUMP) and mv:GetVelocity().z > -200 then local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut + tr.start = ply:EyePos() - Vector(0, 0, 15) tr.endpos = tr.start + eyeang:Forward() * 25 tr.filter = ply @@ -377,13 +384,8 @@ local function WallrunningCheck(ply, mv, cmd) util.TraceLine(tr) - if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then - return - end - - if trout.Entity and trout.Entity.IsNPC and (trout.Entity.NoWallrun or trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then - return false - end + if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end + if trout.Entity and trout.Entity.IsNPC and (trout.Entity.NoWallrun or trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end if trout.Hit and timemult > 0.5 then tr.start = tr.start + Vector(0, 0, 10) @@ -394,9 +396,11 @@ local function WallrunningCheck(ply, mv, cmd) if trout.Hit then local angdir = trout.HitNormal:Angle() angdir.y = angdir.y - 180 + local wallnormal = trout.HitNormal local eyeang = Angle(angdir) eyeang.x = 0 + tr.start = ply:EyePos() - Vector(0, 0, 5) tr.endpos = tr.start + eyeang:Forward() * 40 tr.filter = ply @@ -405,18 +409,16 @@ local function WallrunningCheck(ply, mv, cmd) util.TraceLine(tr) - if not trout.Hit then - return - end + if not trout.Hit then return end if SERVER then ply:EmitSound("Bump.Concrete") end ply.WallrunOrigAng = angdir - ply:SetWallrunData(1, CurTime() + vwrtime * timemult * speedmult, wallnormal) ply:ViewPunch(Angle(-5, 0, 0)) + ParkourEvent("wallrunv", ply) if CLIENT_IFTP() then @@ -429,8 +431,8 @@ local function WallrunningCheck(ply, mv, cmd) ply.OrigEyeAng = angdir elseif game.SinglePlayer() then net.Start("BodyAnimWallrun") - net.WriteBool(true) - net.WriteAngle(angdir) + net.WriteBool(true) + net.WriteAngle(angdir) net.Send(ply) end @@ -442,6 +444,7 @@ local function WallrunningCheck(ply, mv, cmd) if mv:KeyDown(IN_JUMP) and not ply:OnGround() or mv:KeyPressed(IN_JUMP) then local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut + tr.start = ply:EyePos() tr.endpos = tr.start + eyeang:Right() * 25 tr.filter = ply @@ -450,9 +453,7 @@ local function WallrunningCheck(ply, mv, cmd) util.TraceLine(tr) - if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then - return - end + if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then local ovel = mv:GetVelocity() @@ -460,8 +461,11 @@ local function WallrunningCheck(ply, mv, cmd) ply:SetWallrunOrigVel(ovel) ply:SetWallrunElevated(false) + mv:SetVelocity(vector_origin) + ply:SetWallrunData(2, CurTime() + hwrtime * timemult, trout.HitNormal) + ParkourEvent("wallrunh", ply) if CLIENT and IsFirstTimePredicted() then @@ -470,7 +474,7 @@ local function WallrunningCheck(ply, mv, cmd) hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt) elseif SERVER and game.SinglePlayer() then net.Start("WallrunTilt") - net.WriteBool(true) + net.WriteBool(true) net.Send(ply) end @@ -481,6 +485,7 @@ local function WallrunningCheck(ply, mv, cmd) if mv:KeyDown(IN_JUMP) and not ply:OnGround() or mv:KeyPressed(IN_JUMP) then local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut + tr.start = ply:EyePos() tr.endpos = tr.start + eyeang:Right() * -25 tr.filter = ply @@ -489,9 +494,7 @@ local function WallrunningCheck(ply, mv, cmd) util.TraceLine(tr) - if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then - return - end + if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then local ovel = mv:GetVelocity() @@ -499,9 +502,12 @@ local function WallrunningCheck(ply, mv, cmd) ply:SetWallrunOrigVel(ovel) ply:SetWallrunDir(trout.HitNormal) + mv:SetVelocity(vector_origin) + ply:SetWallrunElevated(false) ply:SetWallrunData(3, CurTime() + hwrtime * timemult, trout.HitNormal) + ParkourEvent("wallrunh", ply) if CLIENT and IsFirstTimePredicted() then @@ -510,7 +516,7 @@ local function WallrunningCheck(ply, mv, cmd) hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt) elseif game.SinglePlayer() then net.Start("WallrunTilt") - net.WriteBool(false) + net.WriteBool(false) net.Send(ply) end @@ -521,7 +527,7 @@ end local vecdir = Vector(1000, 1000, 1000) -hook.Add("SetupMove", "Wallrunning", function (ply, mv, cmd) +hook.Add("SetupMove", "Wallrunning", function(ply, mv, cmd) if ply:GetWallrun() == nil or not ply:Alive() then ply:SetWallrun(0) end @@ -538,4 +544,4 @@ hook.Add("SetupMove", "Wallrunning", function (ply, mv, cmd) ply:SetWallrunDir(vecdir) ply:SetWallrunCount(0) end -end) +end) \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua b/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua index ad11a40..012b357 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/WallrunME.lua @@ -1,7 +1,7 @@ local vwrtime = 1.5 local hwrtime = 1.5 tiltdir = 1 -local tilt = 0 +-- local tilt = 0 local wrmins = Vector(-16, -16, 0) local wrmaxs = Vector(16, 16, 16) @@ -17,6 +17,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) if not ply:OnGround() and mv:KeyDown(IN_JUMP) and mv:GetVelocity().z > -200 then local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut + tr.start = ply:EyePos() - Vector(0, 0, 15) tr.endpos = tr.start + eyeang:Forward() * 25 tr.filter = ply @@ -25,13 +26,8 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) util.TraceLine(tr) - if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then - return - end - - if trout.Entity and trout.Entity.IsNPC and (trout.Entity.NoWallrun or trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then - return false - end + if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end + if trout.Entity and trout.Entity.IsNPC and (trout.Entity.NoWallrun or trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end if trout.Hit and timemult > 0.5 then tr.start = tr.start + Vector(0, 0, 10) @@ -42,9 +38,11 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) if trout.Hit then local angdir = trout.HitNormal:Angle() angdir.y = angdir.y - 180 + local wallnormal = trout.HitNormal local eyeang = Angle(angdir) eyeang.x = 0 + tr.start = ply:EyePos() - Vector(0, 0, 5) tr.endpos = tr.start + eyeang:Forward() * 40 tr.filter = ply @@ -53,9 +51,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) util.TraceLine(tr) - if not trout.Hit then - return - end + if not trout.Hit then return end if SERVER then ply:EmitSound("Bump.Concrete") @@ -71,6 +67,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) ply:SetWallrunData(1, CurTime() + vwrtime * timemult * speedmult, wallnormal) ply:ViewPunch(Angle(-5, 0, 0)) + ParkourEvent("wallrunv", ply) if CLIENT_IFTP() then @@ -83,8 +80,8 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) ply.OrigEyeAng = angdir elseif game.SinglePlayer() then net.Start("BodyAnimWallrun") - net.WriteBool(true) - net.WriteAngle(angdir) + net.WriteBool(true) + net.WriteAngle(angdir) net.Send(ply) end @@ -96,6 +93,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) if not ply:OnGround() or mv:KeyPressed(IN_JUMP) then local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut + tr.start = ply:EyePos() tr.endpos = tr.start + eyeang:Right() * 25 tr.filter = ply @@ -104,9 +102,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) util.TraceLine(tr) - if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then - return - end + if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then local ovel = mv:GetVelocity() * 0.85 @@ -114,9 +110,13 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) ply:SetWallrunOrigVel(ovel) ply:SetWallrunElevated(false) + mv:SetVelocity(vector_origin) + ply:SetWallrunData(2, CurTime() + hwrtime * timemult, trout.HitNormal) + ParkourEvent("wallrunh", ply) + ply:ViewPunch(Angle(0, 1, 0)) if CLIENT and IsFirstTimePredicted() then @@ -125,7 +125,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt) elseif SERVER and game.SinglePlayer() then net.Start("WallrunTilt") - net.WriteBool(true) + net.WriteBool(true) net.Send(ply) end @@ -136,6 +136,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) if not ply:OnGround() or mv:KeyPressed(IN_JUMP) then local tr = ply.WallrunTrace local trout = ply.WallrunTraceOut + tr.start = ply:EyePos() tr.endpos = tr.start + eyeang:Right() * -25 tr.filter = ply @@ -144,9 +145,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) util.TraceLine(tr) - if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then - return - end + if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then local ovel = mv:GetVelocity() * 0.85 @@ -154,10 +153,14 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) ply:SetWallrunOrigVel(ovel) ply:SetWallrunDir(trout.HitNormal) + mv:SetVelocity(vector_origin) + ply:SetWallrunElevated(false) ply:SetWallrunData(3, CurTime() + hwrtime * timemult, trout.HitNormal) + ParkourEvent("wallrunh", ply) + ply:ViewPunch(Angle(0, -1, 0)) if CLIENT and IsFirstTimePredicted() then @@ -166,7 +169,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult) hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt) elseif game.SinglePlayer() then net.Start("WallrunTilt") - net.WriteBool(false) + net.WriteBool(false) net.Send(ply) end @@ -179,6 +182,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) if wr == 4 then local ang = cmd:GetViewAngles() ang.x = 0 + local vel = ang:Forward() * 30 vel.z = 25 @@ -189,6 +193,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then ply:SetWallrun(0) ply:SetQuickturn(false) + mv:SetVelocity(vel * 4) local activewep = ply:GetActiveWeapon() @@ -207,12 +212,14 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) if mv:KeyPressed(IN_JUMP) then ParkourEvent("jumpwallrun", ply) + ply:SetSafetyRollKeyTime(CurTime() + 0.001) vel.z = 30 - vel:Mul(ply:GetOverdriveMult()) + mv:SetVelocity(vel * 8) + ply:SetWallrun(0) ply:SetQuickturn(false) @@ -235,9 +242,9 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) local velz = math.Clamp((ply:GetWallrunTime() - CurTime()) / vwrtime, 0.1, 1) local vecvel = Vector() vecvel.z = 200 * velz - vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50) vecvel:Mul(ply:GetOverdriveMult()) + mv:SetVelocity(vecvel) mv:SetForwardSpeed(0) mv:SetSideSpeed(0) @@ -246,6 +253,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) local trout = ply.WallrunTraceOut local eyeang = ply.WallrunOrigAng or Angle() eyeang.x = 0 + tr.start = ply:EyePos() - Vector(0, 0, 5) tr.endpos = tr.start + eyeang:Forward() * 40 tr.filter = ply @@ -286,6 +294,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) if ovel:Length() > 400 then ovel:Mul(0.975) + ply:SetWallrunOrigVel(ovel) end @@ -374,6 +383,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) ply:SetQuickturn(false) ply:SetWallrunTime(0) ply:SetSafetyRollKeyTime(CurTime() + 0.001) + mv:SetVelocity(eyeang:Forward() * math.max(150, vecvel:Length() - 25) + Vector(0, 0, 250)) local event = ply:GetWallrun() == 3 and "jumpwallrunright" or "jumpwallrunleft" @@ -398,7 +408,8 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) if SERVER then ply:EmitSound("Wallrun.Concrete") - timer.Simple(0.025, function () + + timer.Simple(0.025, function() ply:EmitSound("WallrunRelease.Concrete") end) end @@ -420,7 +431,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) BodyAnim:SetSequence("jumpair") elseif game.SinglePlayer() and wr == 1 then net.Start("BodyAnimWallrun") - net.WriteBool(false) + net.WriteBool(false) net.Send(ply) end @@ -428,4 +439,4 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains) return end -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua index 23aecea..87e3cb9 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Zipline.lua @@ -1,13 +1,11 @@ if SERVER and game.SinglePlayer() then util.AddNetworkString("Zipline_SPFix") elseif CLIENT and game.SinglePlayer() then - net.Receive("Zipline_SPFix", function () + net.Receive("Zipline_SPFix", function() local ply = LocalPlayer() local zipline = ply:GetZipline() - if not IsValid(zipline) then - return - end + if not IsValid(zipline) then return end local startpos = zipline:GetStartPos() local endpos = zipline:GetEndPos() @@ -30,12 +28,13 @@ local function ZiplineCheck(ply, mv, cmd, zipline) local startp = startpos startpos = endpos endpos = startp + ply.ZiplineTwoWay = true else ply.ZiplineTwoWay = false end - local dist, near = util.DistanceToLine(startpos, endpos, mv:GetOrigin()) + local _, near = util.DistanceToLine(startpos, endpos, mv:GetOrigin()) local neardist = near:Distance(endpos) local totaldist = startpos:Distance(endpos) local start = math.abs(neardist / totaldist - 1) @@ -45,6 +44,7 @@ local function ZiplineCheck(ply, mv, cmd, zipline) local trout = ply.ZiplineTraceOut local omins = tr.mins local omaxs = tr.maxs + tr.start = LerpVector(start, startpos, endpos) tr.endpos = tr.start tr.mins, tr.maxs = ply:GetHull() @@ -59,12 +59,10 @@ local function ZiplineCheck(ply, mv, cmd, zipline) start = start + 25 / div tr.start = LerpVector(start, startpos, endpos) tr.endpos = tr.start - util.TraceHull(tr) if not trout.Hit or trout.Entity == zipline and start < 1 then fail = false - break end end @@ -81,6 +79,7 @@ local function ZiplineCheck(ply, mv, cmd, zipline) tr.maxs = omaxs tr.mins = omins + local origin = mv:GetOrigin() if CLIENT then @@ -106,11 +105,11 @@ local function ZiplineCheck(ply, mv, cmd, zipline) ply:SetCrouchJumpBlocked(false) if CLIENT_IFTP() then - local zipline = ply:GetZipline() + -- local zipline = ply:GetZipline() ply.OrigEyeAng = (endpos - startpos):Angle() elseif game.SinglePlayer() then net.Start("Zipline_SPFix") - net.WriteBool(ply.ZiplineTwoWay) + net.WriteBool(ply.ZiplineTwoWay) net.Send(ply) end @@ -123,7 +122,7 @@ local function ZiplineCheck(ply, mv, cmd, zipline) end end -local zipvec = Vector(0, 0, 85) +-- local zipvec = Vector(0, 0, 85) local function ZiplineThink(ply, mv, cmd, zipline) local fraction = ply:GetZiplineFraction() @@ -144,8 +143,10 @@ local function ZiplineThink(ply, mv, cmd, zipline) ply:SetZipline(nil) ply:SetMoveType(MOVETYPE_WALK) ply:SetCrouchJumpBlocked(true) + mv:SetVelocity(dir * speed * 0.75) mv:SetButtons(0) + ply:SetZiplineDelay(CurTime() + 0.75) if CLIENT_IFTP() or game.SinglePlayer() then @@ -167,13 +168,13 @@ local function ZiplineThink(ply, mv, cmd, zipline) ply:SetZiplineFraction(newfraction) local ziplerp = LerpVector(newfraction, startpos, endpos) - ziplerp:Sub(zipline:GetUp() * 75) local tr = ply.ZiplineTrace local trout = ply.ZiplineTraceOut local omins = tr.mins local omaxs = tr.maxs + tr.start = ziplerp tr.endpos = ziplerp tr.mins, tr.maxs = ply:GetHull() @@ -183,7 +184,9 @@ local function ZiplineThink(ply, mv, cmd, zipline) if trout.Hit and trout.Entity ~= zipline and newfraction > 0.1 then ply:SetZipline(nil) ply:SetMoveType(MOVETYPE_WALK) + mv:SetVelocity(dir * speed * 0.75) + ply:SetZiplineDelay(CurTime() + 0.75) if CLIENT_IFTP() or game.SinglePlayer() then @@ -207,7 +210,9 @@ local function ZiplineThink(ply, mv, cmd, zipline) tr.mins = omins mv:SetOrigin(ziplerp) + ply:SetZiplineSpeed(math.Approach(speed, 750, FrameTime() * 250)) + mv:SetVelocity(dir * speed) mv:SetButtons(0) mv:SetForwardSpeed(0) @@ -219,16 +224,17 @@ local function Zipline(ply, mv, cmd) if not ply.ZiplineTrace then ply.ZiplineTrace = {} ply.ZiplineTraceOut = {} + local tr = ply.ZiplineTrace local mins, maxs = ply:GetHull() + mins.z = maxs.z * 0.8 maxs.z = maxs.z * 2 - mins:Mul(2) maxs:Mul(2) - mins.z = mins.z * 0.5 maxs.z = maxs.z * 0.5 + tr.maxs = maxs tr.mins = mins ply.ZiplineTrace.mask = MASK_PLAYERSOLID @@ -238,13 +244,13 @@ local function Zipline(ply, mv, cmd) if not IsValid(ply:GetZipline()) and not ply:GetGrappling() and (not ply:Crouching() or ply:GetDive()) and not ply:OnGround() and ply:GetZiplineDelay() < CurTime() then local tr = ply.ZiplineTrace local trout = ply.ZiplineTraceOut + tr.output = trout tr.start = mv:GetOrigin() tr.endpos = tr.start tr.filter = ply util.TraceHull(tr) - local trentity = trout.Entity if IsValid(trentity) and trentity:GetClass() == "br_zipline" and ply:GetMoveType() == MOVETYPE_WALK then @@ -269,4 +275,4 @@ function CreateZipline(startpos, endpos) return zipline end -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/_Helpers.lua b/beatrun/gamemodes/beatrun/gamemode/sh/_Helpers.lua index 18a28ec..5153ed1 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/_Helpers.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/_Helpers.lua @@ -5,57 +5,20 @@ function CLIENT_IFTP() return CLIENT and IsFirstTimePredicted() end +--[[ local matrixdatatmp = { - { - 0, - 0, - 0, - 0 - }, - { - 0, - 0, - 0, - 0 - }, - { - 0, - 0, - 0, - 0 - }, - { - 0, - 0, - 0, - 1 - } + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 1} } +]] + local mtmp = { - { - 0, - 0, - 0, - 0 - }, - { - 0, - 0, - 0, - 0 - }, - { - 0, - 0, - 0, - 0 - }, - { - 0, - 0, - 0, - 1 - } + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 0}, + {0, 0, 0, 1} } function vmatrixmeta:FastToTable(tbl) @@ -115,12 +78,6 @@ function playermeta:SetWallrunData(wr, wrtime, dir) end function playermeta:UsingRH(wep) - local usingrh = false local activewep = wep or self:GetActiveWeapon() - - if IsValid(activewep) then - usingrh = activewep:GetClass() == "runnerhands" - end - - return usingrh -end + if IsValid(activewep) then return activewep:GetClass() == "runnerhands" end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua b/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua index 0854eeb..9aaef48 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua @@ -5,21 +5,18 @@ buildmode_props = {} local propmatsblacklist = {} local blocksdir = "models/hunter/blocks/" local blocksdir_s = blocksdir .. "*.mdl" - for k, v in ipairs(file.Find(blocksdir_s, "GAME")) do table.insert(buildmode_props, blocksdir .. v:lower()) end local blocksdir = "models/hunter/triangles/" local blocksdir_s = blocksdir .. "*.mdl" - for k, v in ipairs(file.Find(blocksdir_s, "GAME")) do table.insert(buildmode_props, blocksdir .. v:lower()) end local blocksdir = "models/props_phx/construct/glass/" local blocksdir_s = blocksdir .. "*.mdl" - for k, v in ipairs(file.Find(blocksdir_s, "GAME")) do local key = table.insert(buildmode_props, blocksdir .. v:lower()) propmatsblacklist[key] = true @@ -36,56 +33,8 @@ buildmode_entmodels = { tt_cp = "models/props_phx/construct/windows/window_angle360.mdl", br_swingbar = "models/hunter/plates/plate2.mdl" } -local misc = { - "models/hunter/misc/lift2x2.mdl", - "models/hunter/misc/stair1x1.mdl", - "models/hunter/misc/stair1x1inside.mdl", - "models/hunter/misc/stair1x1outside.mdl", - "models/props_combine/combine_barricade_short02a.mdl", - "models/props_combine/combine_bridge_b.mdl", - "models/props_docks/channelmarker_gib02.mdl", - "models/props_docks/channelmarker_gib04.mdl", - "models/props_docks/channelmarker_gib03.mdl", - "models/props_lab/blastdoor001a.mdl", - "models/props_lab/blastdoor001c.mdl", - "models/props_wasteland/cargo_container01.mdl", - "models/props_wasteland/cargo_container01b.mdl", - "models/props_wasteland/cargo_container01c.mdl", - "models/props_wasteland/horizontalcoolingtank04.mdl", - "models/props_wasteland/laundry_washer001a.mdl", - "models/props_wasteland/laundry_washer003.mdl", - "models/props_junk/TrashDumpster01a.mdl", - "models/props_junk/TrashDumpster02.mdl", - "models/props_junk/wood_crate001a.mdl", - "models/props_junk/wood_crate002a.mdl", - "models/props_junk/wood_pallet001a.mdl", - "models/props_c17/fence01a.mdl", - "models/props_c17/fence01b.mdl", - "models/props_c17/fence02a.mdl", - "models/props_c17/fence03a.mdl", - "models/props_c17/fence04a.mdl", - "models/props_wasteland/interior_fence001g.mdl", - "models/props_wasteland/interior_fence002d.mdl", - "models/props_wasteland/interior_fence002e.mdl", - "models/props_building_details/Storefront_Template001a_Bars.mdl", - "models/props_wasteland/wood_fence01a.mdl", - "models/props_wasteland/wood_fence02a.mdl", - "models/props_c17/concrete_barrier001a.mdl", - "models/props_wasteland/medbridge_base01.mdl", - "models/props_wasteland/medbridge_post01.mdl", - "models/props_wasteland/medbridge_strut01.mdl", - "models/props_c17/column02a.mdl", - "models/props_junk/iBeam01a_cluster01.mdl", - "models/props_junk/iBeam01a.mdl", - "models/props_canal/canal_cap001.mdl", - "models/props_canal/canal_bridge04.mdl", - "models/Mechanics/gears2/pinion_80t3.mdl", - "models/props_phx/gears/rack36.mdl", - "models/props_phx/gears/rack70.mdl", - "models/cranes/crane_frame.mdl", - "models/cranes/crane_docks.mdl", - "models/props_wasteland/cranemagnet01a.mdl" -} + +local misc = {"models/hunter/misc/lift2x2.mdl", "models/hunter/misc/stair1x1.mdl", "models/hunter/misc/stair1x1inside.mdl", "models/hunter/misc/stair1x1outside.mdl", "models/props_combine/combine_barricade_short02a.mdl", "models/props_combine/combine_bridge_b.mdl", "models/props_docks/channelmarker_gib02.mdl", "models/props_docks/channelmarker_gib04.mdl", "models/props_docks/channelmarker_gib03.mdl", "models/props_lab/blastdoor001a.mdl", "models/props_lab/blastdoor001c.mdl", "models/props_wasteland/cargo_container01.mdl", "models/props_wasteland/cargo_container01b.mdl", "models/props_wasteland/cargo_container01c.mdl", "models/props_wasteland/horizontalcoolingtank04.mdl", "models/props_wasteland/laundry_washer001a.mdl", "models/props_wasteland/laundry_washer003.mdl", "models/props_junk/TrashDumpster01a.mdl", "models/props_junk/TrashDumpster02.mdl", "models/props_junk/wood_crate001a.mdl", "models/props_junk/wood_crate002a.mdl", "models/props_junk/wood_pallet001a.mdl", "models/props_c17/fence01a.mdl", "models/props_c17/fence01b.mdl", "models/props_c17/fence02a.mdl", "models/props_c17/fence03a.mdl", "models/props_c17/fence04a.mdl", "models/props_wasteland/interior_fence001g.mdl", "models/props_wasteland/interior_fence002d.mdl", "models/props_wasteland/interior_fence002e.mdl", "models/props_building_details/Storefront_Template001a_Bars.mdl", "models/props_wasteland/wood_fence01a.mdl", "models/props_wasteland/wood_fence02a.mdl", "models/props_c17/concrete_barrier001a.mdl", "models/props_wasteland/medbridge_base01.mdl", "models/props_wasteland/medbridge_post01.mdl", "models/props_wasteland/medbridge_strut01.mdl", "models/props_c17/column02a.mdl", "models/props_junk/iBeam01a_cluster01.mdl", "models/props_junk/iBeam01a.mdl", "models/props_canal/canal_cap001.mdl", "models/props_canal/canal_bridge04.mdl", "models/Mechanics/gears2/pinion_80t3.mdl", "models/props_phx/gears/rack36.mdl", "models/props_phx/gears/rack70.mdl", "models/cranes/crane_frame.mdl", "models/cranes/crane_docks.mdl", "models/props_wasteland/cranemagnet01a.mdl"} for k, v in ipairs(misc) do local key = table.insert(buildmode_props, v:lower()) @@ -93,6 +42,7 @@ for k, v in ipairs(misc) do end misc = nil + buildmode_ents = { br_swingpipe = true, br_swingrope = true, @@ -104,38 +54,42 @@ buildmode_ents = { tt_cp = true, br_swingbar = true } + PlaceStartPos = nil PlaceEndPos = nil local PlaceMaxs = Vector() local PlaceMins = Vector() PlaceAxisLock = 0 + entplacefunc_prespawn = { br_zipline = true, br_swingrope = true } + entplacefunc = { - br_ladder = function (self, vecextra) + br_ladder = function(self, vecextra) self:SetPos(self:GetPos() + self:GetAngles():Forward() * 10) vecextra:Set(vecextra + self:GetAngles():Forward() * 10) self:LadderHeightExact(vecextra:Distance(self:GetPos()) - 75) end, - br_balance = function (self, vecextra) + br_balance = function(self, vecextra) self:BalanceLengthExact(vecextra:Distance(self:GetPos())) end, - br_zipline = function (self, vecextra, vec) + br_zipline = function(self, vecextra, vec) self:SetPos(vec) self:SetStartPos(vec) self:SetEndPos(vecextra) self:SetTwoWay(net.ReadBool()) end, - br_swingrope = function (self, vecextra, vec) + br_swingrope = function(self, vecextra, vec) self:SetPos(vec) self:SetStartPos(vec) self:SetEndPos(vecextra) end } + entplacefunc_cl = { - tt_cp = function () + tt_cp = function() local svec = util.AimVector(LocalPlayer():EyeAngles(), 133, mousex, mousey, ScrW(), ScrH()) local start = LocalPlayer():EyePos() @@ -145,11 +99,12 @@ entplacefunc_cl = { local pos = tr.HitPos net.Start("BuildMode_Checkpoint") - net.WriteFloat(pos.x) - net.WriteFloat(pos.y) - net.WriteFloat(pos.z) + net.WriteFloat(pos.x) + net.WriteFloat(pos.y) + net.WriteFloat(pos.z) net.SendToServer() - timer.Simple(0.1, function () + + timer.Simple(0.1, function() LoadCheckpoints() end) @@ -157,7 +112,7 @@ entplacefunc_cl = { return true end, - br_ladder = function () + br_ladder = function() if not PlaceStartPos then PlaceAxisLock = 3 PlaceStartPos = Vector(BuildModePos) @@ -167,14 +122,15 @@ entplacefunc_cl = { end net.Start("BuildMode_Place") - net.WriteUInt(65535, 16) - net.WriteString(BuildModeIndex) - net.WriteFloat(PlaceStartPos.x) - net.WriteFloat(PlaceStartPos.y) - net.WriteFloat(PlaceStartPos.z) - net.WriteAngle(BuildModeAngle) - net.WriteVector(BuildModePos) + net.WriteUInt(65535, 16) + net.WriteString(BuildModeIndex) + net.WriteFloat(PlaceStartPos.x) + net.WriteFloat(PlaceStartPos.y) + net.WriteFloat(PlaceStartPos.z) + net.WriteAngle(BuildModeAngle) + net.WriteVector(BuildModePos) net.SendToServer() + LocalPlayer():EmitSound("buttonclick.wav") BuildModePlaceDelay = CurTime() + 0.05 @@ -184,7 +140,7 @@ entplacefunc_cl = { return true end, - br_zipline = function () + br_zipline = function() if not PlaceStartPos then PlaceAxisLock = 0 PlaceStartPos = Vector(BuildModePos) @@ -194,15 +150,16 @@ entplacefunc_cl = { end net.Start("BuildMode_Place") - net.WriteUInt(65535, 16) - net.WriteString(BuildModeIndex) - net.WriteFloat(PlaceStartPos.x) - net.WriteFloat(PlaceStartPos.y) - net.WriteFloat(PlaceStartPos.z) - net.WriteAngle(BuildModeAngle) - net.WriteVector(BuildModePos) - net.WriteBool(input.IsKeyDown(KEY_LSHIFT)) + net.WriteUInt(65535, 16) + net.WriteString(BuildModeIndex) + net.WriteFloat(PlaceStartPos.x) + net.WriteFloat(PlaceStartPos.y) + net.WriteFloat(PlaceStartPos.z) + net.WriteAngle(BuildModeAngle) + net.WriteVector(BuildModePos) + net.WriteBool(input.IsKeyDown(KEY_LSHIFT)) net.SendToServer() + LocalPlayer():EmitSound("buttonclick.wav") BuildModePlaceDelay = CurTime() + 0.05 @@ -212,7 +169,7 @@ entplacefunc_cl = { return true end, - br_swingrope = function () + br_swingrope = function() if not PlaceStartPos then PlaceAxisLock = -3 PlaceStartPos = Vector(BuildModePos) @@ -222,14 +179,15 @@ entplacefunc_cl = { end net.Start("BuildMode_Place") - net.WriteUInt(65535, 16) - net.WriteString(BuildModeIndex) - net.WriteFloat(PlaceStartPos.x) - net.WriteFloat(PlaceStartPos.y) - net.WriteFloat(PlaceStartPos.z) - net.WriteAngle(BuildModeAngle) - net.WriteVector(BuildModePos) + net.WriteUInt(65535, 16) + net.WriteString(BuildModeIndex) + net.WriteFloat(PlaceStartPos.x) + net.WriteFloat(PlaceStartPos.y) + net.WriteFloat(PlaceStartPos.z) + net.WriteAngle(BuildModeAngle) + net.WriteVector(BuildModePos) net.SendToServer() + LocalPlayer():EmitSound("buttonclick.wav") BuildModePlaceDelay = CurTime() + 0.05 @@ -239,7 +197,7 @@ entplacefunc_cl = { return true end, - br_balance = function () + br_balance = function() if not PlaceStartPos then PlaceAxisLock = 1 PlaceStartPos = Vector(BuildModePos) @@ -249,14 +207,15 @@ entplacefunc_cl = { end net.Start("BuildMode_Place") - net.WriteUInt(65535, 16) - net.WriteString(BuildModeIndex) - net.WriteFloat(PlaceStartPos.x) - net.WriteFloat(PlaceStartPos.y) - net.WriteFloat(PlaceStartPos.z) - net.WriteAngle(BuildModeAngle) - net.WriteVector(BuildModePos) + net.WriteUInt(65535, 16) + net.WriteString(BuildModeIndex) + net.WriteFloat(PlaceStartPos.x) + net.WriteFloat(PlaceStartPos.y) + net.WriteFloat(PlaceStartPos.z) + net.WriteAngle(BuildModeAngle) + net.WriteVector(BuildModePos) net.SendToServer() + LocalPlayer():EmitSound("buttonclick.wav") BuildModePlaceDelay = CurTime() + 0.05 @@ -267,25 +226,27 @@ entplacefunc_cl = { return true end } + entsavefunc = { - br_zipline = function (self, tbl) + br_zipline = function(self, tbl) tbl.StartPos = self:GetStartPos() tbl.EndPos = self:GetEndPos() tbl.TwoWay = self:GetTwoWay() end, - br_ladder = function (self, tbl) + br_ladder = function(self, tbl) tbl.LadderHeight = self:GetLadderHeight() end, - br_balance = function (self, tbl) + br_balance = function(self, tbl) tbl.BalanceLength = self:GetBalanceLength() end, - br_swingrope = function (self, tbl) + br_swingrope = function(self, tbl) tbl.StartPos = self:GetStartPos() tbl.EndPos = self:GetEndPos() end } + entreadfunc = { - br_zipline = function (self, tbl) + br_zipline = function(self, tbl) self:SetPos(tbl.StartPos) self:SetStartPos(tbl.StartPos) self:SetEndPos(tbl.EndPos) @@ -293,29 +254,31 @@ entreadfunc = { return true end, - br_ladder = function (self, tbl) - timer.Simple(0, function () + br_ladder = function(self, tbl) + timer.Simple(0, function() if IsValid(self) and self.LadderHeightExact then self:LadderHeightExact(tbl.LadderHeight) end end) + self:SetPos(tbl.pos + tbl.ang:Forward() * 10) self:SetAngles(tbl.ang) return true end, - br_balance = function (self, tbl) - timer.Simple(0, function () + br_balance = function(self, tbl) + timer.Simple(0, function() if IsValid(self) and self.BalanceLengthExact then self:BalanceLengthExact(tbl.BalanceLength) end end) + self:SetPos(tbl.pos + tbl.ang:Forward() * 10) self:SetAngles(tbl.ang) return true end, - br_swingrope = function (self, tbl) + br_swingrope = function(self, tbl) self:SetPos(tbl.StartPos) self:SetStartPos(tbl.StartPos) self:SetEndPos(tbl.EndPos) @@ -323,6 +286,7 @@ entreadfunc = { return true end } + local buildmode_props_index = {} for k, v in pairs(buildmode_props) do @@ -330,9 +294,7 @@ for k, v in pairs(buildmode_props) do end local function CustomPropMat(prop) - if propmatsblacklist[buildmode_props_index[prop:GetModel()]] then - return - end + if propmatsblacklist[buildmode_props_index[prop:GetModel()]] then return end if prop.hr then prop:SetMaterial("medge/redplainplastervertex") @@ -366,19 +328,17 @@ if SERVER then function Course_Sync() net.Start("BuildMode_Sync") - net.WriteFloat(Course_StartPos.x) - net.WriteFloat(Course_StartPos.y) - net.WriteFloat(Course_StartPos.z) - net.WriteFloat(Course_StartAng) - net.WriteString(Course_Name) - net.WriteString(Course_ID) + net.WriteFloat(Course_StartPos.x) + net.WriteFloat(Course_StartPos.y) + net.WriteFloat(Course_StartPos.z) + net.WriteFloat(Course_StartAng) + net.WriteString(Course_Name) + net.WriteString(Course_ID) net.Broadcast() end function Course_Stop(len, ply) - if ply and not ply:IsSuperAdmin() then - return - end + if ply and not ply:IsSuperAdmin() then return end Course_Name = "" Course_ID = "" @@ -392,9 +352,7 @@ if SERVER then buildmode_placed = buildmode_placed or {} function BuildMode_Toggle(ply) - if not ply.BuildMode and not ply:IsSuperAdmin() and not ply.BuildModePerm then - return - end + if not ply.BuildMode and not ply:IsSuperAdmin() and not ply.BuildModePerm then return end ply.BuildMode = not ply.BuildMode @@ -402,22 +360,20 @@ if SERVER then ply:SetMoveType(MOVETYPE_NOCLIP) else ply:SetMoveType(MOVETYPE_WALK) - CheckpointNumber = 1 end net.Start("BuildMode") - net.WriteBool(ply.BuildMode) + net.WriteBool(ply.BuildMode) net.Send(ply) end - concommand.Add("buildmode", function (ply, cmd, args) + concommand.Add("buildmode", function(ply, cmd, args) BuildMode_Toggle(ply) end) - net.Receive("BuildMode_Place", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Place", function(len, ply) + if not ply.BuildMode then return end local prop = net.ReadUInt(16) @@ -434,17 +390,18 @@ if SERVER then if not isstring(prop) then local a = ents.Create("prop_physics") - a:SetModel(buildmode_props[prop]) + CustomPropMat(a) + a:SetPos(vec) a:SetAngles(ang) a:Spawn() local phys = a:GetPhysicsObject() - phys:EnableMotion(false) phys:Sleep() + a:PhysicsDestroy() a:SetHealth(inf) else @@ -471,31 +428,30 @@ if SERVER then table.insert(buildmodelogs, bmlog) end) - net.Receive("BuildMode_Duplicate", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Duplicate", function(len, ply) + if not ply.BuildMode then return end local selected = net.ReadTable() local selectedents = net.ReadTable() for k, v in pairs(selected) do local a = ents.Create("prop_physics") - a:SetModel(v:GetModel()) + CustomPropMat(a) + a:SetPos(v:GetPos()) a:SetAngles(v:GetAngles()) a:Spawn() - a.hr = v.hr CustomPropMat(a) local phys = a:GetPhysicsObject() - phys:EnableMotion(false) phys:Sleep() + a:PhysicsDestroy() a:SetHealth(inf) end @@ -512,10 +468,9 @@ if SERVER then table.insert(buildmodelogs, bmlog) end) - net.Receive("BuildMode_Delete", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Delete", function(len, ply) + if not ply.BuildMode then return end local selected = net.ReadTable() @@ -529,10 +484,9 @@ if SERVER then table.insert(buildmodelogs, bmlog) end) - net.Receive("BuildMode_Highlight", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Highlight", function(len, ply) + if not ply.BuildMode then return end local selected = net.ReadTable() @@ -542,71 +496,68 @@ if SERVER then CustomPropMat(v) end end) - net.Receive("BuildMode_Remove", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Remove", function(len, ply) + if not ply.BuildMode then return end local ent = net.ReadEntity() SafeRemoveEntity(ent) end) - net.Receive("BuildMode_ReadSave", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_ReadSave", function(len, ply) + if not ply.BuildMode then return end local a = util.Decompress(net.ReadData(len)) local props = util.JSONToTable(a) for k, v in pairs(props) do local a = ents.Create("prop_physics") - print(buildmode_props[v.model], v.model) a:SetModel(buildmode_props[v.model]) + CustomPropMat(a) + a:SetPos(v.pos + ply:EyePos()) a:SetAngles(v.ang) a:Spawn() local phys = a:GetPhysicsObject() - phys:EnableMotion(false) phys:Sleep() + a:PhysicsDestroy() a:SetHealth(inf) end end) - net.Receive("BuildMode_Checkpoint", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Checkpoint", function(len, ply) + if not ply.BuildMode then return end local x = net.ReadFloat() local y = net.ReadFloat() local z = net.ReadFloat() LoadCheckpoints() + PrintTable(Checkpoints) local a = ents.Create("tt_cp") - a:SetPos(Vector(x, y, z)) a:SetCPNum(table.Count(Checkpoints) + 1) a:Spawn() + LoadCheckpoints() end) - net.Receive("BuildMode_Entity", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Entity", function(len, ply) + if not ply.BuildMode then return end local ent = net.ReadString() local x = net.ReadFloat() local y = net.ReadFloat() local z = net.ReadFloat() local a = ents.Create(ent) - a:SetPos(Vector(x, y, z)) if entplacefunc[ent] then @@ -615,10 +566,9 @@ if SERVER then a:Spawn() end) - net.Receive("BuildMode_SetSpawn", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_SetSpawn", function(len, ply) + if not ply.BuildMode then return end local x = net.ReadFloat() local y = net.ReadFloat() @@ -626,14 +576,11 @@ if SERVER then local ang = net.ReadFloat() Course_StartPos:SetUnpacked(x, y, z) - Course_StartAng = ang end) function Beatrun_ReadCourseNet(len, ply) - if not ply:IsSuperAdmin() then - return - end + if not ply:IsSuperAdmin() then return end Beatrun_ReadCourse(net.ReadData(len)) end @@ -649,7 +596,6 @@ if SERVER then end Course_ID = id - Beatrun_ReadCourse(save) end @@ -672,17 +618,17 @@ if SERVER then for k, v in pairs(props) do local a = ents.Create("prop_physics") a.hr = v.hr - a:SetModel(buildmode_props[v.model]) CustomPropMat(a) + a:SetPos(v.pos) a:SetAngles(v.ang) a:Spawn() local phys = a:GetPhysicsObject() - phys:EnableMotion(false) phys:Sleep() + a:PhysicsDestroy() a:SetHealth(inf) end @@ -691,11 +637,12 @@ if SERVER then LoadCheckpoints() local a = ents.Create("tt_cp") - a:SetPos(v) a:SetCPNum(table.Count(Checkpoints) + 1) a:Spawn() + LoadCheckpoints() + print(k, v, a) end @@ -734,10 +681,9 @@ if SERVER then end net.Receive("BuildMode_ReadCourse", Beatrun_ReadCourseNet) - net.Receive("BuildMode_Drag", function (len, ply) - if not ply.BuildMode then - return - end + + net.Receive("BuildMode_Drag", function(len, ply) + if not ply.BuildMode then return end local selected = net.ReadTable() @@ -758,47 +704,42 @@ if CLIENT then local GhostColor = Color(255, 255, 255, 200) BuildModeAngle = Angle() BuildModePos = Vector() - local BuildModeDist = 500 + -- local BuildModeDist = 500 local usedown = false local mousedown = false local axislock = 0 - local axislist = { - "x", - "y", - "z" - } - local axiscolors = { - Color(255, 0, 0), - Color(0, 255, 0), - Color(0, 0, 255) - } + + local axislist = {"x", "y", "z"} + + local axiscolors = {Color(255, 0, 0), Color(0, 255, 0), Color(0, 0, 255)} + local axisdisplay1 = Vector() local axisdisplay2 = Vector() mousey = 0 mousex = 0 - local mousemoved = false + -- local mousemoved = false local camcontrol = false local scrw = ScrW() local scrh = ScrH() - local nscrw = ScrW() - local nscrh = ScrH() + -- local nscrw = ScrW() + -- local nscrh = ScrH() local aimvector = Vector() local dragstartx = 0 local dragstarty = 0 - local dragstartvec = Vector() + -- local dragstartvec = Vector() local dragging = false local dragoffset = Vector() - local hulltr = {} - local hulltrout = {} + -- local hulltr = {} + -- local hulltrout = {} buildmode_placed = buildmode_placed or {} buildmode_selected = {} local keytime = 0 - playerstart = IsValid(playerstart) and playerstart or ClientsideModel("models/editor/playerstart.mdl") + playerstart = IsValid(playerstart) and playerstart or ClientsideModel("models/editor/playerstart.mdl") playerstart:SetNoDraw(true) local playerstartang = Angle() - local ZiplineStart, ZiplineEnd = nil + local ZiplineStart, _ = nil local ziplinemins = Vector(-8, -8, -8) local ziplinemaxs = Vector(8, 8, 8) @@ -822,6 +763,7 @@ if CLIENT then local blur = Material("pp/blurscreen") + --[[ local function DrawBlurRect(x, y, w, h) local X = 0 local Y = 0 @@ -832,12 +774,16 @@ if CLIENT then for i = 1, 5 do blur:SetFloat("$blur", i / 3 * 5) blur:Recompute() + render.UpdateScreenEffectTexture() render.SetScissorRect(x, y, x + w, y + h, true) + surface.DrawTexturedRect(X * -1, Y * -1, scrw, scrh) + render.SetScissorRect(0, 0, 0, 0, false) end end + ]] function BuildModeCreateGhost() if not IsValid(GhostModel) then @@ -853,25 +799,21 @@ if CLIENT then GhostModel:SetColor(GhostColor) GhostModel:SetRenderMode(RENDERMODE_TRANSCOLOR) GhostModel:SetNoDraw(true) + CustomPropMat(GhostModel) end local trace = {} local tracer = {} - local flatn = Angle(0, 0, 1) + -- local flatn = Angle(0, 0, 1) function BuildModeGhost() if ZiplineStart then render.DrawWireframeBox(ZiplineStart, angle_zero, ziplinemins, ziplinemaxs, color_white, true) end - if BuildModeIndex == 0 then - return - end - - if AEUI.HoveredPanel then - return - end + if BuildModeIndex == 0 then return end + if AEUI.HoveredPanel then return end BuildModeCreateGhost() @@ -879,7 +821,9 @@ if CLIENT then local eyepos = ply:EyePos() local eyeang = ply:EyeAngles() local mins, maxs = GhostModel:GetRenderBounds() + aimvector = util.AimVector(eyeang, 133, mousex, mousey, ScrW(), ScrH()) + trace.start = eyepos trace.endpos = eyepos + aimvector * (not PlaceStartPos and 100000 or PlaceStartPos:Distance(ply:GetPos())) trace.filter = ply @@ -911,6 +855,7 @@ if CLIENT then GhostModel:SetPos(BuildModePos) GhostModel:SetAngles(BuildModeAngle) GhostModel:DrawModel() + render.DrawWireframeBox(BuildModePos, BuildModeAngle, mins, maxs, color_white, true) if PlaceStartPos then @@ -924,7 +869,6 @@ if CLIENT then axisdisplay1[axislist[axislock]] = num + 200 axisdisplay2:Set(BuildModePos) - axisdisplay2[axislist[axislock]] = num - 200 render.DrawLine(axisdisplay2, axisdisplay1, axiscolors[axislock]) @@ -944,19 +888,13 @@ if CLIENT then end function CourseData(name) - local save = { - {}, - {}, - Course_StartPos, - Course_StartAng, - name or "Unnamed", - {} - } + local save = {{}, {}, Course_StartPos, Course_StartAng, name or "Unnamed", {}} for k, v in pairs(buildmode_placed) do if not IsValid(v) then - -- Nothing + return elseif v:GetNW2Bool("BRProtected") then + -- Nothing print("ignoring protected ent") else local class = v:GetClass() @@ -1010,11 +948,12 @@ if CLIENT then print("Save created:", crc) end - concommand.Add("Beatrun_SaveCourse", function (ply, cmd, args, argstr) + concommand.Add("Beatrun_SaveCourse", function(ply, cmd, args, argstr) local name = args[1] or "Unnamed" local compress = not args[2] print(compress) + SaveCourse(name, compress) end) @@ -1029,14 +968,15 @@ if CLIENT then end net.Start("BuildMode_ReadCourse") - net.WriteData(save) + net.WriteData(save) net.SendToServer() + LoadCheckpoints() Course_ID = id end - concommand.Add("Beatrun_LoadCourse", function (ply, cmd, args, argstr) + concommand.Add("Beatrun_LoadCourse", function(ply, cmd, args, argstr) local id = args[1] or "Unnamed" LoadCourse(id) @@ -1050,20 +990,22 @@ if CLIENT then end net.Start("BuildMode_ReadCourse") - net.WriteData(data) + net.WriteData(data) net.SendToServer() + LoadCheckpoints() Course_ID = id end - concommand.Add("Beatrun_PrintCourse", function (ply, cmd, args, argstr) + concommand.Add("Beatrun_PrintCourse", function(ply, cmd, args, argstr) local dir = "beatrun/courses/" .. game.GetMap() .. "/*.txt" local files = file.Find(dir, "DATA", "datedesc") PrintTable(files) end) - net.Receive("BuildMode_Sync", function () + + net.Receive("BuildMode_Sync", function() local x = net.ReadFloat() local y = net.ReadFloat() local z = net.ReadFloat() @@ -1079,7 +1021,7 @@ if CLIENT then end) buildmodeinputs = { - [KEY_R] = function () + [KEY_R] = function() if not dragging then BuildModeAngle:Set(angle_zero) @@ -1092,80 +1034,81 @@ if CLIENT then axislock = 0 end end, - [KEY_X] = function () + [KEY_X] = function() local mult = input.IsKeyDown(KEY_LCONTROL) and 0.06666666666666667 or 1 BuildModeAngle:RotateAroundAxis(Vector(1, 0, 0), 15 * mult) + LocalPlayer():EmitSound("buttonrollover.wav") end, - [KEY_C] = function () + [KEY_C] = function() local mult = input.IsKeyDown(KEY_LCONTROL) and 0.06666666666666667 or 1 BuildModeAngle:RotateAroundAxis(Vector(1, 0, 0), -15 * mult) + LocalPlayer():EmitSound("buttonrollover.wav") end, - [KEY_V] = function () + [KEY_V] = function() local mult = input.IsKeyDown(KEY_LCONTROL) and 0.06666666666666667 or 1 BuildModeAngle:RotateAroundAxis(Vector(0, 1, 0), 15 * mult) + LocalPlayer():EmitSound("buttonrollover.wav") end, - [KEY_B] = function () + [KEY_B] = function() local mult = input.IsKeyDown(KEY_LCONTROL) and 0.06666666666666667 or 1 BuildModeAngle:RotateAroundAxis(Vector(0, 1, 0), -15 * mult) + LocalPlayer():EmitSound("buttonrollover.wav") end, - [KEY_F] = function () - if CurTime() < BuildModePlaceDelay then - return - end + [KEY_F] = function() + if CurTime() < BuildModePlaceDelay then return end local svec = util.AimVector(LocalPlayer():EyeAngles(), 133, mousex, mousey, ScrW(), ScrH()) - local start = LocalPlayer():EyePos() - svec:Mul(100000) + local start = LocalPlayer():EyePos() local tr = util.QuickTrace(start, svec, LocalPlayer()) local pos = tr.HitPos net.Start("BuildMode_Checkpoint") - net.WriteFloat(pos.x) - net.WriteFloat(pos.y) - net.WriteFloat(pos.z) + net.WriteFloat(pos.x) + net.WriteFloat(pos.y) + net.WriteFloat(pos.z) net.SendToServer() - timer.Simple(0.1, function () + + timer.Simple(0.1, function() LoadCheckpoints() end) BuildModePlaceDelay = CurTime() + 0.05 end, - [KEY_S] = function () - if camcontrol then - return - end + [KEY_S] = function() + if camcontrol then return end local svec = util.AimVector(LocalPlayer():EyeAngles(), 133, mousex, mousey, ScrW(), ScrH()) - local start = LocalPlayer():EyePos() - svec:Mul(100000) + local start = LocalPlayer():EyePos() local tr = util.QuickTrace(start, svec, LocalPlayer()) local pos = tr.HitPos local ang = LocalPlayer():EyeAngles().y Course_StartPos:Set(pos) + net.Start("BuildMode_SetSpawn") - net.WriteFloat(pos.x) - net.WriteFloat(pos.y) - net.WriteFloat(pos.z) - net.WriteFloat(ang) + net.WriteFloat(pos.x) + net.WriteFloat(pos.y) + net.WriteFloat(pos.z) + net.WriteFloat(ang) net.SendToServer() + Course_StartPos:Set(pos) Course_StartAng = ang end, - [KEY_D] = function (ignorecombo) + [KEY_D] = function(ignorecombo) if (input.IsKeyDown(KEY_LSHIFT) or ignorecombo) and not camcontrol then local props = {} local ents = {} @@ -1179,46 +1122,43 @@ if CLIENT then end net.Start("BuildMode_Duplicate") - net.WriteTable(props) - net.WriteTable(ents) + net.WriteTable(props) + net.WriteTable(ents) net.SendToServer() dragging = false - buildmodeinputs[KEY_G]() end end, - [KEY_DELETE] = function () + [KEY_DELETE] = function() if not dragging then local props = {} for k, v in pairs(buildmode_selected) do table.insert(props, k) - buildmode_selected[k] = nil end net.Start("BuildMode_Delete") - net.WriteTable(props) + net.WriteTable(props) net.SendToServer() end end, - [KEY_BACKSPACE] = function () + [KEY_BACKSPACE] = function() if not dragging then local props = {} for k, v in pairs(buildmode_selected) do table.insert(props, k) - buildmode_selected[k] = nil end net.Start("BuildMode_Delete") - net.WriteTable(props) + net.WriteTable(props) net.SendToServer() end end, - [KEY_T] = function () + [KEY_T] = function() if not dragging then local props = {} @@ -1230,15 +1170,13 @@ if CLIENT then if #props > 0 then net.Start("BuildMode_Highlight") - net.WriteTable(props) + net.WriteTable(props) net.SendToServer() end end end, - [KEY_G] = function () - if BuildModeIndex ~= 0 then - return - end + [KEY_G] = function() + if BuildModeIndex ~= 0 then return end BuildModeAngle:Set(angle_zero) @@ -1248,6 +1186,7 @@ if CLIENT then dragging = true dragoffset:Set(vector_origin) + buildmodeinputsmouse[MOUSE_RIGHT]() else local f = nil @@ -1260,18 +1199,15 @@ if CLIENT then if IsValid(f) then cam.Start3D() + local w2s = f:GetPos():ToScreen() - local w2s = f:GetPos():ToScreen() - - input.SetCursorPos(w2s.x, w2s.y) + input.SetCursorPos(w2s.x, w2s.y) cam.End3D() end end end, - [KEY_ENTER] = function () - if table.Count(buildmode_selected) == 0 then - return - end + [KEY_ENTER] = function() + if table.Count(buildmode_selected) == 0 then return end local save = {} local startpos = nil @@ -1295,16 +1231,17 @@ if CLIENT then file.CreateDir("beatrun/savedbuilds") file.Write("beatrun/savedbuilds/save.txt", util.Compress(jsonsave)) end, - [KEY_PAD_PLUS] = function () + [KEY_PAD_PLUS] = function() local save = file.Read("beatrun/savedbuilds/save.txt", "DATA") net.Start("BuildMode_ReadSave") - net.WriteData(save) + net.WriteData(save) net.SendToServer() end } + buildmodeinputsmouse = { - [MOUSE_LEFT] = function () + [MOUSE_LEFT] = function() if isstring(BuildModeIndex) then local noplace = false @@ -1314,29 +1251,29 @@ if CLIENT then if not noplace then net.Start("BuildMode_Place") - net.WriteUInt(65535, 16) - net.WriteString(BuildModeIndex) - net.WriteFloat(BuildModePos.x) - net.WriteFloat(BuildModePos.y) - net.WriteFloat(BuildModePos.z) - net.WriteAngle(BuildModeAngle) + net.WriteUInt(65535, 16) + net.WriteString(BuildModeIndex) + net.WriteFloat(BuildModePos.x) + net.WriteFloat(BuildModePos.y) + net.WriteFloat(BuildModePos.z) + net.WriteAngle(BuildModeAngle) net.SendToServer() + LocalPlayer():EmitSound("buttonclick.wav") BuildModePlaceDelay = CurTime() + 0.05 end elseif BuildModeIndex > 0 then - if CurTime() < BuildModePlaceDelay then - return - end + if CurTime() < BuildModePlaceDelay then return end net.Start("BuildMode_Place") - net.WriteUInt(BuildModeIndex, 16) - net.WriteFloat(BuildModePos.x) - net.WriteFloat(BuildModePos.y) - net.WriteFloat(BuildModePos.z) - net.WriteAngle(BuildModeAngle) + net.WriteUInt(BuildModeIndex, 16) + net.WriteFloat(BuildModePos.x) + net.WriteFloat(BuildModePos.y) + net.WriteFloat(BuildModePos.z) + net.WriteAngle(BuildModeAngle) net.SendToServer() + LocalPlayer():EmitSound("buttonclick.wav") BuildModePlaceDelay = CurTime() + 0.05 @@ -1344,6 +1281,7 @@ if CLIENT then if dragging then local selected = {} + dragging = false if table.Count(buildmode_selected) > 0 then @@ -1360,7 +1298,7 @@ if CLIENT then end net.Start("BuildMode_Drag") - net.WriteTable(selected) + net.WriteTable(selected) net.SendToServer() end @@ -1373,10 +1311,9 @@ if CLIENT then if BuildModeIndex == 0 then local svec = util.AimVector(LocalPlayer():EyeAngles(), 133, mousex, mousey, ScrW(), ScrH()) - local start = LocalPlayer():EyePos() - svec:Mul(100000) + local start = LocalPlayer():EyePos() local tr = util.QuickTrace(start, svec, LocalPlayer()) if not input.IsKeyDown(KEY_LSHIFT) then @@ -1395,7 +1332,7 @@ if CLIENT then end end end, - [MOUSE_RIGHT] = function () + [MOUSE_RIGHT] = function() if dragging and table.Count(buildmode_selected) > 0 then for k, v in pairs(buildmode_selected) do if IsValid(k) then @@ -1410,11 +1347,12 @@ if CLIENT then axislock = 0 end end, - [MOUSE_WHEEL_DOWN] = function () + [MOUSE_WHEEL_DOWN] = function() if not usedown then local mult = input.IsKeyDown(KEY_LCONTROL) and 0.06666666666666667 or 1 BuildModeAngle:RotateAroundAxis(Vector(0, 0, 1), -15 * mult) + LocalPlayer():EmitSound("buttonrollover.wav") else BuildModeIndex = BuildModeIndex - 1 @@ -1430,14 +1368,16 @@ if CLIENT then end BuildModeCreateGhost() + GhostModel:SetModel(buildmode_props[BuildModeIndex] or buildmode_entmodels[BuildModeIndex]) end end, - [MOUSE_WHEEL_UP] = function () + [MOUSE_WHEEL_UP] = function() if not usedown then local mult = input.IsKeyDown(KEY_LCONTROL) and 0.06666666666666667 or 1 BuildModeAngle:RotateAroundAxis(Vector(0, 0, 1), 15 * mult) + LocalPlayer():EmitSound("buttonrollover.wav") else BuildModeIndex = BuildModeIndex + 1 @@ -1453,18 +1393,17 @@ if CLIENT then end BuildModeCreateGhost() + GhostModel:SetModel(buildmode_props[BuildModeIndex] or buildmode_entmodels[BuildModeIndex]) end end } function BuildModeInput(ply, bind, pressed, code) - if bind ~= "buildmode" and not camcontrol then - return true - end + if bind ~= "buildmode" and not camcontrol then return true end end - hook.Add("OnEntityCreated", "BuildModeProps", function (ent) + hook.Add("OnEntityCreated", "BuildModeProps", function(ent) if not ent:GetNW2Bool("BRProtected") and ent:GetClass() == "prop_physics" or buildmode_ents[ent:GetClass()] then table.insert(buildmode_placed, ent) end @@ -1501,22 +1440,23 @@ if CLIENT then surface.SetDrawColor(125, 125, 125, 125) surface.DrawOutlinedRect(x, y, w, h) surface.SetDrawColor(0, 200, 0, 255) + cam.Start3D() - for k, v in ipairs(buildmode_placed) do - if IsValid(v) and not v:GetNW2Bool("BRProtected") then - local pos = v:GetRenderOrigin() or v:GetPos() - local w2s = pos:ToScreen() - local xcheck = flipx and x < w2s.x and w2s.x < w + x or not flipx and x < w2s.x and w2s.x < mousex - local ycheck = flipy and y < w2s.y and w2s.y < h + y or not flipy and y < w2s.y and w2s.y < mousey + for k, v in ipairs(buildmode_placed) do + if IsValid(v) and not v:GetNW2Bool("BRProtected") then + local pos = v:GetRenderOrigin() or v:GetPos() + local w2s = pos:ToScreen() + local xcheck = flipx and x < w2s.x and w2s.x < w + x or not flipx and x < w2s.x and w2s.x < mousex + local ycheck = flipy and y < w2s.y and w2s.y < h + y or not flipy and y < w2s.y and w2s.y < mousey - if xcheck and ycheck then - buildmode_selected[v] = true - elseif not input.IsKeyDown(KEY_LSHIFT) then - buildmode_selected[v] = nil + if xcheck and ycheck then + buildmode_selected[v] = true + elseif not input.IsKeyDown(KEY_LSHIFT) then + buildmode_selected[v] = nil + end end end - end cam.End3D() @@ -1536,7 +1476,6 @@ if CLIENT then function BuildModeSelect() if dragging then local svec = util.AimVector(LocalPlayer():EyeAngles(), 133, mousex, mousey, ScrW(), ScrH()) - dragoffset:Set(svec) if not dragorigin then @@ -1560,7 +1499,6 @@ if CLIENT then local a = offset[axislist[axislock]] offset:Set(k.dragorigpos) - offset[axislist[axislock]] = a end @@ -1569,7 +1507,6 @@ if CLIENT then end local mins, maxs = k:GetRenderBounds() - render.DrawWireframeBox(k:GetRenderOrigin() or k:GetPos(), k:GetAngles(), mins, maxs, color_white, true) end end @@ -1622,11 +1559,10 @@ if CLIENT then function BuildModeCommand(ply, ucmd) LocalPlayer():SetFOV(120) - if gui.IsGameUIVisible() then - return - end + if gui.IsGameUIVisible() then return end camcontrol = input.IsMouseDown(MOUSE_RIGHT) + local newx, newy = input.GetCursorPos() mousemoved = mousex ~= newx or mousey ~= newy mousey = newy @@ -1637,13 +1573,8 @@ if CLIENT then usedown = input.IsKeyDown(KEY_E) mousedown = input.IsMouseDown(MOUSE_LEFT) - if AEUI.HoveredPanel then - return - end - - if keytime == CurTime() then - return - end + if AEUI.HoveredPanel then return end + if keytime == CurTime() then return end for k, v in pairs(buildmodeinputs) do if input.WasKeyPressed(k) then @@ -1660,7 +1591,7 @@ if CLIENT then keytime = CurTime() end - net.Receive("BuildMode", function () + net.Receive("BuildMode", function() BuildMode = net.ReadBool() if BuildMode then @@ -1670,8 +1601,10 @@ if CLIENT then hook.Add("PlayerBindPress", "BuildModeInput", BuildModeInput) hook.Add("StartCommand", "BuildModeCommand", BuildModeCommand) hook.Add("HUDPaint", "BuildModeHUDPaint", BuildModeHUDPaint) + LocalPlayer():DrawViewModel(false) LocalPlayer():SetFOV(120) + hook.Run("BuildModeState", true) else hook.Remove("PostDrawTranslucentRenderables", "BuildModeGhost") @@ -1680,14 +1613,18 @@ if CLIENT then hook.Remove("PlayerBindPress", "BuildModeInput") hook.Remove("StartCommand", "BuildModeCommand") hook.Remove("HUDPaint", "BuildModeHUDPaint") + SafeRemoveEntity(GhostModel) + LocalPlayer():DrawViewModel(true) + gui.EnableScreenClicker(false) - LocalPlayer():SetFOV(0) + + LocalPlayer():SetFOV(LocalPlayer():GetInfoNum("Beatrun_FOV")) CheckpointNumber = 1 hook.Run("BuildModeState", false) end end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/sh_freerunsysall.lua b/beatrun/gamemodes/beatrun/gamemode/sh/sh_freerunsysall.lua index b1a002a..f0cb4f4 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/sh_freerunsysall.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/sh_freerunsysall.lua @@ -1,11 +1,6 @@ -local quakejump = CreateConVar("Beatrun_QuakeJump", 1, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}) -local sidestep = CreateConVar("Beatrun_SideStep", 1, { - FCVAR_REPLICATED, - FCVAR_ARCHIVE -}) +local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}) + +local sidestep = CreateConVar("Beatrun_SideStep", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}) local function Hardland(jt) local ply = LocalPlayer() @@ -34,12 +29,12 @@ if game.SinglePlayer() and SERVER then end if game.SinglePlayer() and CLIENT then - net.Receive("Beatrun_HardLand", function () + net.Receive("Beatrun_HardLand", function() Hardland(net.ReadBool()) end) end -hook.Add("PlayerStepSoundTime", "MEStepTime", function (ply, step, walking) +hook.Add("PlayerStepSoundTime", "MEStepTime", function(ply, step, walking) local activewep = ply:GetActiveWeapon() local sprint = ply:GetMEMoveLimit() < 300 local stepmod = ply:GetStepRight() and 1 or -1 @@ -51,6 +46,7 @@ hook.Add("PlayerStepSoundTime", "MEStepTime", function (ply, step, walking) end stepvel = stepvel - math.abs(ply:GetMEMoveLimit() / 100 - 1) * 0.33 + local stepmod2 = 1 local stepmod3 = 1 @@ -65,11 +61,13 @@ hook.Add("PlayerStepSoundTime", "MEStepTime", function (ply, step, walking) if not ply:Crouching() and not ply:KeyDown(IN_WALK) then if game.SinglePlayer() then local intensity = ply:GetInfoNum("Beatrun_ViewbobIntensity", 20) / 20 + intensity = sprint and intensity * 0.5 or intensity * 0.25 ply:ViewPunch(Angle(0.45 * stepmod2 * stepvel2, 0, 0.5 * stepmod * stepvel * stepmod3) * intensity) elseif CLIENT and IsFirstTimePredicted() then local intensity = ply:GetInfoNum("Beatrun_ViewbobIntensity", 20) / 20 + intensity = sprint and intensity * 0.25 or intensity * 0.1 ply:CLViewPunch(Angle(0.45 * stepmod2 * stepvel2, 0, 0.5 * stepmod * stepvel * stepmod3) * intensity) @@ -90,25 +88,20 @@ hook.Add("PlayerStepSoundTime", "MEStepTime", function (ply, step, walking) return steptime end) -hook.Add("PlayerFootstep", "MEStepSound", function (ply, pos, foot, sound, volume, filter, skipcheck) + +hook.Add("PlayerFootstep", "MEStepSound", function(ply, pos, foot, sound, volume, filter, skipcheck) ply:SetStepRight(not ply:GetStepRight()) - if (ply:GetSliding() or CurTime() < ply:GetSafetyRollTime() - 0.5) and not skipcheck then - return true - end - - if ply:GetMEMoveLimit() < 155 and ply:KeyDown(IN_FORWARD) and not ply.FootstepLand and not IsValid(ply:GetBalanceEntity()) then - return true - end + if (ply:GetSliding() or CurTime() < ply:GetSafetyRollTime() - 0.5) and not skipcheck then return true end + if ply:GetMEMoveLimit() < 155 and ply:KeyDown(IN_FORWARD) and not ply.FootstepLand and not IsValid(ply:GetBalanceEntity()) then return true end local mat = sound:sub(0, -6) local newsound = FOOTSTEPS_LUT[mat] - if mat == "player/footsteps/ladder" then - return - end + if mat == "player/footsteps/ladder" then return end newsound = newsound or "Concrete" + ply.LastStepMat = newsound if game.SinglePlayer() then @@ -148,9 +141,11 @@ hook.Add("PlayerFootstep", "MEStepSound", function (ply, pos, foot, sound, volum return true end) -hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, speed) + +hook.Add("OnPlayerHitGround", "MELandSound", function(ply, water, floater, speed) local vel = ply:GetVelocity() vel.z = 0 + ply.FootstepLand = true ply.LastLandTime = CurTime() @@ -181,6 +176,7 @@ hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, spee local eyedir = ply:EyeAngles() eyedir.x = 0 eyedir = eyedir:Forward() + local vel = ply:GetVelocity() vel.z = 0 @@ -194,7 +190,7 @@ hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, spee Hardland(jt) elseif SERVER and game.SinglePlayer() then net.Start("Beatrun_HardLand") - net.WriteBool(jt) + net.WriteBool(jt) net.Send(ply) end end @@ -208,11 +204,13 @@ hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, spee info:SetDamageType(DMG_FALL) info:SetAttacker(game.GetWorld()) info:SetInflictor(game.GetWorld()) + ply:TakeDamageInfo(info) end end end) -hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) + +hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd) local activewep = ply:GetActiveWeapon() local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands" local ismoving = (mv:KeyDown(IN_FORWARD) or not ply:OnGround() or ply:Crouching()) and not mv:KeyDown(IN_BACK) and ply:Alive() and (mv:GetVelocity():Length() > 50 or ply:GetMantle() ~= 0 or ply:Crouching()) @@ -225,7 +223,6 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) end ply:EmitSound("Release." .. newsound) - ply.FootstepReleaseLand = false end @@ -246,15 +243,18 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) if ply:KeyDown(IN_WALK) then mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.0065) mv:SetSideSpeed(mv:GetSideSpeed() * 0.0065) + ply:SetMEMoveLimit(150) ply:SetMESprintDelay(0) ply:SetMEAng(0) + mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP))) end local ang = mv:GetAngles() ang[1] = 0 ang[3] = 0 + local MEAng = math.Truncate(ang:Forward().x, 2) local MEAngDiff = math.abs((MEAng - ply:GetMEAng()) * 100) local weaponspeed = 150 @@ -282,7 +282,6 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) if MEAngDiff > 1.25 and ply:GetWallrun() == 0 then local slow = MEAngDiff * 0.75 - ply:SetMEMoveLimit(math.max(ply:GetMEMoveLimit() - slow, 160)) end @@ -304,14 +303,18 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) end mv:SetMaxClientSpeed(ply:GetMEMoveLimit()) + ply:SetMEAng(MEAng) if sidestep:GetBool() and usingrh and activewep.GetSideStep and not activewep:GetSideStep() and CurTime() > ply:GetSlidingDelay() - 0.2 and ply:GetClimbing() == 0 and ply:OnGround() and not ply:Crouching() and not cmd:KeyDown(IN_FORWARD) and not cmd:KeyDown(IN_JUMP) and cmd:KeyDown(IN_ATTACK2) then if mv:KeyDown(IN_MOVELEFT) then activewep:SendWeaponAnim(ACT_TURNLEFT45) activewep:SetSideStep(true) + mv:SetVelocity(cmd:GetViewAngles():Right() * -600) + ply:ViewPunch(Angle(-3, 0, -4.5)) + ParkourEvent("sidestepleft", ply) activewep.SideStepDir = ang:Forward() @@ -322,8 +325,11 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) elseif mv:KeyDown(IN_MOVERIGHT) then activewep:SendWeaponAnim(ACT_TURNRIGHT45) activewep:SetSideStep(true) + mv:SetVelocity(cmd:GetViewAngles():Right() * 600) + ply:ViewPunch(Angle(-3, 0, 4.5)) + ParkourEvent("sidestepright", ply) activewep.SideStepDir = ang:Forward() @@ -350,24 +356,20 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd) if mv:KeyPressed(IN_JUMP) and not quakejump:GetBool() and activewep:GetWasOnGround() and not ply:GetJumpTurn() and ply:GetViewModel():GetCycle() < 0.25 then local vel = mv:GetVelocity() - vel:Mul(0.75) - vel.z = -300 mv:SetVelocity(vel) + activewep:SetWasOnGround(false) end end end) if CLIENT then - local jumpseq = { - ACT_VM_HAULBACK, - ACT_VM_SWINGHARD - } + -- local jumpseq = {ACT_VM_HAULBACK, ACT_VM_SWINGHARD} - hook.Add("CreateMove", "MECreateMove", function (cmd) + hook.Add("CreateMove", "MECreateMove", function(cmd) local ply = LocalPlayer() local usingrh = ply:UsingRH() local hardland = CurTime() < (ply.hardlandtime or 0) @@ -382,7 +384,8 @@ if CLIENT then cmd:SetButtons(cmd:GetButtons() + IN_SPEED) end end) - hook.Add("GetMotionBlurValues", "MEBlur", function (h, v, f, r) + + hook.Add("GetMotionBlurValues", "MEBlur", function(h, v, f, r) local ply = LocalPlayer() local vel = LocalPlayer():GetVelocity() @@ -407,9 +410,10 @@ end MMY = 0 MMX = 0 -hook.Add("InputMouseApply", "MouseMovement", function (cmd, x, y) +hook.Add("InputMouseApply", "MouseMovement", function(cmd, x, y) MMY = y MMX = x + local ply = LocalPlayer() local activewep = ply:GetActiveWeapon() local usingrh = ply:UsingRH(activewep) @@ -420,8 +424,8 @@ hook.Add("InputMouseApply", "MouseMovement", function (cmd, x, y) end) if CLIENT then - net.Receive("DoorBashAnim", function () + net.Receive("DoorBashAnim", function() ArmInterrupt("doorbash") LocalPlayer():CLViewPunch(Angle(1.5, -0.75, 0)) end) -end +end \ No newline at end of file diff --git a/beatrun/gamemodes/beatrun/gamemode/sv/blind.lua b/beatrun/gamemodes/beatrun/gamemode/sv/blind.lua index 3ba2c65..eff5241 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sv/blind.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sv/blind.lua @@ -72,7 +72,7 @@ concommand.Add("blindplayer", function(ply, cmd, args) end net.Start("BlindPlayers") - net.WriteBool(blinded) + net.WriteBool(blinded) net.Send(mply) end) diff --git a/lua/bin/gmcl_gdiscord_win32.dll b/lua/bin/gmcl_gdiscord_win32.dll new file mode 100644 index 0000000000000000000000000000000000000000..8a96383270ef99059d070983fff56eeb13fd436e GIT binary patch literal 43520 zcmeFadt6l2`aix01{h^vMnywYBg3-PLI)H?6U0F@!9iqjQa}=DL`8%dFC~f%7@O^M zImd1%E6qA}x*aPmG*5yU7c)gI#k8WbS~#4-%Mny^e(z`PJ%Hvp=kxn~|M>p%9bS9y zb$g!mtYN!UuFw=C?}-Qo*%L(KV<5xl#r#%vUBbY2t^m>jF<)v*2~RzbbIBP=JuX5_bgQ#l?8( z@s!{p7rDIz!Iyixzk&&zBxd60EyRFBNJweBzOpy$6@jDQg70aH4pR%wNd1Rjj9S=( zOjbQ32!sC+338qlgkXd}kNB9L@g;(=;AZ%gH22zaR@vYdm*GY972r|mhKv6~fa2c5 z>?~WBARHZmpb|Xy;32>szZhhFubfQSUI2b=Mb#Gx&;X=51Sy5)5 zZVLi>{9*`SVa}3eNJwQDzym>p@2fo$QLrFPxjy9o`TqZMAkWLHd0)`8QIK!z@^x^z zG6cb~Ut7cc5VUQUDVNUHt{2~?D{n37g0N%I8jg0q5v&qavbu1G@oY=9ut z96XpRwMs^f*(4PtNQa~W?myLoLNg;tvt*>#AUZkOEZH^Ep|m_9PbK-fP4lGz(xE&r zslz>c!8hq0=XIkJJCf7b1498~$uv}DG!PiDZfo8y=q01JLU{EIT(v$I@K$l86wA6| zTY2pHp0R*wwKrL^Yu)b2kwt3=Q&0WA!gc=Z<6mGIp17ez7MYe-wV2* ztCEwY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