mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-28 12:53:02 +05:00
Shared cleanup and Discord Presence
This commit is contained in:
parent
7e58a2936e
commit
744cb37c1a
45 changed files with 1288 additions and 2120 deletions
10
FIXES.md
10
FIXES.md
|
@ -1,8 +1,12 @@
|
||||||
# Сделанные мной фиксы
|
# Сделанные мной фиксы и добавления
|
||||||
|
* Разрешение Overdrive на сервере - Beatrun_AllowOvedriveInMultiplayer.
|
||||||
|
* Небольшой толчёк камеры при нырянии.
|
||||||
|
* Discord Rich Presence
|
||||||
|
|
||||||
* Фикс трёх букв из-за которых нихуя не работало.
|
* Фикс трёх букв из-за которых нихуя не работало.
|
||||||
* Быстрый поворот на земле (ПКМ пока бежишь/стоишь) включён по умолчанию (Beatrun_QuickturnGround).
|
* Быстрый поворот на земле (ПКМ пока бежишь/стоишь) включён по умолчанию (Beatrun_QuickturnGround).
|
||||||
* Быстрый поворот только с руками бегуна (Фикс поворотов при прицеливании и т.п.).
|
* Быстрый поворот только с руками бегуна (Фикс поворотов при прицеливании и т.п.).
|
||||||
* Убрал ваш SteamID в углу потому что могу.
|
|
||||||
* Фикс ошибки запуска курса.
|
* Фикс ошибки запуска курса.
|
||||||
* Фикс использования хука (пробел по стене когда вы в воздухе) и это починило сохранение времени.
|
* Фикс использования хука (пробел по стене когда вы в воздухе) и это починило сохранение времени.
|
||||||
* Фикс сортировки таблицы лидеров.
|
* Фикс сортировки таблицы лидеров.
|
||||||
|
* Убрал ваш SteamID в углу потому что могу.
|
|
@ -349,10 +349,13 @@ end
|
||||||
|
|
||||||
local tr = {}
|
local tr = {}
|
||||||
local tr_result = {}
|
local tr_result = {}
|
||||||
|
|
||||||
|
local allow_overdrive = CreateClientConVar("Beatrun_AllowOvedriveInMultiplayer", "0", false, false, "Allow ovedrive on servers")
|
||||||
|
|
||||||
function SWEP:PrimaryAttack()
|
function SWEP:PrimaryAttack()
|
||||||
local ply = self.Owner
|
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 mult = (ply:InOverdrive() and 1) or 1.25
|
||||||
local fovmult = (mult == 1 and 1) or 1.1
|
local fovmult = (mult == 1 and 1) or 1.1
|
||||||
ply:SetMEMoveLimit(ply:GetMEMoveLimit()*0.75)
|
ply:SetMEMoveLimit(ply:GetMEMoveLimit()*0.75)
|
||||||
|
|
65
beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua
Normal file
65
beatrun/gamemodes/beatrun/gamemode/cl/DiscordPresence.lua
Normal file
|
@ -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)
|
|
@ -1,9 +1,7 @@
|
||||||
local dircache = nil
|
local dircache = nil
|
||||||
|
|
||||||
hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume, filter, skipcheck)
|
hook.Add("PlayerFootstepME", "Balance", function(ply, pos, foot, sound, volume, filter, skipcheck)
|
||||||
if IsValid(ply:GetBalanceEntity()) then
|
if IsValid(ply:GetBalanceEntity()) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ply.BalanceTrace then
|
if not ply.BalanceTrace then
|
||||||
ply.BalanceTrace = {}
|
ply.BalanceTrace = {}
|
||||||
|
@ -16,6 +14,7 @@ hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume,
|
||||||
|
|
||||||
local tr = ply.BalanceTrace
|
local tr = ply.BalanceTrace
|
||||||
local trout = ply.BalanceTraceOut
|
local trout = ply.BalanceTraceOut
|
||||||
|
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
tr.start = pos
|
tr.start = pos
|
||||||
tr.endpos = pos - Vector(0, 0, 25)
|
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
|
if trout.Entity.Balance then
|
||||||
ply:SetBalance(0.1)
|
ply:SetBalance(0.1)
|
||||||
ply:SetBalanceEntity(trout.Entity)
|
ply:SetBalanceEntity(trout.Entity)
|
||||||
timer.Simple(0, function ()
|
|
||||||
|
timer.Simple(0, function()
|
||||||
ParkourEvent("walkbalancefwd", ply)
|
ParkourEvent("walkbalancefwd", ply)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -37,18 +37,21 @@ hook.Add("PlayerFootstepME", "Balance", function (ply, pos, foot, sound, volume,
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
hook.Add("SetupMove", "Balance", function (ply, mv, cmd)
|
|
||||||
|
hook.Add("SetupMove", "Balance", function(ply, mv, cmd)
|
||||||
if IsValid(ply:GetBalanceEntity()) then
|
if IsValid(ply:GetBalanceEntity()) then
|
||||||
local balance = ply:GetBalanceEntity()
|
local balance = ply:GetBalanceEntity()
|
||||||
|
|
||||||
mv:SetForwardSpeed(math.max(mv:GetForwardSpeed() * 0.01, 0))
|
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())
|
local distend = balance:GetPos():Distance(balance:GetPos() + balance:GetAngles():Up() * balance:GetBalanceLength())
|
||||||
|
|
||||||
nearest.z = mv:GetOrigin().z
|
nearest.z = mv:GetOrigin().z
|
||||||
|
|
||||||
mv:SetOrigin(nearest)
|
mv:SetOrigin(nearest)
|
||||||
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP)))
|
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP)))
|
||||||
|
|
||||||
cmd:RemoveKey(IN_JUMP)
|
cmd:RemoveKey(IN_JUMP)
|
||||||
|
|
||||||
local tr = ply.BalanceTrace
|
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
|
if ang:Forward():Dot(bang:Up()) > 0.5 then
|
||||||
local fallpos = mv:GetOrigin() + ply:GetBalanceEntity():GetAngles():Right() * 0.75 * ply:GetBalance()
|
local fallpos = mv:GetOrigin() + ply:GetBalanceEntity():GetAngles():Right() * 0.75 * ply:GetBalance()
|
||||||
|
|
||||||
tr.start = fallpos
|
tr.start = fallpos
|
||||||
tr.endpos = fallpos
|
tr.endpos = fallpos
|
||||||
|
|
||||||
|
@ -123,6 +127,7 @@ hook.Add("SetupMove", "Balance", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local fallpos = mv:GetOrigin() + ply:GetBalanceEntity():GetAngles():Right() * -0.75 * ply:GetBalance()
|
local fallpos = mv:GetOrigin() + ply:GetBalanceEntity():GetAngles():Right() * -0.75 * ply:GetBalance()
|
||||||
|
|
||||||
tr.start = fallpos
|
tr.start = fallpos
|
||||||
tr.endpos = fallpos
|
tr.endpos = fallpos
|
||||||
|
|
||||||
|
@ -147,7 +152,7 @@ end)
|
||||||
local angy = 0
|
local angy = 0
|
||||||
local attack2 = false
|
local attack2 = false
|
||||||
|
|
||||||
hook.Add("CreateMove", "Balance", function (cmd)
|
hook.Add("CreateMove", "Balance", function(cmd)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if IsValid(ply:GetBalanceEntity()) and IsValid(BodyAnim) then
|
if IsValid(ply:GetBalanceEntity()) and IsValid(BodyAnim) then
|
||||||
|
@ -179,6 +184,7 @@ hook.Add("CreateMove", "Balance", function (cmd)
|
||||||
ang.y = angy
|
ang.y = angy
|
||||||
|
|
||||||
cmd:SetViewAngles(ang)
|
cmd:SetViewAngles(ang)
|
||||||
|
|
||||||
BodyAnim:SetPoseParameter("lean_roll", math.Clamp(ply:GetBalance(), -60, 60))
|
BodyAnim:SetPoseParameter("lean_roll", math.Clamp(ply:GetBalance(), -60, 60))
|
||||||
|
|
||||||
if IsValid(BodyAnimArmCopy) then
|
if IsValid(BodyAnimArmCopy) then
|
||||||
|
@ -220,4 +226,4 @@ hook.Add("CreateMove", "Balance", function (cmd)
|
||||||
lockang2 = false
|
lockang2 = false
|
||||||
dircache = nil
|
dircache = nil
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -50,7 +50,7 @@ function LoadCheckpoints()
|
||||||
end
|
end
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
timer.Simple(1, function ()
|
timer.Simple(1, function()
|
||||||
for k, v in pairs(ents.FindByClass("tt_cp")) do
|
for k, v in pairs(ents.FindByClass("tt_cp")) do
|
||||||
if IsValid(v) and v.GetCPNum then
|
if IsValid(v) and v.GetCPNum then
|
||||||
Checkpoints[v:GetCPNum()] = v
|
Checkpoints[v:GetCPNum()] = v
|
||||||
|
@ -65,9 +65,9 @@ function LoadCheckpoints()
|
||||||
end
|
end
|
||||||
|
|
||||||
if CLIENT then
|
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 timetaken = CurTime() - lastcptime
|
||||||
local vspb = nil
|
local vspb = nil
|
||||||
|
|
||||||
|
@ -107,7 +107,8 @@ if CLIENT then
|
||||||
|
|
||||||
print(timetaken, vspb)
|
print(timetaken, vspb)
|
||||||
end)
|
end)
|
||||||
net.Receive("Checkpoint_Finish", function ()
|
|
||||||
|
net.Receive("Checkpoint_Finish", function()
|
||||||
table.insert(cptimes, CurTime() - lastcptime)
|
table.insert(cptimes, CurTime() - lastcptime)
|
||||||
|
|
||||||
local totaltime = CurTime() - Course_StartTime
|
local totaltime = CurTime() - Course_StartTime
|
||||||
|
@ -145,7 +146,7 @@ if CLIENT then
|
||||||
end
|
end
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
net.Receive("Checkpoint_Finish", function (len, ply)
|
net.Receive("Checkpoint_Finish", function(len, ply)
|
||||||
local pb = net.ReadFloat() or 0
|
local pb = net.ReadFloat() or 0
|
||||||
local svtime = CurTime() - ply.Course_StartTime
|
local svtime = CurTime() - ply.Course_StartTime
|
||||||
|
|
||||||
|
@ -165,10 +166,13 @@ function FinishCourse(ply)
|
||||||
ply:ScreenFade(SCREENFADE.IN, finishcolor, 0, 4)
|
ply:ScreenFade(SCREENFADE.IN, finishcolor, 0, 4)
|
||||||
ply:SetLaggedMovementValue(0.1)
|
ply:SetLaggedMovementValue(0.1)
|
||||||
ply:DrawViewModel(false)
|
ply:DrawViewModel(false)
|
||||||
|
|
||||||
net.Start("Checkpoint_Finish")
|
net.Start("Checkpoint_Finish")
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply:SetNW2Int("CPNum", -1)
|
ply:SetNW2Int("CPNum", -1)
|
||||||
timer.Simple(4, function ()
|
|
||||||
|
timer.Simple(4, function()
|
||||||
ply:SetLaggedMovementValue(1)
|
ply:SetLaggedMovementValue(1)
|
||||||
ply:DrawViewModel(true)
|
ply:DrawViewModel(true)
|
||||||
end)
|
end)
|
||||||
|
@ -176,11 +180,8 @@ end
|
||||||
|
|
||||||
local countdown = 0
|
local countdown = 0
|
||||||
local countdownalpha = 255
|
local countdownalpha = 255
|
||||||
local countdowntext = {
|
|
||||||
"Ready",
|
local countdowntext = {"Ready", "Set", "Go!!"}
|
||||||
"Set",
|
|
||||||
"Go!!"
|
|
||||||
}
|
|
||||||
|
|
||||||
local function StartCountdown()
|
local function StartCountdown()
|
||||||
local CT = CurTime()
|
local CT = CurTime()
|
||||||
|
@ -206,7 +207,7 @@ local function StartCountdownHUD()
|
||||||
surface.SetFont("DermaLarge")
|
surface.SetFont("DermaLarge")
|
||||||
surface.SetTextColor(255, 255, 255, countdownalpha)
|
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.SetTextPos(ScrW() * 0.5 - w * 0.5, ScrH() * 0.3)
|
||||||
surface.DrawText(text)
|
surface.DrawText(text)
|
||||||
|
@ -234,8 +235,7 @@ function CourseHUD()
|
||||||
|
|
||||||
if incourse then
|
if incourse then
|
||||||
local text = string.FormattedTime(totaltime, "%02i:%02i:%02i")
|
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.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.075 + vpz)
|
||||||
surface.DrawText(text)
|
surface.DrawText(text)
|
||||||
end
|
end
|
||||||
|
@ -248,8 +248,7 @@ function CourseHUD()
|
||||||
end
|
end
|
||||||
|
|
||||||
text = speed .. " km/h"
|
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.SetTextPos(ScrW() * 0.85 - w * 0.5 + vpx, ScrH() * 0.85 + vpz)
|
||||||
surface.DrawText(text)
|
surface.DrawText(text)
|
||||||
end
|
end
|
||||||
|
@ -264,7 +263,8 @@ function CourseHUD()
|
||||||
end
|
end
|
||||||
|
|
||||||
if timealpha > 0 then
|
if timealpha > 0 then
|
||||||
local w, h = surface.GetTextSize(timetext)
|
local w, _ = surface.GetTextSize(timetext)
|
||||||
|
|
||||||
timealpha = math.max(0, timealpha - FrameTime() * 250)
|
timealpha = math.max(0, timealpha - FrameTime() * 250)
|
||||||
timecolor.a = math.min(255, timealpha)
|
timecolor.a = math.min(255, timealpha)
|
||||||
|
|
||||||
|
@ -303,9 +303,7 @@ function SaveReplayData()
|
||||||
local replay = util.TableToJSON(LocalPlayer().ReplayTicks)
|
local replay = util.TableToJSON(LocalPlayer().ReplayTicks)
|
||||||
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||||
|
|
||||||
if not replay then
|
if not replay then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
file.CreateDir(dir)
|
file.CreateDir(dir)
|
||||||
file.Write(dir .. Course_ID .. ".txt", util.Compress(replay))
|
file.Write(dir .. Course_ID .. ".txt", util.Compress(replay))
|
||||||
|
@ -351,7 +349,7 @@ function StartCourse(spawntime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Receive("BeatrunSpawn", function ()
|
net.Receive("BeatrunSpawn", function()
|
||||||
local spawntime = net.ReadFloat()
|
local spawntime = net.ReadFloat()
|
||||||
local replay = net.ReadBool()
|
local replay = net.ReadBool()
|
||||||
|
|
||||||
|
@ -362,4 +360,4 @@ net.Receive("BeatrunSpawn", function ()
|
||||||
if LocalPlayer().GetInfoNum then
|
if LocalPlayer().GetInfoNum then
|
||||||
StartCourse(spawntime)
|
StartCourse(spawntime)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -1,17 +1,14 @@
|
||||||
local ClimbingTimes = {
|
local ClimbingTimes = {5, 1.25, 1, 1, nil, 2}
|
||||||
5,
|
|
||||||
1.25,
|
--[[
|
||||||
1,
|
|
||||||
1,
|
|
||||||
nil,
|
|
||||||
2
|
|
||||||
}
|
|
||||||
local CLIMB_HANG = 1
|
local CLIMB_HANG = 1
|
||||||
local CLIMB_HEAVEUP = 2
|
local CLIMB_HEAVEUP = 2
|
||||||
local CLIMB_STRAFELEFT = 3
|
local CLIMB_STRAFELEFT = 3
|
||||||
local CLIMB_STRAFERIGHT = 4
|
local CLIMB_STRAFERIGHT = 4
|
||||||
local CLIMB_FOLDEDSTART = 5
|
local CLIMB_FOLDEDSTART = 5
|
||||||
local CLIMB_FOLDEDHEAVEUP = 6
|
local CLIMB_FOLDEDHEAVEUP = 6
|
||||||
|
|
||||||
|
|
||||||
local climb1 = {
|
local climb1 = {
|
||||||
followplayer = false,
|
followplayer = false,
|
||||||
animmodelstring = "climbanim",
|
animmodelstring = "climbanim",
|
||||||
|
@ -21,15 +18,14 @@ local climb1 = {
|
||||||
smoothend = true,
|
smoothend = true,
|
||||||
AnimString = "climb1"
|
AnimString = "climb1"
|
||||||
}
|
}
|
||||||
local climbstrings = {
|
|
||||||
"climb1",
|
local climbstrings = {"climb1", "climb2"}
|
||||||
"climb2"
|
]]
|
||||||
}
|
|
||||||
|
|
||||||
if game.SinglePlayer() and SERVER then
|
if game.SinglePlayer() and SERVER then
|
||||||
util.AddNetworkString("Climb_SPFix")
|
util.AddNetworkString("Climb_SPFix")
|
||||||
elseif game.SinglePlayer() and CLIENT then
|
elseif game.SinglePlayer() and CLIENT then
|
||||||
net.Receive("Climb_SPFix", function ()
|
net.Receive("Climb_SPFix", function()
|
||||||
local lock = net.ReadBool()
|
local lock = net.ReadBool()
|
||||||
local neweyeang = net.ReadBool()
|
local neweyeang = net.ReadBool()
|
||||||
local ang = net.ReadAngle()
|
local ang = net.ReadAngle()
|
||||||
|
@ -54,11 +50,13 @@ local function ClimbingEnd(ply, mv, cmd)
|
||||||
local tr = {
|
local tr = {
|
||||||
filter = ply
|
filter = ply
|
||||||
}
|
}
|
||||||
|
|
||||||
tr.mins, tr.maxs = ply:GetHull()
|
tr.mins, tr.maxs = ply:GetHull()
|
||||||
tr.start = mv:GetOrigin()
|
tr.start = mv:GetOrigin()
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.mask = MASK_PLAYERSOLID
|
tr.mask = MASK_PLAYERSOLID
|
||||||
tr.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
tr.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
||||||
|
|
||||||
local trout = util.TraceHull(tr)
|
local trout = util.TraceHull(tr)
|
||||||
|
|
||||||
if trout.Hit then
|
if trout.Hit then
|
||||||
|
@ -90,10 +88,10 @@ local function ClimbingEnd(ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("Climb_SPFix")
|
net.Start("Climb_SPFix")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteAngle(angle_zero)
|
net.WriteAngle(angle_zero)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -102,10 +100,12 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
if ply:GetClimbing() == 5 then
|
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
|
if mv:KeyPressed(IN_FORWARD) and ply:GetClimbingDelay() < CurTime() + 0.65 or mv:KeyDown(IN_FORWARD) and ply:GetClimbingDelay() < CurTime() then
|
||||||
ParkourEvent("hangfoldedheaveup", ply)
|
ParkourEvent("hangfoldedheaveup", ply)
|
||||||
|
|
||||||
ply:SetClimbing(6)
|
ply:SetClimbing(6)
|
||||||
ply:SetClimbingTime(0)
|
ply:SetClimbingTime(0)
|
||||||
elseif ply:GetClimbingDelay() < CurTime() then
|
elseif ply:GetClimbingDelay() < CurTime() then
|
||||||
ParkourEvent("hangfoldedendhang", ply)
|
ParkourEvent("hangfoldedendhang", ply)
|
||||||
|
|
||||||
ply:SetClimbing(1)
|
ply:SetClimbing(1)
|
||||||
ply:SetClimbingDelay(CurTime() + 1.35)
|
ply:SetClimbingDelay(CurTime() + 1.35)
|
||||||
end
|
end
|
||||||
|
@ -124,6 +124,7 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
mv:SetSideSpeed(0)
|
mv:SetSideSpeed(0)
|
||||||
mv:SetUpSpeed(0)
|
mv:SetUpSpeed(0)
|
||||||
|
|
||||||
ClimbingEnd(ply, mv, cmd)
|
ClimbingEnd(ply, mv, cmd)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -138,20 +139,24 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("Climb_SPFix")
|
net.Start("Climb_SPFix")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteAngle(angle_zero)
|
net.WriteAngle(angle_zero)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if mv:KeyDown(IN_DUCK) then
|
if mv:KeyDown(IN_DUCK) then
|
||||||
mv:SetOrigin(ply:GetClimbingStart() - ply:GetClimbingAngle():Forward() * 5)
|
mv:SetOrigin(ply:GetClimbingStart() - ply:GetClimbingAngle():Forward() * 5)
|
||||||
|
|
||||||
ply:SetMoveType(MOVETYPE_WALK)
|
ply:SetMoveType(MOVETYPE_WALK)
|
||||||
|
|
||||||
mv:SetButtons(0)
|
mv:SetButtons(0)
|
||||||
|
|
||||||
ply:SetClimbing(0)
|
ply:SetClimbing(0)
|
||||||
ply:SetCrouchJumpBlocked(true)
|
ply:SetCrouchJumpBlocked(true)
|
||||||
|
|
||||||
ParkourEvent("hangend", ply)
|
ParkourEvent("hangend", ply)
|
||||||
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
|
@ -182,10 +187,10 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
lockang = false
|
lockang = false
|
||||||
BodyLimitX = 90
|
BodyLimitX = 90
|
||||||
BodyLimitY = 180
|
BodyLimitY = 180
|
||||||
|
|
||||||
local ang = ply:EyeAngles()
|
local ang = ply:EyeAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
ang.z = 0
|
ang.z = 0
|
||||||
|
|
||||||
BodyAnim:SetAngles(ang)
|
BodyAnim:SetAngles(ang)
|
||||||
elseif game.SinglePlayer() then
|
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)")
|
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()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = math.min(ang.x, 0)
|
ang.x = math.min(ang.x, 0)
|
||||||
ang = ang:Forward()
|
ang = ang:Forward()
|
||||||
|
|
||||||
ang:Mul(350)
|
ang:Mul(350)
|
||||||
|
|
||||||
ang.z = 250
|
ang.z = 250
|
||||||
|
|
||||||
mv:SetVelocity(ang)
|
mv:SetVelocity(ang)
|
||||||
|
@ -209,6 +212,7 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
local trout = ply.ClimbingTraceSafetyOut
|
local trout = ply.ClimbingTraceSafetyOut
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
mins.z = maxs.z * 0.25
|
mins.z = maxs.z * 0.25
|
||||||
|
|
||||||
tr.start = ply:GetClimbingEnd()
|
tr.start = ply:GetClimbingEnd()
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.maxs = maxs
|
tr.maxs = maxs
|
||||||
|
@ -241,33 +245,36 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
|
|
||||||
local tr = ply.ClimbingTraceEnd
|
local tr = ply.ClimbingTraceEnd
|
||||||
local trout = ply.ClimbingTraceEndOut
|
local trout = ply.ClimbingTraceEndOut
|
||||||
local oldstart = tr.start
|
-- local oldstart = tr.start
|
||||||
local oldend = tr.endpos
|
-- local oldend = tr.endpos
|
||||||
local start = mv:GetOrigin() + wallang:Forward() * 20 + Vector(0, 0, 100) + dir
|
local start = mv:GetOrigin() + wallang:Forward() * 20 + Vector(0, 0, 100) + dir
|
||||||
|
|
||||||
tr.start = start
|
tr.start = start
|
||||||
tr.endpos = start - Vector(0, 0, 80)
|
tr.endpos = start - Vector(0, 0, 80)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then
|
if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local fail = trout.Fraction < 0.25 or trout.Fraction > 0.5
|
local fail = trout.Fraction < 0.25 or trout.Fraction > 0.5
|
||||||
|
|
||||||
if not fail then
|
if not fail then
|
||||||
local ostart = tr.start
|
local ostart = tr.start
|
||||||
local oendpos = tr.endpos
|
local oendpos = tr.endpos
|
||||||
|
|
||||||
tr.start = ply:GetClimbingEnd() + dir
|
tr.start = ply:GetClimbingEnd() + dir
|
||||||
tr.endpos = tr.start - Vector(0, 0, 100)
|
tr.endpos = tr.start - Vector(0, 0, 100)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
dir.z = trout.HitPos.z - mv:GetOrigin().z - 77
|
dir.z = trout.HitPos.z - mv:GetOrigin().z - 77
|
||||||
|
|
||||||
tr.endpos = oendpos
|
tr.endpos = oendpos
|
||||||
tr.start = ostart
|
tr.start = ostart
|
||||||
tr = ply.ClimbingTraceSafety
|
tr = ply.ClimbingTraceSafety
|
||||||
|
|
||||||
trout = ply.ClimbingTraceSafetyOut
|
trout = ply.ClimbingTraceSafetyOut
|
||||||
|
|
||||||
tr.start = mv:GetOrigin() + dir - wallang:Forward() * 0.533
|
tr.start = mv:GetOrigin() + dir - wallang:Forward() * 0.533
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
|
|
||||||
|
@ -307,9 +314,7 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then
|
if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local fail = trout.Fraction < 0.25 or trout.Fraction == 1
|
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())
|
local poslerp = LerpVector(lerp, ply:GetClimbingStart(), ply:GetClimbingEnd())
|
||||||
|
|
||||||
ply:SetClimbingEndOld(trout.HitPos)
|
ply:SetClimbingEndOld(trout.HitPos)
|
||||||
|
|
||||||
mv:SetOrigin(poslerp)
|
mv:SetOrigin(poslerp)
|
||||||
|
|
||||||
ply:SetClimbingTime(ply:GetClimbingTime() + FrameTime() * lerprate)
|
ply:SetClimbingTime(ply:GetClimbingTime() + FrameTime() * lerprate)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -334,10 +341,10 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
if ply:GetClimbing() == 2 or ply:GetClimbing() == 6 then
|
if ply:GetClimbing() == 2 or ply:GetClimbing() == 6 then
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("Climb_SPFix")
|
net.Start("Climb_SPFix")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteAngle(angle_zero)
|
net.WriteAngle(angle_zero)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -351,6 +358,7 @@ local function ClimbingThink(ply, mv, cmd)
|
||||||
local poslerp = LerpVector(lerp, ply:GetClimbingStart(), ply:GetClimbingEnd())
|
local poslerp = LerpVector(lerp, ply:GetClimbingStart(), ply:GetClimbingEnd())
|
||||||
|
|
||||||
mv:SetOrigin(poslerp)
|
mv:SetOrigin(poslerp)
|
||||||
|
|
||||||
ply:SetClimbingTime(lerp + FrameTime() * lerprate)
|
ply:SetClimbingTime(lerp + FrameTime() * lerprate)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -385,10 +393,14 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
local eyeang = ply:EyeAngles()
|
local eyeang = ply:EyeAngles()
|
||||||
local oldpos = mv:GetOrigin()
|
local oldpos = mv:GetOrigin()
|
||||||
|
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
local tr = ply.ClimbingTrace
|
local tr = ply.ClimbingTrace
|
||||||
local trout = ply.ClimbingTraceOut
|
local trout = ply.ClimbingTraceOut
|
||||||
|
|
||||||
mins.z = 45
|
mins.z = 45
|
||||||
|
|
||||||
tr.start = mv:GetOrigin()
|
tr.start = mv:GetOrigin()
|
||||||
|
|
||||||
if ply:GetDive() then
|
if ply:GetDive() then
|
||||||
|
@ -405,24 +417,14 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
mins.z = 0
|
mins.z = 0
|
||||||
|
|
||||||
if not trout.Hit then
|
if not trout.Hit then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local wallang = trout.HitNormal:Angle()
|
local wallang = trout.HitNormal:Angle()
|
||||||
wallang.y = wallang.y - 180
|
wallang.y = wallang.y - 180
|
||||||
|
|
||||||
if wallang.x ~= 0 then
|
if wallang.x ~= 0 then return end
|
||||||
return
|
if math.abs(math.AngleDifference(wallang.y, eyeang.y)) > 50 then return end
|
||||||
end
|
if IsValid(trout.Entity) and trout.Entity.NoClimbing 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)
|
ply:SetClimbingAngle(wallang)
|
||||||
|
|
||||||
|
@ -430,6 +432,7 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
local trout = ply.ClimbingTraceEndOut
|
local trout = ply.ClimbingTraceEndOut
|
||||||
local upvalue = ply:GetWallrun() == 1 and Vector(0, 0, 90) or Vector(0, 0, 65)
|
local upvalue = ply:GetWallrun() == 1 and Vector(0, 0, 90) or Vector(0, 0, 65)
|
||||||
local plymins, plymaxs = ply:GetHull()
|
local plymins, plymaxs = ply:GetHull()
|
||||||
|
|
||||||
tr.start = mv:GetOrigin() + wallang:Forward() * 45 + upvalue
|
tr.start = mv:GetOrigin() + wallang:Forward() * 45 + upvalue
|
||||||
tr.endpos = tr.start - Vector(0, 0, 90)
|
tr.endpos = tr.start - Vector(0, 0, 90)
|
||||||
tr.maxs = plymaxs
|
tr.maxs = plymaxs
|
||||||
|
@ -439,11 +442,9 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then
|
if trout.Entity and trout.Entity.IsNPC and (trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local fraction = trout.Fraction
|
-- local fraction = trout.Fraction
|
||||||
local detectionlen = 60
|
local detectionlen = 60
|
||||||
|
|
||||||
if trout.Fraction <= 0 or trout.Fraction >= 0.5 then
|
if trout.Fraction <= 0 or trout.Fraction >= 0.5 then
|
||||||
|
@ -452,18 +453,15 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Fraction <= 0 or trout.Fraction >= 0.5 then
|
if trout.Fraction <= 0 or trout.Fraction >= 0.5 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
detectionlen = 25
|
detectionlen = 25
|
||||||
end
|
end
|
||||||
|
|
||||||
local endpos = trout.HitPos
|
local endpos = trout.HitPos
|
||||||
local height = trout.Fraction
|
-- local height = trout.Fraction
|
||||||
local startpos = ply.ClimbingTraceOut.HitPos
|
local startpos = ply.ClimbingTraceOut.HitPos
|
||||||
startpos.z = trout.HitPos.z - 77
|
startpos.z = trout.HitPos.z - 77
|
||||||
|
|
||||||
startpos:Add(wallang:Forward() * 0.533)
|
startpos:Add(wallang:Forward() * 0.533)
|
||||||
|
|
||||||
if ply:GetDive() then
|
if ply:GetDive() then
|
||||||
|
@ -495,48 +493,43 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
local tr = ply.ClimbingTraceSafety
|
local tr = ply.ClimbingTraceSafety
|
||||||
local trout = ply.ClimbingTraceSafetyOut
|
local trout = ply.ClimbingTraceSafetyOut
|
||||||
|
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
tr.start = endpos
|
tr.start = endpos
|
||||||
tr.endpos = tr.start - wallang:Forward() * detectionlen
|
tr.endpos = tr.start - wallang:Forward() * detectionlen
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Hit then
|
if trout.Hit then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
tr.start = startpos + Vector(0, 0, 77)
|
tr.start = startpos + Vector(0, 0, 77)
|
||||||
tr.endpos = tr.start + wallang:Forward() * detectionlen * 0.5
|
tr.endpos = tr.start + wallang:Forward() * detectionlen * 0.5
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Hit then
|
if trout.Hit then return end
|
||||||
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 tr = ply.ClimbingTraceSafety
|
||||||
local trout = ply.ClimbingTraceSafetyOut
|
local trout = ply.ClimbingTraceSafetyOut
|
||||||
|
|
||||||
tr.start = mv:GetOrigin()
|
tr.start = mv:GetOrigin()
|
||||||
tr.endpos = tr.start + Vector(0, 0, 75)
|
tr.endpos = tr.start + Vector(0, 0, 75)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Hit then
|
if trout.Hit then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local origin = mv:GetOrigin()
|
local origin = mv:GetOrigin()
|
||||||
local tr = ply.ClimbingTraceSafety
|
local tr = ply.ClimbingTraceSafety
|
||||||
local trout = ply.ClimbingTraceSafetyOut
|
local trout = ply.ClimbingTraceSafetyOut
|
||||||
|
|
||||||
tr.start = startpos
|
tr.start = startpos
|
||||||
tr.endpos = startpos
|
tr.endpos = startpos
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.Hit then
|
if trout.Hit then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
startpos.z = startpos.z
|
startpos.z = startpos.z
|
||||||
ply.ClimbingStartPosCache = startpos
|
ply.ClimbingStartPosCache = startpos
|
||||||
|
@ -551,7 +544,6 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
if ply:GetWallrun() ~= 1 then
|
if ply:GetWallrun() ~= 1 then
|
||||||
startpos.z = startpos.z + 17
|
startpos.z = startpos.z + 17
|
||||||
|
|
||||||
mv:SetOrigin(startpos)
|
mv:SetOrigin(startpos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -610,8 +602,8 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
local wr = ply:GetWallrun()
|
local wr = ply:GetWallrun()
|
||||||
local wrtime = ply:GetWallrunTime() - CurTime()
|
-- local wrtime = ply:GetWallrunTime() - CurTime()
|
||||||
local vel = mv:GetVelocity()
|
-- local vel = mv:GetVelocity()
|
||||||
|
|
||||||
if wr ~= 0 then
|
if wr ~= 0 then
|
||||||
ply:SetWallrun(0)
|
ply:SetWallrun(0)
|
||||||
|
@ -649,6 +641,7 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
local trout = ply.ClimbingTraceSafetyOut
|
local trout = ply.ClimbingTraceSafetyOut
|
||||||
local mins, maxs = ply:GetCollisionBounds()
|
local mins, maxs = ply:GetCollisionBounds()
|
||||||
mins.z = maxs.z * 0.25
|
mins.z = maxs.z * 0.25
|
||||||
|
|
||||||
tr.start = ply:GetClimbingEnd()
|
tr.start = ply:GetClimbingEnd()
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.maxs = maxs
|
tr.maxs = maxs
|
||||||
|
@ -672,6 +665,7 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
if folded then
|
if folded then
|
||||||
ply:SetClimbing(5)
|
ply:SetClimbing(5)
|
||||||
ply:SetClimbingDelay(CurTime() + 0.8)
|
ply:SetClimbingDelay(CurTime() + 0.8)
|
||||||
|
|
||||||
ParkourEvent("hangfoldedstart", ply)
|
ParkourEvent("hangfoldedstart", ply)
|
||||||
else
|
else
|
||||||
local event = "climbhard"
|
local event = "climbhard"
|
||||||
|
@ -690,7 +684,7 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
if IsFirstTimePredicted() then
|
if IsFirstTimePredicted() then
|
||||||
if CLIENT or game.SinglePlayer() then
|
if CLIENT or game.SinglePlayer() then
|
||||||
timer.Simple(0.05, function ()
|
timer.Simple(0.05, function()
|
||||||
ply:EmitSound("Bump.Concrete")
|
ply:EmitSound("Bump.Concrete")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -704,7 +698,6 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
if folded then
|
if folded then
|
||||||
DoImpactBlur(8)
|
DoImpactBlur(8)
|
||||||
|
|
||||||
lockang2 = false
|
lockang2 = false
|
||||||
lockang = true
|
lockang = true
|
||||||
end
|
end
|
||||||
|
@ -712,9 +705,9 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("Climb_SPFix")
|
net.Start("Climb_SPFix")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.WriteAngle(wallang)
|
net.WriteAngle(wallang)
|
||||||
|
|
||||||
if folded then
|
if folded then
|
||||||
ply:SendLua("DoImpactBlur(8)")
|
ply:SendLua("DoImpactBlur(8)")
|
||||||
|
@ -726,12 +719,12 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
if CLIENT and IsFirstTimePredicted() then
|
if CLIENT and IsFirstTimePredicted() then
|
||||||
timer.Simple(0, function ()
|
timer.Simple(0, function()
|
||||||
BodyLimitX = 80
|
BodyLimitX = 80
|
||||||
BodyLimitY = 170
|
BodyLimitY = 170
|
||||||
end)
|
end)
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
timer.Simple(0, function ()
|
timer.Simple(0, function()
|
||||||
ply:SendLua("BodyLimitX=80 BodyLimitY=170")
|
ply:SendLua("BodyLimitX=80 BodyLimitY=170")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -746,14 +739,13 @@ local function ClimbingCheck(ply, mv, cmd)
|
||||||
mv:SetUpSpeed(0)
|
mv:SetUpSpeed(0)
|
||||||
end
|
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
|
if ply:GetClimbing() == nil or not ply:Alive() then
|
||||||
ply:SetClimbing(0)
|
ply:SetClimbing(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if IsValid(ply:GetSwingbar()) then
|
if IsValid(ply:GetSwingbar()) then return end
|
||||||
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
|
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)
|
ClimbingCheck(ply, mv, cmd)
|
||||||
|
@ -762,4 +754,4 @@ hook.Add("SetupMove", "Climbing", function (ply, mv, cmd)
|
||||||
if ply:GetClimbing() ~= 0 then
|
if ply:GetClimbing() ~= 0 then
|
||||||
ClimbingThink(ply, mv, cmd)
|
ClimbingThink(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -1,7 +1,5 @@
|
||||||
local problematichooks = {
|
local problematichooks = {
|
||||||
SetupMove = {
|
SetupMove = {"vmanip_vault"}
|
||||||
"vmanip_vault"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local function RemoveConflicting()
|
local function RemoveConflicting()
|
||||||
|
@ -14,4 +12,4 @@ local function RemoveConflicting()
|
||||||
hook.Remove("InitPostEntity", "RemoveConflicting")
|
hook.Remove("InitPostEntity", "RemoveConflicting")
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("InitPostEntity", "RemoveConflicting", RemoveConflicting)
|
hook.Add("InitPostEntity", "RemoveConflicting", RemoveConflicting)
|
|
@ -6,15 +6,17 @@ local punchthink = Angle()
|
||||||
if SERVER then
|
if SERVER then
|
||||||
util.AddNetworkString("CrouchJumpSP")
|
util.AddNetworkString("CrouchJumpSP")
|
||||||
elseif CLIENT and game.SinglePlayer() then
|
elseif CLIENT and game.SinglePlayer() then
|
||||||
net.Receive("CrouchJumpSP", function ()
|
net.Receive("CrouchJumpSP", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if BodyAnimArmCopy then
|
if BodyAnimArmCopy then
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
BodyAnimCrouchLerp = 0
|
BodyAnimCrouchLerp = 0
|
||||||
BodyAnimCrouchLerpZ = ply:GetPos().z - 32
|
BodyAnimCrouchLerpZ = ply:GetPos().z - 32
|
||||||
|
|
||||||
local ang = ply:EyeAngles()
|
local ang = ply:EyeAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
ply.OrigEyeAng = ang
|
ply.OrigEyeAng = ang
|
||||||
BodyLimitX = 40
|
BodyLimitX = 40
|
||||||
|
|
||||||
|
@ -23,7 +25,7 @@ elseif CLIENT and game.SinglePlayer() then
|
||||||
end)
|
end)
|
||||||
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
|
if ply:OnGround() and ply:GetCrouchJumpBlocked() then
|
||||||
ply:SetCrouchJumpBlocked(false)
|
ply:SetCrouchJumpBlocked(false)
|
||||||
end
|
end
|
||||||
|
@ -55,12 +57,14 @@ hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("CrouchJumpSP")
|
net.Start("CrouchJumpSP")
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply:SetNW2Float("BodyAnimCrouchLerpZ", ply:GetPos().z - 32)
|
ply:SetNW2Float("BodyAnimCrouchLerpZ", ply:GetPos().z - 32)
|
||||||
end
|
end
|
||||||
|
|
||||||
ParkourEvent("coil", ply)
|
ParkourEvent("coil", ply)
|
||||||
|
|
||||||
ply:SetCrouchJump(true)
|
ply:SetCrouchJump(true)
|
||||||
ply:SetCrouchJumpTime(CurTime() + 1)
|
ply:SetCrouchJumpTime(CurTime() + 1)
|
||||||
ply:ViewPunch(punch)
|
ply:ViewPunch(punch)
|
||||||
|
@ -78,7 +82,7 @@ hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("CrouchJumpSP")
|
net.Start("CrouchJumpSP")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -122,7 +126,8 @@ hook.Add("SetupMove", "CrouchJump", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
hook.Add("CreateMove", "VManipCrouchJumpDuck", function (cmd)
|
|
||||||
|
hook.Add("CreateMove", "VManipCrouchJumpDuck", function(cmd)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if ply:GetCrouchJump() and ply:GetMoveType() == MOVETYPE_WALK and not ply:OnGround() and not ply:GetDive() then
|
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:SetButtons(bit.bor(cmd:GetButtons(), IN_BULLRUSH))
|
||||||
cmd:RemoveKey(IN_DUCK)
|
cmd:RemoveKey(IN_DUCK)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -1,38 +1,30 @@
|
||||||
if SERVER then
|
if SERVER then
|
||||||
util.AddNetworkString("DBNO")
|
util.AddNetworkString("DBNO")
|
||||||
else
|
else
|
||||||
net.Receive("DBNO", function ()
|
net.Receive("DBNO", function()
|
||||||
DoJumpTurn()
|
DoJumpTurn()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("ScalePlayerDamage", "MissedMe", function (ply, hitgroup, dmginfo)
|
hook.Add("ScalePlayerDamage", "MissedMe", function(ply, hitgroup, dmginfo)
|
||||||
if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() then
|
if IsValid(dmginfo:GetAttacker()) and dmginfo:GetAttacker():IsPlayer() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local vel = ply:GetVelocity()
|
local vel = ply:GetVelocity()
|
||||||
local vel_len = vel:Length()
|
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
|
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
|
||||||
return true
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
hook.Add("EntityTakeDamage", "MissedMe", function (victim, dmginfo)
|
|
||||||
if not victim:IsPlayer() then
|
hook.Add("EntityTakeDamage", "MissedMe", function(victim, dmginfo)
|
||||||
return
|
if not victim:IsPlayer() then return end
|
||||||
end
|
|
||||||
|
|
||||||
local dmgtype = dmginfo:GetDamageType()
|
local dmgtype = dmginfo:GetDamageType()
|
||||||
|
|
||||||
if victim:GetSliding() and (dmgtype == DMG_SLASH or dmgtype == DMG_CLUB) then
|
if victim:GetSliding() and (dmgtype == DMG_SLASH or dmgtype == DMG_CLUB) then return true end
|
||||||
return true
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
hook.Add("PlayerShouldTakeDamage", "DBNO", function (ply, attacker)
|
|
||||||
if not IsValid(attacker) then
|
hook.Add("PlayerShouldTakeDamage", "DBNO", function(ply, attacker)
|
||||||
return
|
if not IsValid(attacker) then return end
|
||||||
end
|
|
||||||
|
|
||||||
local class = attacker:GetClass()
|
local class = attacker:GetClass()
|
||||||
|
|
||||||
|
@ -48,7 +40,7 @@ hook.Add("PlayerShouldTakeDamage", "DBNO", function (ply, attacker)
|
||||||
ply:SetLocalVelocity(atteyeang:Forward() * 100 + Vector(0, 0, 100))
|
ply:SetLocalVelocity(atteyeang:Forward() * 100 + Vector(0, 0, 100))
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
timer.Simple(0, function ()
|
timer.Simple(0, function()
|
||||||
net.Start("DBNO")
|
net.Start("DBNO")
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end)
|
end)
|
||||||
|
@ -58,24 +50,21 @@ hook.Add("PlayerShouldTakeDamage", "DBNO", function (ply, attacker)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ply:GetJumpTurn() and not ply:OnGround() and attacker:IsNPC() then
|
if ply:GetJumpTurn() and not ply:OnGround() and attacker:IsNPC() then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
local radial = Material("radial.png")
|
local radial = Material("radial.png")
|
||||||
local dmgalpha = 0
|
local dmgalpha = 0
|
||||||
|
|
||||||
hook.Add("HUDPaint", "NTScreenEffects", function ()
|
hook.Add("HUDPaint", "NTScreenEffects", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if not ply:Alive() then
|
if not ply:Alive() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local w = ScrW()
|
local w = ScrW()
|
||||||
local h = ScrH()
|
local h = ScrH()
|
||||||
|
|
||||||
dmgalpha = math.min(300 * math.abs(ply:Health() / ply:GetMaxHealth() - 1), 255)
|
dmgalpha = math.min(300 * math.abs(ply:Health() / ply:GetMaxHealth() - 1), 255)
|
||||||
|
|
||||||
surface.SetMaterial(radial)
|
surface.SetMaterial(radial)
|
||||||
|
@ -88,7 +77,7 @@ if CLIENT then
|
||||||
end
|
end
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
hook.Add("PlayerPostThink", "HealthRegen", function (ply)
|
hook.Add("PlayerPostThink", "HealthRegen", function(ply)
|
||||||
if not ply.LastHP then
|
if not ply.LastHP then
|
||||||
ply.LastHP = ply:Health()
|
ply.LastHP = ply:Health()
|
||||||
ply.RegenTime = 0
|
ply.RegenTime = 0
|
||||||
|
@ -102,10 +91,9 @@ if SERVER then
|
||||||
|
|
||||||
if ply:Alive() and ply.RegenTime < CurTime() and ply:Health() < ply:GetMaxHealth() then
|
if ply:Alive() and ply.RegenTime < CurTime() and ply:Health() < ply:GetMaxHealth() then
|
||||||
ply:SetHealth(math.Approach(ply:Health(), ply:GetMaxHealth(), 1))
|
ply:SetHealth(math.Approach(ply:Health(), ply:GetMaxHealth(), 1))
|
||||||
|
|
||||||
ply.RegenTime = CurTime() + 0.05
|
ply.RegenTime = CurTime() + 0.05
|
||||||
end
|
end
|
||||||
|
|
||||||
ply.LastHP = ply:Health()
|
ply.LastHP = ply:Health()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
|
@ -1,9 +1,7 @@
|
||||||
GM_DATATHEFT = 1
|
GM_DATATHEFT = 1
|
||||||
|
|
||||||
DATATHEFT_LOADOUTS = {
|
DATATHEFT_LOADOUTS = {
|
||||||
{
|
{"weapon_ss2_colt", "weapon_ss2_circularsaw"}
|
||||||
"weapon_ss2_colt",
|
|
||||||
"weapon_ss2_circularsaw"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
|
@ -12,6 +10,7 @@ if SERVER then
|
||||||
|
|
||||||
function Beatrun_StartDataTheft()
|
function Beatrun_StartDataTheft()
|
||||||
SetGlobalBool(GM_DATATHEFT, true)
|
SetGlobalBool(GM_DATATHEFT, true)
|
||||||
|
|
||||||
net.Start("DataTheft_Start")
|
net.Start("DataTheft_Start")
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
|
@ -28,7 +27,6 @@ if SERVER then
|
||||||
else
|
else
|
||||||
for l, b in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do
|
for l, b in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do
|
||||||
local wep = v:Give(b)
|
local wep = v:Give(b)
|
||||||
|
|
||||||
v:GiveAmmo(300, wep:GetPrimaryAmmoType())
|
v:GiveAmmo(300, wep:GetPrimaryAmmoType())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -42,8 +40,8 @@ if SERVER then
|
||||||
local function DataTheftSync(ply)
|
local function DataTheftSync(ply)
|
||||||
if GetGlobalBool(GM_DATATHEFT) and not ply.DataTheftSynced then
|
if GetGlobalBool(GM_DATATHEFT) and not ply.DataTheftSynced then
|
||||||
net.Start("Infection_Sync")
|
net.Start("Infection_Sync")
|
||||||
net.WriteFloat(Infection_StartTime)
|
net.WriteFloat(Infection_StartTime)
|
||||||
net.WriteFloat(Infection_EndTime)
|
net.WriteFloat(Infection_EndTime)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply.DataTheftSynced = true
|
ply.DataTheftSynced = true
|
||||||
|
@ -91,14 +89,14 @@ if CLIENT then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Receive("DataTheft_Sync", function ()
|
net.Receive("DataTheft_Sync", function()
|
||||||
hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName)
|
hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local chatcolor = Color(200, 200, 200)
|
local chatcolor = Color(200, 200, 200)
|
||||||
|
|
||||||
net.Receive("DataTheft_Start", function ()
|
net.Receive("DataTheft_Start", function()
|
||||||
hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName)
|
hook.Add("BeatrunHUDCourse", "DataTheftHUDName", DataTheftHUDName)
|
||||||
chat.AddText(chatcolor, "Data Theft! Kill players to collect data, deposit data in banks")
|
chat.AddText(chatcolor, "Data Theft! Kill players to collect data, deposit data in banks")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
|
@ -1,35 +1,30 @@
|
||||||
local totsugeki = CreateConVar("Beatrun_Totsugeki", 1, {
|
local totsugeki = CreateConVar("Beatrun_Totsugeki", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Oh no...", 0, 1)
|
||||||
FCVAR_REPLICATED,
|
local totsugekispam = CreateConVar("Beatrun_TotsugekiSpam", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "OH NO...", 0, 1)
|
||||||
FCVAR_ARCHIVE
|
local totsugekiheading = CreateConVar("Beatrun_TotsugekiHeading", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Can we dive on the x axis?", 0, 1)
|
||||||
}, "Oh no...", 0, 1)
|
local totsugekidir = CreateConVar("Beatrun_TotsugekiDir", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Can we dive into another dir?", 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)
|
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
|
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 vel = mv:GetVelocity()
|
||||||
local vel2 = Vector(vel)
|
local vel2 = Vector(vel)
|
||||||
vel2.z = 0
|
vel2.z = 0
|
||||||
|
|
||||||
local vel2len = vel2:Length()
|
local vel2len = vel2:Length()
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
local velmul = 15 / (math.max(vel2len - 100, 40) * 0.003)
|
local velmul = 15 / (math.max(vel2len - 100, 40) * 0.003)
|
||||||
|
|
||||||
vel:Add(ang:Forward() * velmul)
|
vel:Add(ang:Forward() * velmul)
|
||||||
vel:Add(Vector(0, 0, 70))
|
vel:Add(Vector(0, 0, 70))
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
ply:SetCrouchJumpTime(CurTime() + 1.65)
|
ply:SetCrouchJumpTime(CurTime() + 1.65)
|
||||||
ply:SetDive(true)
|
ply:SetDive(true)
|
||||||
|
|
||||||
|
ply:ViewPunch(Angle(-6,0,0))
|
||||||
|
|
||||||
ParkourEvent("divestart", ply)
|
ParkourEvent("divestart", ply)
|
||||||
|
|
||||||
if ply:UsingRH() and ply:GetActiveWeapon():GetQuakeJumping() and totsugeki:GetBool() then
|
if ply:UsingRH() and ply:GetActiveWeapon():GetQuakeJumping() and totsugeki:GetBool() then
|
||||||
|
@ -40,12 +35,14 @@ local function Dive(ply, mv, cmd)
|
||||||
local effectdata = EffectData()
|
local effectdata = EffectData()
|
||||||
|
|
||||||
effectdata:SetOrigin(vPoint)
|
effectdata:SetOrigin(vPoint)
|
||||||
|
|
||||||
util.Effect("WaterSurfaceExplosion", effectdata)
|
util.Effect("WaterSurfaceExplosion", effectdata)
|
||||||
elseif CLIENT_IFTP() then
|
elseif CLIENT_IFTP() then
|
||||||
local vPoint = mv:GetOrigin()
|
local vPoint = mv:GetOrigin()
|
||||||
local effectdata = EffectData()
|
local effectdata = EffectData()
|
||||||
|
|
||||||
effectdata:SetOrigin(vPoint)
|
effectdata:SetOrigin(vPoint)
|
||||||
|
|
||||||
util.Effect("WaterSurfaceExplosion", effectdata)
|
util.Effect("WaterSurfaceExplosion", effectdata)
|
||||||
end
|
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
|
if ply:GetMoveType() == MOVETYPE_NOCLIP or ply:WaterLevel() >= 3 or not ply:Alive() then
|
||||||
ply:SetDive(false)
|
ply:SetDive(false)
|
||||||
ply:SetCrouchJump(false)
|
ply:SetCrouchJump(false)
|
||||||
|
|
||||||
ply.DiveSliding = false
|
ply.DiveSliding = false
|
||||||
|
|
||||||
ParkourEvent("diveslideend", ply)
|
ParkourEvent("diveslideend", ply)
|
||||||
|
@ -89,7 +85,6 @@ local function Dive(ply, mv, cmd)
|
||||||
|
|
||||||
if ply:OnGround() and ply:GetSafetyRollKeyTime() <= CurTime() then
|
if ply:OnGround() and ply:GetSafetyRollKeyTime() <= CurTime() then
|
||||||
ply.DiveSliding = true
|
ply.DiveSliding = true
|
||||||
|
|
||||||
ply:SetDive(false)
|
ply:SetDive(false)
|
||||||
elseif ply:OnGround() and mv:KeyDown(IN_BULLRUSH) then
|
elseif ply:OnGround() and mv:KeyDown(IN_BULLRUSH) then
|
||||||
mv:SetButtons(0)
|
mv:SetButtons(0)
|
||||||
|
@ -97,4 +92,4 @@ local function Dive(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "Dive", Dive)
|
hook.Add("SetupMove", "Dive", Dive)
|
|
@ -1,21 +1,17 @@
|
||||||
print("h")
|
print("h")
|
||||||
|
|
||||||
|
--[[
|
||||||
local prefabs = {
|
local prefabs = {
|
||||||
basic_floor = {
|
basic_floor = {
|
||||||
{
|
{Vector(), Vector(300, 300, 50), 0, 0, 0}
|
||||||
Vector(),
|
|
||||||
Vector(300, 300, 50),
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]]
|
||||||
|
|
||||||
function SpawnPrefab(pos, data)
|
function SpawnPrefab(pos, data)
|
||||||
for k, v in ipairs(data) do
|
for k, v in ipairs(data) do
|
||||||
local mins = v[1]
|
-- local mins = v[1]
|
||||||
local maxs = v[2]
|
-- local maxs = v[2]
|
||||||
local offsetx = v[3] or 0
|
local offsetx = v[3] or 0
|
||||||
local offsety = v[4] or 0
|
local offsety = v[4] or 0
|
||||||
local offsetz = v[5] or 0
|
local offsetz = v[5] or 0
|
||||||
|
@ -23,4 +19,4 @@ function SpawnPrefab(pos, data)
|
||||||
|
|
||||||
offsetvec:Add(pos)
|
offsetvec:Add(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,26 +1,16 @@
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
local circle = Material("circlesmooth.png", "nocull smooth")
|
local circle = Material("circlesmooth.png", "nocull smooth")
|
||||||
|
|
||||||
hook.Add("HUDPaint", "grappleicon", function ()
|
hook.Add("HUDPaint", "grappleicon", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then
|
if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end
|
||||||
return
|
if not ply:Alive() or Course_Name ~= "" then return end
|
||||||
end
|
|
||||||
|
|
||||||
if not ply:Alive() or Course_Name ~= "" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
|
|
||||||
if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then
|
if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then return end
|
||||||
return
|
if GetGlobalBool(GM_INFECTION) then return end
|
||||||
end
|
|
||||||
|
|
||||||
if GetGlobalBool(GM_INFECTION) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ply.GrappleHUD_tr then
|
if not ply.GrappleHUD_tr then
|
||||||
ply.GrappleHUD_tr = {}
|
ply.GrappleHUD_tr = {}
|
||||||
|
@ -35,6 +25,7 @@ if CLIENT then
|
||||||
local w2s = ply:GetGrapplePos():ToScreen()
|
local w2s = ply:GetGrapplePos():ToScreen()
|
||||||
|
|
||||||
cam.End3D()
|
cam.End3D()
|
||||||
|
|
||||||
surface.SetDrawColor(255, 255, 255)
|
surface.SetDrawColor(255, 255, 255)
|
||||||
surface.SetMaterial(circle)
|
surface.SetMaterial(circle)
|
||||||
surface.DrawTexturedRect(w2s.x - SScaleX(4), w2s.y - SScaleY(4), SScaleX(8), SScaleY(8))
|
surface.DrawTexturedRect(w2s.x - SScaleX(4), w2s.y - SScaleY(4), SScaleX(8), SScaleY(8))
|
||||||
|
@ -42,9 +33,7 @@ if CLIENT then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if ply:EyeAngles().x > -15 or ply:GetWallrun() ~= 0 then
|
if ply:EyeAngles().x > -15 or ply:GetWallrun() ~= 0 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local trout = ply:GetEyeTrace()
|
local trout = ply:GetEyeTrace()
|
||||||
local dist = trout.HitPos:DistToSqr(ply:GetPos())
|
local dist = trout.HitPos:DistToSqr(ply:GetPos())
|
||||||
|
@ -55,6 +44,7 @@ if CLIENT then
|
||||||
local w2s = trout.HitPos:ToScreen()
|
local w2s = trout.HitPos:ToScreen()
|
||||||
|
|
||||||
cam.End3D()
|
cam.End3D()
|
||||||
|
|
||||||
surface.SetDrawColor(255, 255, 255)
|
surface.SetDrawColor(255, 255, 255)
|
||||||
surface.SetMaterial(circle)
|
surface.SetMaterial(circle)
|
||||||
surface.DrawTexturedRect(w2s.x - SScaleX(4), w2s.y - SScaleY(4), SScaleX(8), SScaleY(8))
|
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)
|
local zpunchstart = Angle(2, 0, 0)
|
||||||
|
|
||||||
hook.Add("SetupMove", "Grapple", function (ply, mv, cmd)
|
hook.Add("SetupMove", "Grapple", function(ply, mv, cmd)
|
||||||
if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then
|
if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end
|
||||||
return
|
if not ply:Alive() or Course_Name ~= "" then return end
|
||||||
end
|
if GetGlobalBool(GM_INFECTION) and not ply:GetNW2Entity("Swingrope") 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 activewep = ply:GetActiveWeapon()
|
||||||
local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands"
|
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)
|
vel.z = -math.abs(vel.z)
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
ply:SetGrapplePos(trout.HitPos)
|
ply:SetGrapplePos(trout.HitPos)
|
||||||
ply:SetGrappling(true)
|
ply:SetGrappling(true)
|
||||||
ply:SetGrappleLength(mv:GetOrigin():Distance(trout.HitPos))
|
ply:SetGrappleLength(mv:GetOrigin():Distance(trout.HitPos))
|
||||||
|
@ -112,6 +95,7 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd)
|
||||||
ply:ViewPunch(zpunchstart)
|
ply:ViewPunch(zpunchstart)
|
||||||
|
|
||||||
grappled = true
|
grappled = true
|
||||||
|
|
||||||
ply.GrappleLengthOld = ply:GetGrappleLength()
|
ply.GrappleLengthOld = ply:GetGrappleLength()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -119,7 +103,7 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd)
|
||||||
if ply:GetGrappling() then
|
if ply:GetGrappling() then
|
||||||
local startshrink = (ply.GrappleLengthOld or 0) - ply:GetGrappleLength() < 200
|
local startshrink = (ply.GrappleLengthOld or 0) - ply:GetGrappleLength() < 200
|
||||||
local shmovemul = startshrink and 4 or 1
|
local shmovemul = startshrink and 4 or 1
|
||||||
local gpos = ply:GetGrapplePos()
|
-- local gpos = ply:GetGrapplePos()
|
||||||
local pos = mv:GetOrigin()
|
local pos = mv:GetOrigin()
|
||||||
local eyepos = mv:GetOrigin()
|
local eyepos = mv:GetOrigin()
|
||||||
eyepos.z = eyepos.z + 64
|
eyepos.z = eyepos.z + 64
|
||||||
|
@ -135,16 +119,16 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd)
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
ang = ang:Forward()
|
ang = ang:Forward()
|
||||||
|
|
||||||
ang:Mul(200)
|
ang:Mul(200)
|
||||||
|
|
||||||
ang.z = 200
|
ang.z = 200
|
||||||
|
|
||||||
mv:SetVelocity(mv:GetVelocity() * 0.5 + ang)
|
mv:SetVelocity(mv:GetVelocity() * 0.5 + ang)
|
||||||
|
|
||||||
ply:SetNW2Entity("Swingrope", nil)
|
ply:SetNW2Entity("Swingrope", nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
ParkourEvent("jump", ply)
|
ParkourEvent("jump", ply)
|
||||||
|
|
||||||
table.Empty(ply.ZiplineTraceOut)
|
table.Empty(ply.ZiplineTraceOut)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -160,14 +144,16 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd)
|
||||||
ply:SetGrappleLength(ply:GetGrappleLength() - FrameTime() * 250)
|
ply:SetGrappleLength(ply:GetGrappleLength() - FrameTime() * 250)
|
||||||
end
|
end
|
||||||
|
|
||||||
local vel = mv:GetVelocity()
|
-- local vel = mv:GetVelocity()
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
local fmove = ang:Forward() * mv:GetForwardSpeed() * 6e-05 * shmovemul
|
local fmove = ang:Forward() * mv:GetForwardSpeed() * 6e-05 * shmovemul
|
||||||
local smove = ang:Right() * mv:GetSideSpeed() * 2.5e-05 * shmovemul
|
local smove = ang:Right() * mv:GetSideSpeed() * 2.5e-05 * shmovemul
|
||||||
local newvel = fmove + smove
|
local newvel = fmove + smove
|
||||||
local gposd = ply:GetGrapplePos()
|
local gposd = ply:GetGrapplePos()
|
||||||
local posd = mv:GetOrigin()
|
local posd = mv:GetOrigin()
|
||||||
|
|
||||||
gposd.z = 0
|
gposd.z = 0
|
||||||
posd.z = 0
|
posd.z = 0
|
||||||
newvel.z = gposd:Distance(posd) / ply:GetGrappleLength() * 5
|
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
|
if ply:GetGrappleLength() < ply:GetGrapplePos():Distance(pos) and not ply:OnGround() then
|
||||||
local tr = ply.Grapple_tr
|
local tr = ply.Grapple_tr
|
||||||
local trout = ply.Grapple_trout
|
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)
|
mins:Mul(1.01)
|
||||||
maxs:Mul(1.01)
|
maxs:Mul(1.01)
|
||||||
|
|
||||||
|
@ -192,7 +180,6 @@ hook.Add("SetupMove", "Grapple", function (ply, mv, cmd)
|
||||||
util.TraceHull(tr)
|
util.TraceHull(tr)
|
||||||
|
|
||||||
local vel = pos - ply:GetGrapplePos()
|
local vel = pos - ply:GetGrapplePos()
|
||||||
|
|
||||||
vel:Normalize()
|
vel:Normalize()
|
||||||
|
|
||||||
if not trout.Hit then
|
if not trout.Hit then
|
||||||
|
@ -219,7 +206,7 @@ local ropetop = Vector()
|
||||||
local ropelerp = 0
|
local ropelerp = 0
|
||||||
local ropedown = Vector(0, 0, 20)
|
local ropedown = Vector(0, 0, 20)
|
||||||
|
|
||||||
hook.Add("PostDrawTranslucentRenderables", "GrappleBeam", function ()
|
hook.Add("PostDrawTranslucentRenderables", "GrappleBeam", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if ply:GetGrappling() then
|
if ply:GetGrappling() then
|
||||||
|
@ -229,39 +216,35 @@ hook.Add("PostDrawTranslucentRenderables", "GrappleBeam", function ()
|
||||||
BA = BodyAnim
|
BA = BodyAnim
|
||||||
end
|
end
|
||||||
|
|
||||||
if not IsValid(BA) then
|
if not IsValid(BA) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
BA:SetupBones()
|
BA:SetupBones()
|
||||||
|
|
||||||
local rhand = BA:LookupBone("ValveBiped.Bip01_R_Finger41")
|
local rhand = BA:LookupBone("ValveBiped.Bip01_R_Finger41")
|
||||||
local lhand = BA:LookupBone("ValveBiped.Bip01_L_Finger21")
|
local lhand = BA:LookupBone("ValveBiped.Bip01_L_Finger21")
|
||||||
|
|
||||||
if BA:GetBoneMatrix(rhand) == nil then
|
if BA:GetBoneMatrix(rhand) == nil then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local rhandpos = BA:GetBoneMatrix(rhand):GetTranslation()
|
local rhandpos = BA:GetBoneMatrix(rhand):GetTranslation()
|
||||||
|
if not rhandpos then return end
|
||||||
if not rhandpos then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
rhandpos:Sub(BA:GetRight() * 2.5)
|
rhandpos:Sub(BA:GetRight() * 2.5)
|
||||||
|
|
||||||
local lhandpos = BA:GetBoneMatrix(lhand):GetTranslation()
|
local lhandpos = BA:GetBoneMatrix(lhand):GetTranslation()
|
||||||
|
|
||||||
ropetop:Set(lhandpos)
|
ropetop:Set(lhandpos)
|
||||||
|
|
||||||
render.SetMaterial(cablemat)
|
render.SetMaterial(cablemat)
|
||||||
render.StartBeam(2)
|
render.StartBeam(2)
|
||||||
|
|
||||||
local up = (rhandpos - lhandpos):Angle():Forward()
|
local up = (rhandpos - lhandpos):Angle():Forward()
|
||||||
|
|
||||||
up:Mul(20)
|
up:Mul(20)
|
||||||
|
|
||||||
rhandpos:Add(up)
|
rhandpos:Add(up)
|
||||||
|
|
||||||
render.DrawBeam(LerpVector(ropelerp, lhandpos - ropedown, rhandpos), lhandpos, 1.5, 0, 1)
|
render.DrawBeam(LerpVector(ropelerp, lhandpos - ropedown, rhandpos), lhandpos, 1.5, 0, 1)
|
||||||
render.DrawBeam(ropetop, ply:GetGrapplePos(), 1.5, 0, 1)
|
render.DrawBeam(ropetop, ply:GetGrapplePos(), 1.5, 0, 1)
|
||||||
|
|
||||||
BodyAnim:SetSequence("grapplecenter")
|
BodyAnim:SetSequence("grapplecenter")
|
||||||
|
|
||||||
ropelerp = math.Approach(ropelerp, 1, FrameTime() * 2)
|
ropelerp = math.Approach(ropelerp, 1, FrameTime() * 2)
|
||||||
|
@ -283,9 +266,7 @@ function CreateSwingrope(startpos, length)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function Swingrope(ply, mv, cmd)
|
local function Swingrope(ply, mv, cmd)
|
||||||
if not ply.ZiplineTrace then
|
if not ply.ZiplineTrace then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not IsValid(ply:GetZipline()) and not ply:GetGrappling() and not ply:Crouching() and not ply:OnGround() and ply:GetZiplineDelay() < CurTime() then
|
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
|
local trout = ply.ZiplineTraceOut
|
||||||
|
@ -296,9 +277,11 @@ local function Swingrope(ply, mv, cmd)
|
||||||
local startpos = trentity:GetStartPos()
|
local startpos = trentity:GetStartPos()
|
||||||
local endpos = trentity:GetEndPos()
|
local endpos = trentity:GetEndPos()
|
||||||
local bestpos = endpos.z < startpos.z and startpos or endpos
|
local bestpos = endpos.z < startpos.z and startpos or endpos
|
||||||
|
|
||||||
vel.z = -math.abs(vel.z)
|
vel.z = -math.abs(vel.z)
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
ply:SetGrapplePos(bestpos)
|
ply:SetGrapplePos(bestpos)
|
||||||
ply:SetGrappling(true)
|
ply:SetGrappling(true)
|
||||||
ply:SetGrappleLength(mv:GetOrigin():Distance(bestpos))
|
ply:SetGrappleLength(mv:GetOrigin():Distance(bestpos))
|
||||||
|
@ -312,6 +295,7 @@ local function Swingrope(ply, mv, cmd)
|
||||||
ply:SetNW2Entity("Swingrope", trentity)
|
ply:SetNW2Entity("Swingrope", trentity)
|
||||||
|
|
||||||
local eyeang = cmd:GetViewAngles()
|
local eyeang = cmd:GetViewAngles()
|
||||||
|
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
|
@ -320,4 +304,4 @@ local function Swingrope(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "Swingrope", Swingrope)
|
hook.Add("SetupMove", "Swingrope", Swingrope)
|
|
@ -48,28 +48,26 @@ if SERVER then
|
||||||
for k, v in pairs(player.GetAll()) do
|
for k, v in pairs(player.GetAll()) do
|
||||||
if not didgun and not ended and v:Alive() and not v:GetNW2Bool("Infected") then
|
if not didgun and not ended and v:Alive() and not v:GetNW2Bool("Infected") then
|
||||||
hook.Run("Infection_LastManGun", v)
|
hook.Run("Infection_LastManGun", v)
|
||||||
|
|
||||||
didgun = true
|
didgun = true
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Receive("Infection_Touch", function (len, ply)
|
net.Receive("Infection_Touch", function(len, ply)
|
||||||
local victim = net.ReadEntity()
|
local victim = net.ReadEntity()
|
||||||
|
|
||||||
if ended or not ply:Alive() or not ply:GetNW2Bool("Infected") or victim:GetNW2Bool("Infected") then
|
if ended or not ply:Alive() or not ply:GetNW2Bool("Infected") or victim:GetNW2Bool("Infected") then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if IsValid(victim) and victim:IsPlayer() and ply:GetPos():Distance(victim:GetPos()) < 300 then
|
if IsValid(victim) and victim:IsPlayer() and ply:GetPos():Distance(victim:GetPos()) < 300 then
|
||||||
victim:SetNW2Bool("Infected", true)
|
victim:SetNW2Bool("Infected", true)
|
||||||
|
|
||||||
net.Start("Infection_Announce")
|
net.Start("Infection_Announce")
|
||||||
net.WriteEntity(ply)
|
net.WriteEntity(ply)
|
||||||
net.WriteEntity(victim)
|
net.WriteEntity(victim)
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
victim:SetNW2Float("PBTime", CurTime() - Infection_StartTime)
|
victim:SetNW2Float("PBTime", CurTime() - Infection_StartTime)
|
||||||
|
|
||||||
local humancount = HumanCount()
|
local humancount = HumanCount()
|
||||||
|
@ -79,13 +77,14 @@ if SERVER then
|
||||||
|
|
||||||
if humancount < 1 then
|
if humancount < 1 then
|
||||||
victim:EmitSound("blackout_hit_0" .. rand(1, 3) .. ".wav")
|
victim:EmitSound("blackout_hit_0" .. rand(1, 3) .. ".wav")
|
||||||
|
|
||||||
net.Start("Infection_End")
|
net.Start("Infection_End")
|
||||||
net.WriteFloat(CurTime())
|
net.WriteFloat(CurTime())
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
ended = true
|
ended = true
|
||||||
|
|
||||||
timer.Simple(15, function ()
|
timer.Simple(15, function()
|
||||||
if ended and GetGlobalBool(GM_INFECTION) then
|
if ended and GetGlobalBool(GM_INFECTION) then
|
||||||
Beatrun_StartInfection()
|
Beatrun_StartInfection()
|
||||||
end
|
end
|
||||||
|
@ -99,8 +98,8 @@ if SERVER then
|
||||||
local function InfectionSync(ply)
|
local function InfectionSync(ply)
|
||||||
if GetGlobalBool(GM_INFECTION) and not ply.InfectionSynced then
|
if GetGlobalBool(GM_INFECTION) and not ply.InfectionSynced then
|
||||||
net.Start("Infection_Sync")
|
net.Start("Infection_Sync")
|
||||||
net.WriteFloat(Infection_StartTime)
|
net.WriteFloat(Infection_StartTime)
|
||||||
net.WriteFloat(Infection_EndTime)
|
net.WriteFloat(Infection_EndTime)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply.InfectionSynced = true
|
ply.InfectionSynced = true
|
||||||
|
@ -137,27 +136,26 @@ if SERVER then
|
||||||
|
|
||||||
if numinfected == 1 then
|
if numinfected == 1 then
|
||||||
local infected = players[rand(#players)]
|
local infected = players[rand(#players)]
|
||||||
|
|
||||||
infected:SetNW2Bool("Infected", true)
|
infected:SetNW2Bool("Infected", true)
|
||||||
|
|
||||||
net.Start("Infection_XPReward")
|
net.Start("Infection_XPReward")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(infected)
|
net.Send(infected)
|
||||||
else
|
else
|
||||||
table.Shuffle(players)
|
table.Shuffle(players)
|
||||||
|
|
||||||
for i = 1, numinfected do
|
for i = 1, numinfected do
|
||||||
players[i]:SetNW2Bool("Infected", true)
|
players[i]:SetNW2Bool("Infected", true)
|
||||||
|
|
||||||
net.Start("Infection_XPReward")
|
net.Start("Infection_XPReward")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(players[i])
|
net.Send(players[i])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function InfectionTimer()
|
local function InfectionTimer()
|
||||||
if not GetGlobalBool(GM_INFECTION) then
|
if not GetGlobalBool(GM_INFECTION) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if player.GetCount() <= 1 then
|
if player.GetCount() <= 1 then
|
||||||
Beatrun_StopInfection()
|
Beatrun_StopInfection()
|
||||||
|
@ -174,7 +172,7 @@ if SERVER then
|
||||||
local timeremaining = Infection_EndTime - CurTime()
|
local timeremaining = Infection_EndTime - CurTime()
|
||||||
|
|
||||||
if not didmusic and revealed and timeremaining <= 60 and timeremaining >= 50 and player.GetCount() >= 5 and cachedhumancount == 1 then
|
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
|
for k, v in ipairs(player.GetAll()) do
|
||||||
if v:Alive() and not v:GetNW2Bool("Infected") then
|
if v:Alive() and not v:GetNW2Bool("Infected") then
|
||||||
net.Start("Infection_LastMan")
|
net.Start("Infection_LastMan")
|
||||||
|
@ -196,12 +194,12 @@ if SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Start("Infection_End")
|
net.Start("Infection_End")
|
||||||
net.WriteFloat(CurTime())
|
net.WriteFloat(CurTime())
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
ended = true
|
ended = true
|
||||||
|
|
||||||
timer.Simple(15, function ()
|
timer.Simple(15, function()
|
||||||
if ended and GetGlobalBool(GM_INFECTION) then
|
if ended and GetGlobalBool(GM_INFECTION) then
|
||||||
Beatrun_StartInfection()
|
Beatrun_StartInfection()
|
||||||
end
|
end
|
||||||
|
@ -210,21 +208,14 @@ if SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
function Beatrun_StartInfection()
|
function Beatrun_StartInfection()
|
||||||
if GetGlobalBool(GM_INFECTION) and not ended then
|
if GetGlobalBool(GM_INFECTION) and not ended then return end
|
||||||
return
|
if Course_Name ~= "" then return end
|
||||||
end
|
if player.GetCount() < 2 then return end
|
||||||
|
|
||||||
if Course_Name ~= "" then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if player.GetCount() < 2 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
net.Start("Infection_Start")
|
net.Start("Infection_Start")
|
||||||
net.WriteFloat(CurTime())
|
net.WriteFloat(CurTime())
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
SetGlobalBool(GM_INFECTION, true)
|
SetGlobalBool(GM_INFECTION, true)
|
||||||
|
|
||||||
revealed = false
|
revealed = false
|
||||||
|
@ -232,6 +223,7 @@ if SERVER then
|
||||||
didmusic = false
|
didmusic = false
|
||||||
didgun = false
|
didgun = false
|
||||||
cachedhumancount = 0
|
cachedhumancount = 0
|
||||||
|
|
||||||
local players = player.GetAll()
|
local players = player.GetAll()
|
||||||
|
|
||||||
for k, v in ipairs(players) do
|
for k, v in ipairs(players) do
|
||||||
|
@ -256,9 +248,7 @@ if SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
function InfectionDeath(ply)
|
function InfectionDeath(ply)
|
||||||
if not GetGlobalBool(GM_INFECTION) then
|
if not GetGlobalBool(GM_INFECTION) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if revealed and Infection_StartTime < CurTime() and not ply:GetNW2Bool("Infected") then
|
if revealed and Infection_StartTime < CurTime() and not ply:GetNW2Bool("Infected") then
|
||||||
if ply.InfectionWuzHere then
|
if ply.InfectionWuzHere then
|
||||||
|
@ -266,9 +256,10 @@ if SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
ply:SetNW2Bool("Infected", true)
|
ply:SetNW2Bool("Infected", true)
|
||||||
|
|
||||||
net.Start("Infection_Announce")
|
net.Start("Infection_Announce")
|
||||||
net.WriteEntity(ply)
|
net.WriteEntity(ply)
|
||||||
net.WriteEntity(ply)
|
net.WriteEntity(ply)
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
local humancount = HumanCount()
|
local humancount = HumanCount()
|
||||||
|
@ -278,12 +269,12 @@ if SERVER then
|
||||||
|
|
||||||
if humancount < 1 then
|
if humancount < 1 then
|
||||||
net.Start("Infection_End")
|
net.Start("Infection_End")
|
||||||
net.WriteFloat(CurTime())
|
net.WriteFloat(CurTime())
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
|
|
||||||
ended = true
|
ended = true
|
||||||
|
|
||||||
timer.Simple(15, function ()
|
timer.Simple(15, function()
|
||||||
if ended and GetGlobalBool(GM_INFECTION) then
|
if ended and GetGlobalBool(GM_INFECTION) then
|
||||||
Beatrun_StartInfection()
|
Beatrun_StartInfection()
|
||||||
end
|
end
|
||||||
|
@ -293,7 +284,7 @@ if SERVER then
|
||||||
local timeremaining = Infection_EndTime - CurTime()
|
local timeremaining = Infection_EndTime - CurTime()
|
||||||
|
|
||||||
if timeremaining <= 70 and timeremaining >= 50 and player.GetCount() > 6 and humancount == 1 then
|
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
|
for k, v in ipairs(player.GetAll()) do
|
||||||
if v:Alive() and not v:GetNW2Bool("Infected") then
|
if v:Alive() and not v:GetNW2Bool("Infected") then
|
||||||
net.Start("Infection_LastMan")
|
net.Start("Infection_LastMan")
|
||||||
|
@ -339,8 +330,10 @@ if CLIENT then
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
ang.z = 0
|
ang.z = 0
|
||||||
ang.y = ang.y + 180
|
ang.y = ang.y + 180
|
||||||
|
|
||||||
view.origin = pos
|
view.origin = pos
|
||||||
view.angles = ang
|
view.angles = ang
|
||||||
|
|
||||||
lookingbehind = true
|
lookingbehind = true
|
||||||
|
|
||||||
LocalPlayer():DrawViewModel(false)
|
LocalPlayer():DrawViewModel(false)
|
||||||
|
@ -373,26 +366,28 @@ if CLIENT then
|
||||||
|
|
||||||
local chatcolor = Color(200, 200, 200)
|
local chatcolor = Color(200, 200, 200)
|
||||||
|
|
||||||
net.Receive("Infection_Start", function ()
|
net.Receive("Infection_Start", function()
|
||||||
local start = net.ReadFloat()
|
local start = net.ReadFloat()
|
||||||
local noclipbind = input.LookupBinding("noclip") or "n"
|
local noclipbind = input.LookupBinding("noclip") or "n"
|
||||||
noclipkey = input.GetKeyCode(noclipbind)
|
noclipkey = input.GetKeyCode(noclipbind)
|
||||||
endtime = 0
|
endtime = 0
|
||||||
|
|
||||||
Infection_StartTime = start + 10
|
Infection_StartTime = start + 10
|
||||||
Infection_EndTime = start + 190
|
Infection_EndTime = start + 190
|
||||||
|
|
||||||
hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName)
|
hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName)
|
||||||
hook.Add("CalcView", "InfectionCalcView", InfectionCalcView)
|
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")
|
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)
|
end)
|
||||||
|
|
||||||
local music = nil
|
local music = nil
|
||||||
|
|
||||||
net.Receive("Infection_End", function ()
|
net.Receive("Infection_End", function()
|
||||||
local survivors = ""
|
local survivors = ""
|
||||||
endtime = net.ReadFloat()
|
endtime = net.ReadFloat()
|
||||||
|
|
||||||
timer.Simple(0.5, function ()
|
timer.Simple(0.5, function()
|
||||||
for k, v in ipairs(player.GetAll()) do
|
for k, v in ipairs(player.GetAll()) do
|
||||||
if not v:GetNW2Bool("Infected") then
|
if not v:GetNW2Bool("Infected") then
|
||||||
survivors = survivors .. v:Nick() .. ", "
|
survivors = survivors .. v:Nick() .. ", "
|
||||||
|
@ -418,8 +413,9 @@ if CLIENT then
|
||||||
music:Stop()
|
music:Stop()
|
||||||
end
|
end
|
||||||
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
|
if IsValid(station) then
|
||||||
station:SetVolume(0.5)
|
station:SetVolume(0.5)
|
||||||
station:Play()
|
station:Play()
|
||||||
|
@ -432,7 +428,7 @@ if CLIENT then
|
||||||
local red = Color(255, 25, 25)
|
local red = Color(255, 25, 25)
|
||||||
local yellow = Color(255, 255, 100)
|
local yellow = Color(255, 255, 100)
|
||||||
|
|
||||||
net.Receive("Infection_Announce", function ()
|
net.Receive("Infection_Announce", function()
|
||||||
local attacker = net.ReadEntity()
|
local attacker = net.ReadEntity()
|
||||||
local victim = net.ReadEntity()
|
local victim = net.ReadEntity()
|
||||||
|
|
||||||
|
@ -440,7 +436,7 @@ if CLIENT then
|
||||||
if attacker == victim then
|
if attacker == victim then
|
||||||
chat.AddText(attacker, red, " died!")
|
chat.AddText(attacker, red, " died!")
|
||||||
else
|
else
|
||||||
chat.AddText(attacker, red, " has infected ", victim, "!")
|
chat.AddText(attacker, red, " has infected ", yellow, victim, "!")
|
||||||
end
|
end
|
||||||
|
|
||||||
attacker.InfectionTouchDelay = CurTime() + 3
|
attacker.InfectionTouchDelay = CurTime() + 3
|
||||||
|
@ -452,9 +448,7 @@ if CLIENT then
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function InfectionHUD()
|
local function InfectionHUD()
|
||||||
if not GetGlobalBool(GM_INFECTION) then
|
if not GetGlobalBool(GM_INFECTION) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
surface.SetTextColor(color_white)
|
surface.SetTextColor(color_white)
|
||||||
surface.SetFont("BeatrunHUD")
|
surface.SetFont("BeatrunHUD")
|
||||||
|
@ -466,8 +460,9 @@ if CLIENT then
|
||||||
end
|
end
|
||||||
|
|
||||||
remainingtime = math.max(remainingtime, 0)
|
remainingtime = math.max(remainingtime, 0)
|
||||||
|
|
||||||
local timer = string.FormattedTime(remainingtime, "%02i:%02i:%02i")
|
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.SetTextPos(ScrW() * 0.5 - tw * 0.5, ScrH() * 0.25)
|
||||||
surface.DrawText(timer)
|
surface.DrawText(timer)
|
||||||
|
@ -485,36 +480,36 @@ if CLIENT then
|
||||||
["$pp_colour_mulr"] = 0
|
["$pp_colour_mulr"] = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
hook.Add("BeatrunSpawn", "InfectionSpawnDelay", function ()
|
hook.Add("BeatrunSpawn", "InfectionSpawnDelay", function()
|
||||||
LocalPlayer().InfectionTouchDelay = CurTime() + 6
|
LocalPlayer().InfectionTouchDelay = CurTime() + 6
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function BeatrunInfectedVision()
|
local function BeatrunInfectedVision()
|
||||||
if GetGlobalBool(GM_INFECTION) and LocalPlayer():GetNW2Bool("Infected") then
|
if GetGlobalBool(GM_INFECTION) and LocalPlayer():GetNW2Bool("Infected") then
|
||||||
tab["$pp_colour_colour"] = CurTime() > (LocalPlayer().InfectionTouchDelay or 0) and 0.91 or 0.1
|
tab["$pp_colour_colour"] = CurTime() > (LocalPlayer().InfectionTouchDelay or 0) and 0.91 or 0.1
|
||||||
|
|
||||||
DrawColorModify(tab)
|
DrawColorModify(tab)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("HUDPaint", "InfectionHUD", InfectionHUD)
|
hook.Add("HUDPaint", "InfectionHUD", InfectionHUD)
|
||||||
hook.Add("RenderScreenspaceEffects", "BeatrunInfectedVision", BeatrunInfectedVision)
|
hook.Add("RenderScreenspaceEffects", "BeatrunInfectedVision", BeatrunInfectedVision)
|
||||||
net.Receive("Infection_XPReward", function ()
|
|
||||||
|
net.Receive("Infection_XPReward", function()
|
||||||
local humanwin = net.ReadBool()
|
local humanwin = net.ReadBool()
|
||||||
|
|
||||||
if humanwin then
|
if humanwin then
|
||||||
chat.AddText(chatcolor, "You were awarded 200 XP for surviving")
|
|
||||||
LocalPlayer():AddXP(200)
|
LocalPlayer():AddXP(200)
|
||||||
|
chat.AddText(chatcolor, "You were awarded 200 XP for surviving")
|
||||||
else
|
else
|
||||||
chat.AddText(chatcolor, "You were awarded 100 XP for spawning as an infected")
|
|
||||||
LocalPlayer():AddXP(100)
|
LocalPlayer():AddXP(100)
|
||||||
|
chat.AddText(chatcolor, "You were awarded 100 XP for spawning as an infected")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
net.Receive("Infection_Sync", function ()
|
|
||||||
|
net.Receive("Infection_Sync", function()
|
||||||
endtime = 0
|
endtime = 0
|
||||||
Infection_StartTime = net.ReadFloat()
|
Infection_StartTime = net.ReadFloat()
|
||||||
Infection_EndTime = net.ReadFloat()
|
Infection_EndTime = net.ReadFloat()
|
||||||
|
|
||||||
hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName)
|
hook.Add("BeatrunHUDCourse", "InfectionHUDName", InfectionHUDName)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
|
@ -1,7 +1,7 @@
|
||||||
if SERVER and game.SinglePlayer() then
|
if SERVER and game.SinglePlayer() then
|
||||||
util.AddNetworkString("Ladder_SPFix")
|
util.AddNetworkString("Ladder_SPFix")
|
||||||
elseif CLIENT and game.SinglePlayer() then
|
elseif CLIENT and game.SinglePlayer() then
|
||||||
net.Receive("Ladder_SPFix", function ()
|
net.Receive("Ladder_SPFix", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local ang = ply:EyeAngles()
|
local ang = ply:EyeAngles()
|
||||||
ang.y = ply:GetLadder():GetAngles().y - 180
|
ang.y = ply:GetLadder():GetAngles().y - 180
|
||||||
|
@ -17,16 +17,16 @@ end
|
||||||
local function LadderCheck(ply, mv, cmd, ladder)
|
local function LadderCheck(ply, mv, cmd, ladder)
|
||||||
local ladderang = ladder:GetAngles()
|
local ladderang = ladder:GetAngles()
|
||||||
|
|
||||||
if math.abs(math.AngleDifference(cmd:GetViewAngles().y, ladderang.y - 180)) > 30 then
|
if math.abs(math.AngleDifference(cmd:GetViewAngles().y, ladderang.y - 180)) > 30 then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local zlevel = mv:GetOrigin().z
|
local zlevel = mv:GetOrigin().z
|
||||||
local newpos = ladder:GetPos() + ladderang:Forward() * 19
|
local newpos = ladder:GetPos() + ladderang:Forward() * 19
|
||||||
newpos.z = zlevel
|
newpos.z = zlevel
|
||||||
|
|
||||||
ladderang.z = 0
|
ladderang.z = 0
|
||||||
ladderang.x = 0
|
ladderang.x = 0
|
||||||
ladderang.y = ladderang.y - 180
|
ladderang.y = ladderang.y - 180
|
||||||
|
|
||||||
local origin = mv:GetOrigin()
|
local origin = mv:GetOrigin()
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
@ -56,13 +56,15 @@ local function LadderCheck(ply, mv, cmd, ladder)
|
||||||
local event = ply:OnGround() and "ladderenter" or "ladderenterhang"
|
local event = ply:OnGround() and "ladderenter" or "ladderenterhang"
|
||||||
|
|
||||||
ParkourEvent(event, ply)
|
ParkourEvent(event, ply)
|
||||||
|
|
||||||
ply:SetLadderStartPos(mv:GetOrigin())
|
ply:SetLadderStartPos(mv:GetOrigin())
|
||||||
ply:SetLadderEndPos(newpos)
|
ply:SetLadderEndPos(newpos)
|
||||||
|
|
||||||
mv:SetOrigin(newpos)
|
mv:SetOrigin(newpos)
|
||||||
|
|
||||||
ply:SetLadderEntering(true)
|
ply:SetLadderEntering(true)
|
||||||
ply:SetLadderHand(true)
|
ply:SetLadderHand(true)
|
||||||
ply:SetMoveType(MOVETYPE_NOCLIP)
|
ply:SetMoveType(MOVETYPE_NOCLIP)
|
||||||
|
|
||||||
ply.LadderEnd = false
|
ply.LadderEnd = false
|
||||||
ply.LadderHardStart = not ply:OnGround()
|
ply.LadderHardStart = not ply:OnGround()
|
||||||
|
|
||||||
|
@ -78,6 +80,7 @@ end
|
||||||
local function LadderThink(ply, mv, cmd, ladder)
|
local function LadderThink(ply, mv, cmd, ladder)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
mv:SetSideSpeed(0)
|
mv:SetSideSpeed(0)
|
||||||
|
|
||||||
cmd:ClearMovement()
|
cmd:ClearMovement()
|
||||||
|
|
||||||
if ply:GetLadderEntering() then
|
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 ladder:GetLadderHeight() <= ply:GetLadderHeight() and not ply.LadderEnd then
|
||||||
if not ply.LadderTrace then
|
if not ply.LadderTrace then
|
||||||
ply.LadderTraceOut = {}
|
ply.LadderTraceOut = {}
|
||||||
|
|
||||||
ply.LadderTrace = {
|
ply.LadderTrace = {
|
||||||
mask = MASK_SHOT_HULL,
|
mask = MASK_SHOT_HULL,
|
||||||
collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT,
|
collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT,
|
||||||
|
@ -163,6 +167,7 @@ local function LadderThink(ply, mv, cmd, ladder)
|
||||||
|
|
||||||
local tr = ply.LadderTrace
|
local tr = ply.LadderTrace
|
||||||
local trout = ply.LadderTraceOut
|
local trout = ply.LadderTraceOut
|
||||||
|
|
||||||
ply.LadderTrace.start = mv:GetOrigin() + Vector(0, 0, 100) + ladder:GetAngles():Forward() * -35
|
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.endpos = ply.LadderTrace.start - Vector(0, 0, 150)
|
||||||
ply.LadderTrace.filter = ply
|
ply.LadderTrace.filter = ply
|
||||||
|
@ -174,8 +179,8 @@ local function LadderThink(ply, mv, cmd, ladder)
|
||||||
ply:SetLadderLerp(0)
|
ply:SetLadderLerp(0)
|
||||||
ply:SetLadderStartPos(mv:GetOrigin())
|
ply:SetLadderStartPos(mv:GetOrigin())
|
||||||
ply:SetLadderEndPos(trout.HitPos)
|
ply:SetLadderEndPos(trout.HitPos)
|
||||||
|
|
||||||
ply.LadderEnd = true
|
ply.LadderEnd = true
|
||||||
|
|
||||||
local event = ply:GetLadderHand() and "ladderexittoplefthand" or "ladderexittoprighthand"
|
local event = ply:GetLadderHand() and "ladderexittoplefthand" or "ladderexittoprighthand"
|
||||||
|
|
||||||
ParkourEvent(event, ply)
|
ParkourEvent(event, ply)
|
||||||
|
@ -261,18 +266,18 @@ function CreateLadder(pos, angy, mul)
|
||||||
ladderang[2] = angy
|
ladderang[2] = angy
|
||||||
|
|
||||||
if not mul then
|
if not mul then
|
||||||
local ledgedetect = nil
|
-- local ledgedetect = nil
|
||||||
maxheight = util.QuickTrace(pos, laddertraceup).HitPos
|
maxheight = util.QuickTrace(pos, laddertraceup).HitPos
|
||||||
|
|
||||||
maxheight:Sub(ladderang:Forward() * 10)
|
maxheight:Sub(ladderang:Forward() * 10)
|
||||||
|
|
||||||
maxheight = util.QuickTrace(maxheight, laddertracedown).HitPos.z
|
maxheight = util.QuickTrace(maxheight, laddertracedown).HitPos.z
|
||||||
|
|
||||||
mul = (maxheight - pos.z) / 125 + 0.1
|
mul = (maxheight - pos.z) / 125 + 0.1
|
||||||
end
|
end
|
||||||
|
|
||||||
local ladder = ents.Create("br_ladder")
|
local ladder = ents.Create("br_ladder")
|
||||||
|
|
||||||
pos:Add(ladderang:Forward() * 10)
|
pos:Add(ladderang:Forward() * 10)
|
||||||
|
|
||||||
ladder:SetPos(pos)
|
ladder:SetPos(pos)
|
||||||
ladder:SetAngles(ladderang)
|
ladder:SetAngles(ladderang)
|
||||||
ladder:Spawn()
|
ladder:Spawn()
|
||||||
|
@ -280,4 +285,4 @@ function CreateLadder(pos, angy, mul)
|
||||||
|
|
||||||
return ladder
|
return ladder
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,5 +1,5 @@
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
hook.Add("InitPostEntity", "JoinSync", function ()
|
hook.Add("InitPostEntity", "JoinSync", function()
|
||||||
net.Start("JoinSync")
|
net.Start("JoinSync")
|
||||||
net.SendToServer()
|
net.SendToServer()
|
||||||
end)
|
end)
|
||||||
|
@ -7,18 +7,19 @@ end
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
util.AddNetworkString("JoinSync")
|
util.AddNetworkString("JoinSync")
|
||||||
net.Receive("JoinSync", function (len, ply)
|
|
||||||
|
net.Receive("JoinSync", function(len, ply)
|
||||||
if not ply.Synced then
|
if not ply.Synced then
|
||||||
net.Start("BuildMode_Sync")
|
net.Start("BuildMode_Sync")
|
||||||
net.WriteFloat(Course_StartPos.x)
|
net.WriteFloat(Course_StartPos.x)
|
||||||
net.WriteFloat(Course_StartPos.y)
|
net.WriteFloat(Course_StartPos.y)
|
||||||
net.WriteFloat(Course_StartPos.z)
|
net.WriteFloat(Course_StartPos.z)
|
||||||
net.WriteFloat(Course_StartAng)
|
net.WriteFloat(Course_StartAng)
|
||||||
net.WriteString(Course_Name)
|
net.WriteString(Course_Name)
|
||||||
net.WriteString(Course_ID)
|
net.WriteString(Course_ID)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply.Synced = true
|
ply.Synced = true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
|
@ -1,7 +1,5 @@
|
||||||
local kickglitch = CreateConVar("Beatrun_KickGlitch", 1, {
|
local kickglitch = CreateConVar("Beatrun_KickGlitch", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||||
FCVAR_REPLICATED,
|
|
||||||
FCVAR_ARCHIVE
|
|
||||||
})
|
|
||||||
local tr = {}
|
local tr = {}
|
||||||
local tr_result = {}
|
local tr_result = {}
|
||||||
MELEE_WRRIGHT = 6
|
MELEE_WRRIGHT = 6
|
||||||
|
@ -10,66 +8,48 @@ MELEE_DROPKICK = 4
|
||||||
MELEE_AIRKICK = 3
|
MELEE_AIRKICK = 3
|
||||||
MELEE_SLIDEKICK = 2
|
MELEE_SLIDEKICK = 2
|
||||||
MELEE_PUNCH = 1
|
MELEE_PUNCH = 1
|
||||||
|
|
||||||
local meleedata = {
|
local meleedata = {
|
||||||
{
|
{
|
||||||
"meleeslide",
|
"meleeslide", 0.15, 1, function(ply, mv, cmd)
|
||||||
0.15,
|
|
||||||
1,
|
|
||||||
function (ply, mv, cmd)
|
|
||||||
ply:CLViewPunch(Angle(2, 0, 0))
|
ply:CLViewPunch(Angle(2, 0, 0))
|
||||||
end,
|
end,
|
||||||
angle_zero,
|
angle_zero, 20
|
||||||
20
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"meleeslide",
|
"meleeslide", 0.175, 0.6, function(ply, mv, cmd)
|
||||||
0.175,
|
|
||||||
0.6,
|
|
||||||
function (ply, mv, cmd)
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
ply:CLViewPunch(Angle(0.05, 0, -1))
|
ply:CLViewPunch(Angle(0.05, 0, -1))
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
ply:ViewPunch(Angle(0.1, 0, -1.5))
|
ply:ViewPunch(Angle(0.1, 0, -1.5))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
Angle(-4, 0, 0),
|
Angle(-4, 0, 0), 50, true
|
||||||
50,
|
|
||||||
true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"meleeairstill",
|
"meleeairstill", 0.1, 1, function(ply, mv, cmd)
|
||||||
0.1,
|
|
||||||
1,
|
|
||||||
function (ply, mv, cmd)
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
ply:CLViewPunch(Angle(0.5, 0, -0.1))
|
ply:CLViewPunch(Angle(0.5, 0, -0.1))
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
ply:ViewPunch(Angle(1, 0, -0.25))
|
ply:ViewPunch(Angle(1, 0, -0.25))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
Angle(-15, 0, -5),
|
Angle(-15, 0, -5), 50
|
||||||
50
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"meleeair",
|
"meleeair", 0.15, 1, function(ply, mv, cmd)
|
||||||
0.15,
|
|
||||||
1,
|
|
||||||
function (ply, mv, cmd)
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
ply:CLViewPunch(Angle(0.05, 0, -1))
|
ply:CLViewPunch(Angle(0.05, 0, -1))
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
ply:ViewPunch(Angle(0.1, 0, -1.5))
|
ply:ViewPunch(Angle(0.1, 0, -1.5))
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
Angle(-5, 0, -2.5),
|
Angle(-5, 0, -2.5), 50
|
||||||
50
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
meleedata[5] = {
|
meleedata[5] = {
|
||||||
"meleewrleft",
|
"meleewrleft", 0.2, 0.75, function(ply, mv, cmd)
|
||||||
0.2,
|
|
||||||
0.75,
|
|
||||||
function (ply, mv, cmd)
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
ply:CLViewPunch(Angle(0.075, 0, 1))
|
ply:CLViewPunch(Angle(0.075, 0, 1))
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
|
@ -90,14 +70,11 @@ meleedata[5] = {
|
||||||
ply:SetEyeAngles(ang)
|
ply:SetEyeAngles(ang)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
Angle(-5, 0, 2.5),
|
Angle(-5, 0, 2.5), 80
|
||||||
80
|
|
||||||
}
|
}
|
||||||
|
|
||||||
meleedata[6] = {
|
meleedata[6] = {
|
||||||
"meleewrright",
|
"meleewrright", 0.2, 0.75, function(ply, mv, cmd)
|
||||||
0.2,
|
|
||||||
0.75,
|
|
||||||
function (ply, mv, cmd)
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
ply:CLViewPunch(Angle(0.075, 0, -1))
|
ply:CLViewPunch(Angle(0.075, 0, -1))
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
|
@ -118,9 +95,9 @@ meleedata[6] = {
|
||||||
ply:SetEyeAngles(ang)
|
ply:SetEyeAngles(ang)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
Angle(-5, 0, -2.5),
|
Angle(-5, 0, -2.5), 80
|
||||||
80
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local doors = {
|
local doors = {
|
||||||
prop_door_rotating = true,
|
prop_door_rotating = true,
|
||||||
func_door_rotating = true
|
func_door_rotating = true
|
||||||
|
@ -131,14 +108,10 @@ local function KeyMelee(ply, mv)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function MeleeType(ply, mv, cmd)
|
local function MeleeType(ply, mv, cmd)
|
||||||
if IsValid(ply:GetZipline()) or ply:GetGrappling() or IsValid(ply:GetLadder()) then
|
if IsValid(ply:GetZipline()) or ply:GetGrappling() or IsValid(ply:GetLadder()) then return 0 end
|
||||||
return 0
|
|
||||||
end
|
|
||||||
|
|
||||||
if ply:GetWallrun() ~= 0 then
|
if ply:GetWallrun() ~= 0 then
|
||||||
if ply:GetWallrun() == 1 then
|
if ply:GetWallrun() == 1 then return ply:GetMelee() end
|
||||||
return ply:GetMelee()
|
|
||||||
end
|
|
||||||
|
|
||||||
ply:SetMelee(ply:GetWallrun() == 3 and MELEE_WRLEFT or MELEE_WRRIGHT)
|
ply:SetMelee(ply:GetWallrun() == 3 and MELEE_WRLEFT or MELEE_WRRIGHT)
|
||||||
elseif not ply:OnGround() then
|
elseif not ply:OnGround() then
|
||||||
|
@ -156,17 +129,15 @@ end
|
||||||
local function MeleeCheck(ply, mv, cmd)
|
local function MeleeCheck(ply, mv, cmd)
|
||||||
local melee = MeleeType(ply, mv, cmd)
|
local melee = MeleeType(ply, mv, cmd)
|
||||||
|
|
||||||
if melee == 0 then
|
if melee == 0 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ParkourEvent(meleedata[melee][1], ply)
|
ParkourEvent(meleedata[melee][1], ply)
|
||||||
|
|
||||||
ply:SetMeleeTime(CurTime() + meleedata[melee][2])
|
ply:SetMeleeTime(CurTime() + meleedata[melee][2])
|
||||||
ply:SetMeleeDelay(CurTime() + meleedata[melee][3])
|
ply:SetMeleeDelay(CurTime() + meleedata[melee][3])
|
||||||
|
|
||||||
ply.MeleeDir = mv:GetVelocity()
|
ply.MeleeDir = mv:GetVelocity()
|
||||||
ply.MeleeDir.z = 0
|
ply.MeleeDir.z = 0
|
||||||
|
|
||||||
ply.MeleeDir:Normalize()
|
ply.MeleeDir:Normalize()
|
||||||
|
|
||||||
if ply.MeleeDir:Length() < 1 then
|
if ply.MeleeDir:Length() < 1 then
|
||||||
|
@ -193,13 +164,15 @@ local function MeleeThink(ply, mv, cmd)
|
||||||
|
|
||||||
ply:LagCompensation(true)
|
ply:LagCompensation(true)
|
||||||
ply:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST, true)
|
ply:AnimRestartGesture(GESTURE_SLOT_ATTACK_AND_RELOAD, ACT_HL2MP_GESTURE_RANGE_ATTACK_FIST, true)
|
||||||
|
|
||||||
util.TraceHull(tr)
|
util.TraceHull(tr)
|
||||||
|
|
||||||
ply:LagCompensation(false)
|
ply:LagCompensation(false)
|
||||||
|
|
||||||
if ply:GetMelee() >= 5 then
|
if ply:GetMelee() >= 5 then
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
|
|
||||||
vel:Add(ply:GetWallrunDir() * 0.5 * vel:Length())
|
vel:Add(ply:GetWallrunDir() * 0.5 * vel:Length())
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
end
|
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
|
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()
|
local d = DamageInfo()
|
||||||
|
|
||||||
d:SetDamage(meleedata[ply:GetMelee()][6])
|
d:SetDamage(meleedata[ply:GetMelee()][6])
|
||||||
d:SetAttacker(ply)
|
d:SetAttacker(ply)
|
||||||
d:SetInflictor(ply)
|
d:SetInflictor(ply)
|
||||||
d:SetDamageType(DMG_CLUB)
|
d:SetDamageType(DMG_CLUB)
|
||||||
d:SetDamagePosition(tr.start)
|
d:SetDamagePosition(tr.start)
|
||||||
d:SetDamageForce(ply:EyeAngles():Forward() * 7000)
|
d:SetDamageForce(ply:EyeAngles():Forward() * 7000)
|
||||||
|
|
||||||
ent:TakeDamageInfo(d)
|
ent:TakeDamageInfo(d)
|
||||||
|
|
||||||
if SERVER and ent:GetClass() == "func_breakable_surf" then
|
if SERVER and ent:GetClass() == "func_breakable_surf" then
|
||||||
ent:Input("Shatter", nil, nil, Vector(0, 0, 250))
|
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:SetPos(tr_result.HitPos)
|
||||||
BLEH:SetAngles(Angle(0, 0, 0))
|
BLEH:SetAngles(Angle(0, 0, 0))
|
||||||
BLEH:SetModel("models/props_junk/wood_crate001a.mdl")
|
BLEH:SetModel("models/props_junk/wood_crate001a.mdl")
|
||||||
|
@ -237,7 +210,8 @@ local function MeleeThink(ply, mv, cmd)
|
||||||
BLEH:SetCollisionGroup(COLLISION_GROUP_WORLD)
|
BLEH:SetCollisionGroup(COLLISION_GROUP_WORLD)
|
||||||
BLEH:Spawn()
|
BLEH:Spawn()
|
||||||
BLEH:Activate()
|
BLEH:Activate()
|
||||||
timer.Simple(0.01, function ()
|
|
||||||
|
timer.Simple(0.01, function()
|
||||||
if BLEH and IsValid(BLEH) then
|
if BLEH and IsValid(BLEH) then
|
||||||
BLEH:Remove()
|
BLEH:Remove()
|
||||||
end
|
end
|
||||||
|
@ -250,9 +224,7 @@ local function MeleeThink(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
if doors[ent:GetClass()] then
|
if doors[ent:GetClass()] then
|
||||||
if ent:GetInternalVariable("m_bLocked") then
|
if ent:GetInternalVariable("m_bLocked") then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local speed = ent:GetInternalVariable("speed")
|
local speed = ent:GetInternalVariable("speed")
|
||||||
|
|
||||||
|
@ -263,17 +235,17 @@ local function MeleeThink(ply, mv, cmd)
|
||||||
|
|
||||||
ent:SetSaveValue("speed", ent.oldspeed * 4)
|
ent:SetSaveValue("speed", ent.oldspeed * 4)
|
||||||
ent:Use(ply)
|
ent:Use(ply)
|
||||||
|
|
||||||
ent.bashdelay = CurTime() + 1
|
ent.bashdelay = CurTime() + 1
|
||||||
|
|
||||||
ent:SetCycle(1)
|
ent:SetCycle(1)
|
||||||
ent:Fire("Lock")
|
ent:Fire("Lock")
|
||||||
timer.Simple(1, function ()
|
|
||||||
|
timer.Simple(1, function()
|
||||||
if IsValid(ent) then
|
if IsValid(ent) then
|
||||||
ent:SetSaveValue("speed", ent.oldspeed)
|
ent:SetSaveValue("speed", ent.oldspeed)
|
||||||
ent:Fire("Unlock")
|
ent:Fire("Unlock")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ent:EmitSound("Door.Barge")
|
ent:EmitSound("Door.Barge")
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
@ -289,7 +261,7 @@ local function MeleeThink(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "Melee", function (ply, mv, cmd)
|
hook.Add("SetupMove", "Melee", function(ply, mv, cmd)
|
||||||
if not ply:Alive() then
|
if not ply:Alive() then
|
||||||
ply:SetMeleeTime(0)
|
ply:SetMeleeTime(0)
|
||||||
ply:SetMelee(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 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
|
if kickglitch:GetBool() and ply:GetMelee() >= 5 and mv:KeyDown(IN_JUMP) and not ply:OnGround() then
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
|
|
||||||
vel:Mul(1.25)
|
vel:Mul(1.25)
|
||||||
|
|
||||||
vel.z = 300
|
vel.z = 300
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
ParkourEvent("jumpslow", ply)
|
ParkourEvent("jumpslow", ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -320,4 +290,4 @@ hook.Add("SetupMove", "Melee", function (ply, mv, cmd)
|
||||||
if ply:GetMeleeTime() ~= 0 then
|
if ply:GetMeleeTime() ~= 0 then
|
||||||
MeleeThink(ply, mv, cmd)
|
MeleeThink(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -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
|
if (game.SinglePlayer() or CLIENT and IsFirstTimePredicted()) and button == KEY_F4 then
|
||||||
ply:ConCommand("Beatrun_CourseMenu")
|
ply:ConCommand("Beatrun_CourseMenu")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -3,37 +3,20 @@ if SERVER then
|
||||||
|
|
||||||
util.AddNetworkString("SPParkourEvent")
|
util.AddNetworkString("SPParkourEvent")
|
||||||
|
|
||||||
local spawn = {
|
local spawn = {"PlayerGiveSWEP", "PlayerSpawnEffect", "PlayerSpawnNPC", "PlayerSpawnObject", "PlayerSpawnProp", "PlayerSpawnRagdoll", "PlayerSpawnSENT", "PlayerSpawnSWEP", "PlayerSpawnVehicle"}
|
||||||
"PlayerGiveSWEP",
|
|
||||||
"PlayerSpawnEffect",
|
|
||||||
"PlayerSpawnNPC",
|
|
||||||
"PlayerSpawnObject",
|
|
||||||
"PlayerSpawnProp",
|
|
||||||
"PlayerSpawnRagdoll",
|
|
||||||
"PlayerSpawnSENT",
|
|
||||||
"PlayerSpawnSWEP",
|
|
||||||
"PlayerSpawnVehicle"
|
|
||||||
}
|
|
||||||
|
|
||||||
local function BlockSpawn(ply)
|
local function BlockSpawn(ply)
|
||||||
if not ply:IsSuperAdmin() then
|
if not ply:IsSuperAdmin() then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, v in ipairs(spawn) do
|
for k, v in ipairs(spawn) do
|
||||||
hook.Add(v, "BlockSpawn", BlockSpawn)
|
hook.Add(v, "BlockSpawn", BlockSpawn)
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("IsSpawnpointSuitable", "NoSpawnFrag", function (ply)
|
hook.Add("IsSpawnpointSuitable", "NoSpawnFrag", function(ply) return true end)
|
||||||
return true
|
|
||||||
end)
|
|
||||||
hook.Add("AllowPlayerPickup", "AllowAdminsPickUp", function (ply, ent)
|
|
||||||
local sa = ply:IsSuperAdmin()
|
|
||||||
|
|
||||||
if not sa then
|
hook.Add("AllowPlayerPickup", "AllowAdminsPickUp", function(ply, ent)
|
||||||
return false
|
if not ply:IsSuperAdmin() then return false end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function meta:GTAB(minutes)
|
function meta:GTAB(minutes)
|
||||||
|
@ -43,7 +26,7 @@ if SERVER then
|
||||||
v:EmitSound("gtab.mp3", 0, 100, 1)
|
v:EmitSound("gtab.mp3", 0, 100, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
timer.Simple(7.5, function ()
|
timer.Simple(7.5, function()
|
||||||
if IsValid(self) and self:SteamID64() == ID then
|
if IsValid(self) and self:SteamID64() == ID then
|
||||||
self:Ban(minutes, "GTAB")
|
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)
|
CreateClientConVar("Beatrun_CPSave", 1, true, true, "Respawning during a course will go back to the last hit checkpoint", 0, 1)
|
||||||
end
|
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
|
if enabled and Course_Name ~= "" and ply:GetNW2Int("CPNum", 1) ~= -1 then
|
||||||
ply:SetNW2Int("CPNum", -1)
|
ply:SetNW2Int("CPNum", -1)
|
||||||
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
notification.AddLegacy("Noclip Enabled: Respawn to run the course", NOTIFY_ERROR, 2)
|
notification.AddLegacy("Noclip Enabled: Respawn to run the course", NOTIFY_ERROR, 2)
|
||||||
elseif SERVER and game.SinglePlayer() then
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
if enabled and (GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT)) then
|
if enabled and (GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT)) then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function ParkourEvent(event, ply, ignorepred)
|
function ParkourEvent(event, ply, ignorepred)
|
||||||
|
@ -82,13 +63,13 @@ function ParkourEvent(event, ply, ignorepred)
|
||||||
|
|
||||||
if game.SinglePlayer() and SERVER then
|
if game.SinglePlayer() and SERVER then
|
||||||
net.Start("SPParkourEvent")
|
net.Start("SPParkourEvent")
|
||||||
net.WriteString(event)
|
net.WriteString(event)
|
||||||
net.Broadcast()
|
net.Broadcast()
|
||||||
end
|
end
|
||||||
end
|
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
|
if ply:OnGround() and not ply:GetWasOnGround() and mv:GetVelocity():Length() > 50 and ply:GetMEMoveLimit() < 375 then
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
|
@ -141,19 +122,17 @@ hook.Add("SetupMove", "JumpDetect", function (ply, mv, cmd)
|
||||||
|
|
||||||
ply:SetWasOnGround(ply:OnGround())
|
ply:SetWasOnGround(ply:OnGround())
|
||||||
end)
|
end)
|
||||||
hook.Add("CanProperty", "BlockProperty", function (ply)
|
|
||||||
if not ply:IsSuperAdmin() then
|
hook.Add("CanProperty", "BlockProperty", function(ply)
|
||||||
return false
|
if not ply:IsSuperAdmin() then return false end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
hook.Add("CanDrive", "BlockDrive", function (ply)
|
|
||||||
if not ply:IsSuperAdmin() then
|
hook.Add("CanDrive", "BlockDrive", function(ply)
|
||||||
return false
|
if not ply:IsSuperAdmin() then return false end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if CLIENT and game.SinglePlayer() then
|
if CLIENT and game.SinglePlayer() then
|
||||||
net.Receive("SPParkourEvent", function ()
|
net.Receive("SPParkourEvent", function()
|
||||||
local event = net.ReadString()
|
local event = net.ReadString()
|
||||||
|
|
||||||
hook.Run("OnParkour", event, LocalPlayer())
|
hook.Run("OnParkour", event, LocalPlayer())
|
||||||
|
@ -161,7 +140,7 @@ if CLIENT and game.SinglePlayer() then
|
||||||
end
|
end
|
||||||
|
|
||||||
if SERVER then
|
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
|
if IsValid(ent) and ent:GetClass() == "func_reflective_glass" then
|
||||||
SafeRemoveEntityDelayed(ent, 0.1)
|
SafeRemoveEntityDelayed(ent, 0.1)
|
||||||
end
|
end
|
||||||
|
@ -172,9 +151,7 @@ if CLIENT then
|
||||||
local blur = Material("pp/blurscreen")
|
local blur = Material("pp/blurscreen")
|
||||||
|
|
||||||
function draw_blur(a, d)
|
function draw_blur(a, d)
|
||||||
if render.GetDXLevel() < 90 then
|
if render.GetDXLevel() < 90 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
surface.SetDrawColor(255, 255, 255)
|
surface.SetDrawColor(255, 255, 255)
|
||||||
surface.SetMaterial(blur)
|
surface.SetMaterial(blur)
|
||||||
|
@ -189,12 +166,11 @@ if CLIENT then
|
||||||
|
|
||||||
local draw_blur = draw_blur
|
local draw_blur = draw_blur
|
||||||
local impactblurlerp = 0
|
local impactblurlerp = 0
|
||||||
local lastintensity = 0
|
-- local lastintensity = 0
|
||||||
|
|
||||||
hook.Add("HUDPaint", "DrawImpactBlur", function ()
|
hook.Add("HUDPaint", "DrawImpactBlur", function()
|
||||||
if impactblurlerp > 0 then
|
if impactblurlerp > 0 then
|
||||||
impactblurlerp = math.Approach(impactblurlerp, 0, 25 * FrameTime())
|
impactblurlerp = math.Approach(impactblurlerp, 0, 25 * FrameTime())
|
||||||
|
|
||||||
draw_blur(math.min(impactblurlerp, 10), 4)
|
draw_blur(math.min(impactblurlerp, 10), 4)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -203,4 +179,4 @@ if CLIENT then
|
||||||
impactblurlerp = intensity
|
impactblurlerp = intensity
|
||||||
lastintensity = intensity
|
lastintensity = intensity
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -6,8 +6,10 @@ local function SwingbarCheck(ply, mv, cmd)
|
||||||
mins.x = mins.x * 1.5
|
mins.x = mins.x * 1.5
|
||||||
maxs.y = maxs.y * 1.5
|
maxs.y = maxs.y * 1.5
|
||||||
mins.y = mins.y * 1.5
|
mins.y = mins.y * 1.5
|
||||||
|
|
||||||
local tr = ply.Monkey_tr
|
local tr = ply.Monkey_tr
|
||||||
local trout = ply.Monkey_trout
|
local trout = ply.Monkey_trout
|
||||||
|
|
||||||
tr.start = mv:GetOrigin()
|
tr.start = mv:GetOrigin()
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.maxs = maxs
|
tr.maxs = maxs
|
||||||
|
@ -22,9 +24,7 @@ local function SwingbarCheck(ply, mv, cmd)
|
||||||
local dot = cmd:GetViewAngles():Forward():Dot(swingbar:GetAngles():Forward())
|
local dot = cmd:GetViewAngles():Forward():Dot(swingbar:GetAngles():Forward())
|
||||||
local dir = dot > 0 and true or false
|
local dir = dot > 0 and true or false
|
||||||
|
|
||||||
if math.abs(dot) < 0.7 then
|
if math.abs(dot) < 0.7 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
swingbar:SetPredictable(true)
|
swingbar:SetPredictable(true)
|
||||||
|
@ -39,7 +39,9 @@ local function SwingbarCheck(ply, mv, cmd)
|
||||||
ply:SetSBPeak(0)
|
ply:SetSBPeak(0)
|
||||||
ply:SetDive(false)
|
ply:SetDive(false)
|
||||||
ply:SetCrouchJump(false)
|
ply:SetCrouchJump(false)
|
||||||
|
|
||||||
ParkourEvent("swingbar", ply)
|
ParkourEvent("swingbar", ply)
|
||||||
|
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
|
||||||
if mv:KeyDown(IN_FORWARD) or mv:GetVelocity():Length() > 150 then
|
if mv:KeyDown(IN_FORWARD) or mv:GetVelocity():Length() > 150 then
|
||||||
|
@ -55,7 +57,7 @@ local function SwingbarCheck(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
local radius = 30
|
local radius = 30
|
||||||
local red = Color(255, 0, 0, 200)
|
-- local red = Color(255, 0, 0, 200)
|
||||||
local circlepos = Vector()
|
local circlepos = Vector()
|
||||||
local axis = Vector(0, 0, 1)
|
local axis = Vector(0, 0, 1)
|
||||||
local dummyvec = Vector(1000, 1000, 1000)
|
local dummyvec = Vector(1000, 1000, 1000)
|
||||||
|
@ -95,6 +97,7 @@ local function SwingbarThink(ply, mv, cmd)
|
||||||
circlepos:Rotate(ang)
|
circlepos:Rotate(ang)
|
||||||
|
|
||||||
pos = pos + circlepos
|
pos = pos + circlepos
|
||||||
|
|
||||||
local origin = startlerp < 1 and LerpVector(startlerp, mv:GetOrigin(), pos) or pos
|
local origin = startlerp < 1 and LerpVector(startlerp, mv:GetOrigin(), pos) or pos
|
||||||
|
|
||||||
ply:SetSBStartLerp(math.min(startlerp + 10 * FrameTime(), 1))
|
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()))
|
ply:SetSBOffsetSpeed(math.Approach(math.min(ply:GetSBOffsetSpeed(), 0), -1, math.abs(ply:GetSBOffset() / 100 - 1) * 5 * FrameTime()))
|
||||||
else
|
else
|
||||||
local a = (ply:GetSBOffset() - 50) / 50
|
local a = (ply:GetSBOffset() - 50) / 50
|
||||||
|
|
||||||
ply:SetSBOffsetSpeed(math.Approach(ply:GetSBOffsetSpeed(), 0, a * 5 * FrameTime()))
|
ply:SetSBOffsetSpeed(math.Approach(ply:GetSBOffsetSpeed(), 0, a * 5 * FrameTime()))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -143,6 +145,7 @@ local function SwingbarThink(ply, mv, cmd)
|
||||||
|
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
local vel = ang:Forward() * 125 * ply:GetSBOffsetSpeed()
|
local vel = ang:Forward() * 125 * ply:GetSBOffsetSpeed()
|
||||||
vel.z = ply:GetSBOffset() * 2
|
vel.z = ply:GetSBOffset() * 2
|
||||||
|
|
||||||
|
@ -150,7 +153,9 @@ local function SwingbarThink(ply, mv, cmd)
|
||||||
ply:SetSwingbarLast(ply:GetSwingbar())
|
ply:SetSwingbarLast(ply:GetSwingbar())
|
||||||
ply:SetSwingbar(nil)
|
ply:SetSwingbar(nil)
|
||||||
ply:SetWallrunDir(dummyvec)
|
ply:SetWallrunDir(dummyvec)
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
ply:SetSBDelay(CurTime() + 1)
|
ply:SetSBDelay(CurTime() + 1)
|
||||||
|
|
||||||
if CLIENT_IFTP() or game.SinglePlayer() then
|
if CLIENT_IFTP() or game.SinglePlayer() then
|
||||||
|
@ -184,4 +189,4 @@ local function Swingbar(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "Swingbar", Swingbar)
|
hook.Add("SetupMove", "Swingbar", Swingbar)
|
|
@ -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")
|
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
|
end
|
||||||
|
|
||||||
local PuristModeForce = CreateConVar("Beatrun_PuristModeForce", 0, {
|
local PuristModeForce = CreateConVar("Beatrun_PuristModeForce", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "Force players to adhere to purist rules", 0, 1)
|
||||||
FCVAR_REPLICATED,
|
|
||||||
FCVAR_ARCHIVE
|
|
||||||
}, "Force players to adhere to purist rules", 0, 1)
|
|
||||||
|
|
||||||
local function PuristMove(ply, mv, cmd)
|
local function PuristMove(ply, mv, cmd)
|
||||||
if not ply:OnGround() and not ply:GetGrappling() then
|
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
|
if (purist > 0 or PuristModeForce:GetBool()) and ply:WaterLevel() == 0 then
|
||||||
mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.001)
|
mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.001)
|
||||||
mv:SetSideSpeed(mv:GetSideSpeed() * 0.001)
|
mv:SetSideSpeed(mv:GetSideSpeed() * 0.001)
|
||||||
|
|
||||||
cmd:SetForwardMove(cmd:GetForwardMove() * 0.001)
|
cmd:SetForwardMove(cmd:GetForwardMove() * 0.001)
|
||||||
cmd:SetSideMove(cmd:GetSideMove() * 0.001)
|
cmd:SetSideMove(cmd:GetSideMove() * 0.001)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "PuristMove", PuristMove)
|
hook.Add("SetupMove", "PuristMove", PuristMove)
|
|
@ -3,13 +3,11 @@ if CLIENT then
|
||||||
end
|
end
|
||||||
|
|
||||||
function DoJumpTurn(lookbehind)
|
function DoJumpTurn(lookbehind)
|
||||||
if not LocalPlayer():Alive() then
|
if not LocalPlayer():Alive() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
VMLegs:Remove()
|
VMLegs:Remove()
|
||||||
BodyAnim:SetSequence("jumpturnfly")
|
|
||||||
|
|
||||||
|
BodyAnim:SetSequence("jumpturnfly")
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
BodyAnimSpeed = 1
|
BodyAnimSpeed = 1
|
||||||
BodyLimitX = 40
|
BodyLimitX = 40
|
||||||
|
@ -17,13 +15,12 @@ function DoJumpTurn(lookbehind)
|
||||||
|
|
||||||
if lookbehind then
|
if lookbehind then
|
||||||
local vel = LocalPlayer():GetVelocity()
|
local vel = LocalPlayer():GetVelocity()
|
||||||
|
|
||||||
vel:Normalize()
|
vel:Normalize()
|
||||||
|
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
local ang = vel:Angle()
|
|
||||||
|
|
||||||
|
local ang = vel:Angle()
|
||||||
ang:RotateAroundAxis(Vector(0, 0, 1), 180)
|
ang:RotateAroundAxis(Vector(0, 0, 1), 180)
|
||||||
|
|
||||||
BodyAnim:SetAngles(ang)
|
BodyAnim:SetAngles(ang)
|
||||||
|
|
||||||
LocalPlayer().OrigEyeAng = ang
|
LocalPlayer().OrigEyeAng = ang
|
||||||
|
@ -31,9 +28,7 @@ function DoJumpTurn(lookbehind)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DoJumpTurnStand()
|
function DoJumpTurnStand()
|
||||||
if not LocalPlayer():Alive() then
|
if not LocalPlayer():Alive() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
VMLegs:Remove()
|
VMLegs:Remove()
|
||||||
|
|
||||||
|
@ -43,6 +38,7 @@ function DoJumpTurnStand()
|
||||||
BodyAnim:SetSequence("jumpturnlandstandgun")
|
BodyAnim:SetSequence("jumpturnlandstandgun")
|
||||||
else
|
else
|
||||||
BodyAnim:SetSequence("jumpturnlandstand")
|
BodyAnim:SetSequence("jumpturnlandstand")
|
||||||
|
|
||||||
ParkourEvent("jumpturnlandstand", LocalPlayer(), game.SinglePlayer())
|
ParkourEvent("jumpturnlandstand", LocalPlayer(), game.SinglePlayer())
|
||||||
end
|
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
|
if mv:KeyPressed(IN_JUMP) and (mv:KeyDown(IN_MOVELEFT) or mv:KeyDown(IN_MOVERIGHT)) then
|
||||||
keypressed = true
|
keypressed = true
|
||||||
|
|
||||||
ply.vwrturn = mv:KeyDown(IN_MOVERIGHT) and 1 or -1
|
ply.vwrturn = mv:KeyDown(IN_MOVERIGHT) and 1 or -1
|
||||||
|
|
||||||
local eyeang = cmd:GetViewAngles()
|
local eyeang = cmd:GetViewAngles()
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
ply.vwrdot = -ply:GetWallrunDir():Dot(eyeang:Forward())
|
|
||||||
|
|
||||||
|
ply.vwrdot = -ply:GetWallrunDir():Dot(eyeang:Forward())
|
||||||
ply:SetWallrunTime(CurTime())
|
ply:SetWallrunTime(CurTime())
|
||||||
ply:SetQuickturn(true)
|
ply:SetQuickturn(true)
|
||||||
ply:SetQuickturnTime(CurTime())
|
ply:SetQuickturnTime(CurTime())
|
||||||
|
@ -84,8 +82,10 @@ local function Quickturn(ply, mv, cmd)
|
||||||
local eyedir = cmd:GetViewAngles()
|
local eyedir = cmd:GetViewAngles()
|
||||||
eyedir.x = 0
|
eyedir.x = 0
|
||||||
eyedir = eyedir:Forward()
|
eyedir = eyedir:Forward()
|
||||||
|
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
|
|
||||||
local lookahead = vel:GetNormalized():Dot(eyedir) >= 0.85
|
local lookahead = vel:GetNormalized():Dot(eyedir) >= 0.85
|
||||||
local lookbehind = vel:GetNormalized():Dot(eyedir) < -0.5
|
local lookbehind = vel:GetNormalized():Dot(eyedir) < -0.5
|
||||||
|
|
||||||
|
@ -100,9 +100,7 @@ local function Quickturn(ply, mv, cmd)
|
||||||
|
|
||||||
ply:SetJumpTurn(true)
|
ply:SetJumpTurn(true)
|
||||||
|
|
||||||
if lookbehind then
|
if lookbehind then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ply:ViewPunch(Angle(2.5, 0, 5))
|
ply:ViewPunch(Angle(2.5, 0, 5))
|
||||||
end
|
end
|
||||||
|
@ -121,9 +119,7 @@ local function Quickturn(ply, mv, cmd)
|
||||||
usingrh = activewep:GetClass() == "runnerhands"
|
usingrh = activewep:GetClass() == "runnerhands"
|
||||||
end
|
end
|
||||||
|
|
||||||
if not usingrh and ply:GetWallrun() >= 2 then
|
if not usingrh and ply:GetWallrun() >= 2 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ply:SetQuickturn(true)
|
ply:SetQuickturn(true)
|
||||||
ply:SetQuickturnTime(CurTime())
|
ply:SetQuickturnTime(CurTime())
|
||||||
|
@ -138,7 +134,6 @@ local function Quickturn(ply, mv, cmd)
|
||||||
BodyLimitY = 180
|
BodyLimitY = 180
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
BodyAnimSpeed = 2
|
BodyAnimSpeed = 2
|
||||||
|
|
||||||
BodyAnim:SetSequence("wallrunverticalturn")
|
BodyAnim:SetSequence("wallrunverticalturn")
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
ply:SendLua("BodyLimitX=90 BodyLimitY=180 BodyAnimCycle=0 BodyAnim:SetSequence(\"wallrunverticalturn\")")
|
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:SetSideSpeed(0)
|
||||||
mv:SetUpSpeed(0)
|
mv:SetUpSpeed(0)
|
||||||
mv:SetButtons(0)
|
mv:SetButtons(0)
|
||||||
|
|
||||||
cmd:ClearMovement()
|
cmd:ClearMovement()
|
||||||
|
|
||||||
if not ply:OnGround() and ply:GetMoveType() ~= MOVETYPE_NOCLIP and ply:WaterLevel() < 3 then
|
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 diff = CurTime() - ply:GetQuickturnTime()
|
||||||
local lerptime = diff * 6.5
|
local lerptime = diff * 6.5
|
||||||
local lerp = Lerp(math.min(lerptime, 1), ply:GetQuickturnAng().y, target.y)
|
local lerp = Lerp(math.min(lerptime, 1), ply:GetQuickturnAng().y, target.y)
|
||||||
|
|
||||||
target.y = lerp
|
target.y = lerp
|
||||||
|
|
||||||
if CLIENT_IFTP() or game.SinglePlayer() then
|
if CLIENT_IFTP() or game.SinglePlayer() then
|
||||||
|
@ -247,4 +244,4 @@ local function Quickturn(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "Quickturn", Quickturn)
|
hook.Add("SetupMove", "Quickturn", Quickturn)
|
|
@ -3,13 +3,8 @@ if SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
function ReplayCmd(ply, cmd)
|
function ReplayCmd(ply, cmd)
|
||||||
if not ply.ReplayRecording then
|
if not ply.ReplayRecording then return end
|
||||||
return
|
if cmd:TickCount() == 0 then return end
|
||||||
end
|
|
||||||
|
|
||||||
if cmd:TickCount() == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ply.ReplayFirstTick and cmd:TickCount() ~= 0 then
|
if not ply.ReplayFirstTick and cmd:TickCount() ~= 0 then
|
||||||
ply.ReplayFirstTick = cmd:TickCount()
|
ply.ReplayFirstTick = cmd:TickCount()
|
||||||
|
@ -26,19 +21,9 @@ function ReplayCmd(ply, cmd)
|
||||||
local curtick = cmd:TickCount() - ply.ReplayFirstTick + 1
|
local curtick = cmd:TickCount() - ply.ReplayFirstTick + 1
|
||||||
|
|
||||||
if ang == 0 then
|
if ang == 0 then
|
||||||
ply.ReplayTicks[curtick] = {
|
ply.ReplayTicks[curtick] = {cmd:GetButtons(), cmd:GetForwardMove(), cmd:GetSideMove()}
|
||||||
cmd:GetButtons(),
|
|
||||||
cmd:GetForwardMove(),
|
|
||||||
cmd:GetSideMove()
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
ply.ReplayTicks[curtick] = {
|
ply.ReplayTicks[curtick] = {cmd:GetButtons(), ang.x, ang.y, cmd:GetForwardMove(), cmd:GetSideMove()}
|
||||||
cmd:GetButtons(),
|
|
||||||
ang.x,
|
|
||||||
ang.y,
|
|
||||||
cmd:GetForwardMove(),
|
|
||||||
cmd:GetSideMove()
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if curtick > 23760 then
|
if curtick > 23760 then
|
||||||
|
@ -51,13 +36,8 @@ end
|
||||||
hook.Add("StartCommand", "ReplayStart", ReplayCmd)
|
hook.Add("StartCommand", "ReplayStart", ReplayCmd)
|
||||||
|
|
||||||
function ReplayStart(ply)
|
function ReplayStart(ply)
|
||||||
if not game.SinglePlayer() then
|
if not game.SinglePlayer() then return end
|
||||||
return
|
if ply.InReplay then return end
|
||||||
end
|
|
||||||
|
|
||||||
if ply.InReplay then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
print("Starting Replay")
|
print("Starting Replay")
|
||||||
|
|
||||||
|
@ -69,26 +49,17 @@ function ReplayStart(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ReplayStop(ply, debugdump)
|
function ReplayStop(ply, debugdump)
|
||||||
if not game.SinglePlayer() then
|
if not game.SinglePlayer() then return end
|
||||||
return
|
if not ply.ReplayTicks then return end
|
||||||
end
|
if ply.InReplay then return end
|
||||||
|
|
||||||
if not ply.ReplayTicks then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if ply.InReplay then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
print("Ending Replay (" .. #ply.ReplayTicks .. "ticks)")
|
print("Ending Replay (" .. #ply.ReplayTicks .. "ticks)")
|
||||||
|
|
||||||
ply.InReplay = false
|
ply.InReplay = false
|
||||||
ply.ReplayRecording = false
|
ply.ReplayRecording = false
|
||||||
local debugdata = {
|
|
||||||
ply.ReplayStartPos,
|
local debugdata = {ply.ReplayStartPos, ply.ReplayTicks}
|
||||||
ply.ReplayTicks
|
|
||||||
}
|
|
||||||
local replay = util.Compress(util.TableToJSON(debugdata))
|
local replay = util.Compress(util.TableToJSON(debugdata))
|
||||||
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||||
|
|
||||||
|
@ -99,15 +70,11 @@ end
|
||||||
local RFF = true
|
local RFF = true
|
||||||
|
|
||||||
function ReplayPlayback(ply, cmd)
|
function ReplayPlayback(ply, cmd)
|
||||||
if not ply.InReplay or not ply.ReplayTicks then
|
if not ply.InReplay or not ply.ReplayTicks then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local cmdtc = cmd:TickCount()
|
local cmdtc = cmd:TickCount()
|
||||||
|
|
||||||
if cmdtc == 0 then
|
if cmdtc == 0 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ply.ReplayFirstTick then
|
if not ply.ReplayFirstTick then
|
||||||
ply.ReplayFirstTick = cmdtc
|
ply.ReplayFirstTick = cmdtc
|
||||||
|
@ -164,31 +131,31 @@ function ReplayPlayback(ply, cmd)
|
||||||
|
|
||||||
if TUTORIALMODE then
|
if TUTORIALMODE then
|
||||||
net.Start("ReplayTutorialPos")
|
net.Start("ReplayTutorialPos")
|
||||||
net.WriteVector(ply.ReplayStartPos)
|
net.WriteVector(ply.ReplayStartPos)
|
||||||
net.SendToServer()
|
net.SendToServer()
|
||||||
|
|
||||||
TutorialClearEvents()
|
TutorialClearEvents()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ReplaySendToClient(ply)
|
function ReplaySendToClient(ply)
|
||||||
if not game.SinglePlayer() then
|
if not game.SinglePlayer() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local replaydata = util.JSONToTable(util.Decompress(file.Read("beatrun/replays/" .. game.GetMap() .. "/replaydump.txt", "DATA")))
|
local replaydata = util.JSONToTable(util.Decompress(file.Read("beatrun/replays/" .. game.GetMap() .. "/replaydump.txt", "DATA")))
|
||||||
|
|
||||||
ply.ReplayFirstTick = false
|
ply.ReplayFirstTick = false
|
||||||
ply.ReplayStartPos = replaydata[1]
|
ply.ReplayStartPos = replaydata[1]
|
||||||
ply.ReplayTicks = replaydata[2]
|
ply.ReplayTicks = replaydata[2]
|
||||||
|
|
||||||
ply:SetNWBool("InReplay", true)
|
ply:SetNWBool("InReplay", true)
|
||||||
|
|
||||||
net.Start("ReplaySendToClient")
|
net.Start("ReplaySendToClient")
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply.InReplay = true
|
ply.InReplay = true
|
||||||
|
|
||||||
ply:SetPos(ply.ReplayStartPos)
|
ply:SetPos(ply.ReplayStartPos)
|
||||||
ply:SetVelocity(vector_origin)
|
ply:SetVelocity(vector_origin)
|
||||||
|
|
||||||
hook.Add("StartCommand", "ReplayPlay", ReplayPlayback)
|
hook.Add("StartCommand", "ReplayPlay", ReplayPlayback)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -220,23 +187,25 @@ if CLIENT then
|
||||||
surface.SetTextPos(5, ScrH() * 0.975)
|
surface.SetTextPos(5, ScrH() * 0.975)
|
||||||
|
|
||||||
local text = TUTORIALMODE and "" or "*Clientside replay: may not be accurate "
|
local text = TUTORIALMODE and "" or "*Clientside replay: may not be accurate "
|
||||||
|
|
||||||
surface.DrawText(text .. tickcount .. "/" .. #LocalPlayer().ReplayTicks)
|
surface.DrawText(text .. tickcount .. "/" .. #LocalPlayer().ReplayTicks)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ReplayBegin()
|
function ReplayBegin()
|
||||||
LocalPlayer().InReplay = true
|
LocalPlayer().InReplay = true
|
||||||
|
|
||||||
RFF = CurTime() + 1
|
RFF = CurTime() + 1
|
||||||
|
|
||||||
hook.Add("StartCommand", "ReplayPlay", ReplayPlayback)
|
hook.Add("StartCommand", "ReplayPlay", ReplayPlayback)
|
||||||
hook.Add("RenderScreenspaceEffects", "BeatrunReplayVision", BeatrunReplayVision)
|
hook.Add("RenderScreenspaceEffects", "BeatrunReplayVision", BeatrunReplayVision)
|
||||||
hook.Add("HUDPaint", "BeatrunReplayHUD", BeatrunReplayHUD)
|
hook.Add("HUDPaint", "BeatrunReplayHUD", BeatrunReplayHUD)
|
||||||
|
|
||||||
surface.PlaySound("friends/friend_join.wav")
|
surface.PlaySound("friends/friend_join.wav")
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Receive("ReplayRequest", ReplayBegin)
|
net.Receive("ReplayRequest", ReplayBegin)
|
||||||
net.Receive("ReplaySendToClient", function (length)
|
|
||||||
|
net.Receive("ReplaySendToClient", function(length)
|
||||||
if length < 100 then
|
if length < 100 then
|
||||||
LocalPlayer().ReplayTicks = util.JSONToTable(util.Decompress(file.Read("beatrun/replays/" .. game.GetMap() .. "/replaydump.txt", "DATA")))[2]
|
LocalPlayer().ReplayTicks = util.JSONToTable(util.Decompress(file.Read("beatrun/replays/" .. game.GetMap() .. "/replaydump.txt", "DATA")))[2]
|
||||||
else
|
else
|
||||||
|
@ -244,7 +213,6 @@ if CLIENT then
|
||||||
end
|
end
|
||||||
|
|
||||||
LocalPlayer().ReplayFirstTick = false
|
LocalPlayer().ReplayFirstTick = false
|
||||||
|
|
||||||
ReplayBegin()
|
ReplayBegin()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -258,6 +226,6 @@ function ReplayCancel(ply)
|
||||||
ply.ReplayFirstTick = false
|
ply.ReplayFirstTick = false
|
||||||
|
|
||||||
net.Start("ReplayRequest")
|
net.Start("ReplayRequest")
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.SendToServer()
|
net.SendToServer()
|
||||||
end
|
end
|
|
@ -1,7 +1,7 @@
|
||||||
local yaw = 0
|
local yaw = 0
|
||||||
local pitch = 0
|
local pitch = 0
|
||||||
|
|
||||||
hook.Add("CreateMove", "Rope", function (cmd)
|
hook.Add("CreateMove", "Rope", function(cmd)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local vtl = viewtiltlerp
|
local vtl = viewtiltlerp
|
||||||
|
|
||||||
|
@ -15,16 +15,22 @@ hook.Add("CreateMove", "Rope", function (cmd)
|
||||||
|
|
||||||
local ang = LocalPlayer():EyeAngles()
|
local ang = LocalPlayer():EyeAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
local grapplepos = LocalPlayer():GetGrapplePos()
|
local grapplepos = LocalPlayer():GetGrapplePos()
|
||||||
local vel = LocalPlayer():GetVelocity()
|
local vel = LocalPlayer():GetVelocity()
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
|
|
||||||
velf = vel:Dot(ang:Forward()) * 80
|
velf = vel:Dot(ang:Forward()) * 80
|
||||||
velr = vel:Dot(ang:Right()) * 80
|
velr = vel:Dot(ang:Right()) * 80
|
||||||
|
|
||||||
grapplepos.z = 0
|
grapplepos.z = 0
|
||||||
|
|
||||||
local mul = (grapplepos - LocalPlayer():EyePos()):Dot(ang:Forward()) > 0 and 1 or -1
|
local mul = (grapplepos - LocalPlayer():EyePos()):Dot(ang:Forward()) > 0 and 1 or -1
|
||||||
grapplepos = vel * mul
|
grapplepos = vel * mul
|
||||||
|
|
||||||
local y = math.Clamp(-grapplepos:Dot(ang:Forward()), -90, 90)
|
local y = math.Clamp(-grapplepos:Dot(ang:Forward()), -90, 90)
|
||||||
local p = math.Clamp(-grapplepos:Dot(ang:Right()), -90, 90)
|
local p = math.Clamp(-grapplepos:Dot(ang:Right()), -90, 90)
|
||||||
|
|
||||||
pitch = Lerp(FrameTime() * 1.5, pitch, p)
|
pitch = Lerp(FrameTime() * 1.5, pitch, p)
|
||||||
yaw = Lerp(FrameTime() * 1.5, yaw, y)
|
yaw = Lerp(FrameTime() * 1.5, yaw, y)
|
||||||
|
|
||||||
|
@ -34,4 +40,4 @@ hook.Add("CreateMove", "Rope", function (cmd)
|
||||||
BodyAnimArmCopy:SetPoseParameter("rope_pitch", pitch)
|
BodyAnimArmCopy:SetPoseParameter("rope_pitch", pitch)
|
||||||
|
|
||||||
viewtiltlerp.z = -pitch * 0.1
|
viewtiltlerp.z = -pitch * 0.1
|
||||||
end)
|
end)
|
|
@ -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
|
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)
|
ply:SetSafetyRollKeyTime(CurTime() + 0.5)
|
||||||
|
|
||||||
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_DUCK)))
|
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_DUCK)))
|
||||||
end
|
end
|
||||||
|
|
||||||
if CurTime() < ply:GetSafetyRollTime() then
|
if CurTime() < ply:GetSafetyRollTime() then
|
||||||
ply.FootstepLand = false
|
ply.FootstepLand = false
|
||||||
|
|
||||||
local ang = ply:GetSafetyRollAng()
|
local ang = ply:GetSafetyRollAng()
|
||||||
|
|
||||||
mv:SetSideSpeed(0)
|
mv:SetSideSpeed(0)
|
||||||
|
@ -25,6 +27,7 @@ local function SafetyRollThink(ply, mv, cmd)
|
||||||
vel.y = 0
|
vel.y = 0
|
||||||
|
|
||||||
mv:SetVelocity(ply:GetSafetyRollAng():Forward() * 200 + vel)
|
mv:SetVelocity(ply:GetSafetyRollAng():Forward() * 200 + vel)
|
||||||
|
|
||||||
ply:SetMEMoveLimit(400)
|
ply:SetMEMoveLimit(400)
|
||||||
else
|
else
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
@ -45,7 +48,7 @@ local roll = {
|
||||||
AnimString = "rollanim"
|
AnimString = "rollanim"
|
||||||
}
|
}
|
||||||
|
|
||||||
net.Receive("RollAnimSP", function ()
|
net.Receive("RollAnimSP", function()
|
||||||
if net.ReadBool() then
|
if net.ReadBool() then
|
||||||
roll.AnimString = "land"
|
roll.AnimString = "land"
|
||||||
roll.animmodelstring = "mirroranim"
|
roll.animmodelstring = "mirroranim"
|
||||||
|
@ -64,7 +67,8 @@ net.Receive("RollAnimSP", function ()
|
||||||
RemoveBodyAnim()
|
RemoveBodyAnim()
|
||||||
StartBodyAnim(roll)
|
StartBodyAnim(roll)
|
||||||
end)
|
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
|
if ply:GetJumpTurn() and ply:OnGround() and mv:KeyPressed(IN_BACK) then
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
|
|
||||||
|
@ -96,18 +100,20 @@ hook.Add("SetupMove", "EvadeRoll", function (ply, mv, cmd)
|
||||||
StartBodyAnim(roll)
|
StartBodyAnim(roll)
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("RollAnimSP")
|
net.Start("RollAnimSP")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
hook.Add("OnPlayerHitGround", "SafetyRoll", function (ply, water, floater, speed)
|
|
||||||
|
hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
|
||||||
local tr = {
|
local tr = {
|
||||||
filter = ply,
|
filter = ply,
|
||||||
start = ply:GetPos()
|
start = ply:GetPos()
|
||||||
}
|
}
|
||||||
tr.endpos = tr.start - Vector(0, 0, 150)
|
tr.endpos = tr.start - Vector(0, 0, 150)
|
||||||
|
|
||||||
local out = util.TraceLine(tr)
|
local out = util.TraceLine(tr)
|
||||||
local normal = out.HitNormal
|
local normal = out.HitNormal
|
||||||
local sang = normal:Angle()
|
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
|
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:SetCrouchJump(false)
|
||||||
ply:SetDive(false)
|
ply:SetDive(false)
|
||||||
|
|
||||||
ParkourEvent("roll", ply)
|
ParkourEvent("roll", ply)
|
||||||
|
|
||||||
local ang = ply:EyeAngles()
|
local ang = ply:EyeAngles()
|
||||||
|
@ -157,8 +164,8 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function (ply, water, floater, speed
|
||||||
StartBodyAnim(roll)
|
StartBodyAnim(roll)
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("RollAnimSP")
|
net.Start("RollAnimSP")
|
||||||
net.WriteBool(land)
|
net.WriteBool(land)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -169,7 +176,7 @@ if SERVER then
|
||||||
br_mat = true
|
br_mat = true
|
||||||
}
|
}
|
||||||
|
|
||||||
hook.Add("GetFallDamage", "SafetyRoll", function (ply, speed)
|
hook.Add("GetFallDamage", "SafetyRoll", function(ply, speed)
|
||||||
local groundent = ply:GetGroundEntity()
|
local groundent = ply:GetGroundEntity()
|
||||||
|
|
||||||
if IsValid(groundent) and safelandents[groundent:GetClass()] then
|
if IsValid(groundent) and safelandents[groundent:GetClass()] then
|
||||||
|
@ -188,4 +195,4 @@ if SERVER then
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
end)
|
end)
|
||||||
end
|
end
|
|
@ -1,51 +1,27 @@
|
||||||
local qslide_duration = 3
|
local qslide_duration = 3
|
||||||
local qslide_speedmult = 1
|
local qslide_speedmult = 1
|
||||||
|
|
||||||
local slide_sounds = {
|
local slide_sounds = {
|
||||||
[MAT_DIRT] = {
|
[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"},
|
||||||
"datae/fol_slide_dirt_01.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"},
|
||||||
"datae/fol_slide_dirt_02.wav",
|
[MAT_METAL] = {"datae/fol_slide_metal_01.wav", "datae/fol_slide_metal_02.wav", "datae/fol_slide_metal_03.wav"},
|
||||||
"datae/fol_slide_dirt_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"},
|
||||||
"datae/fol_slide_dirt_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_SAND] = {
|
[MAT_WOOD] = {"datae/fol_slide_generic_01.wav", "datae/fol_slide_generic_02.wav", "datae/fol_slide_generic_03.wav"}
|
||||||
"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 = {
|
local slideloop_sounds = {
|
||||||
[0] = "MirrorsEdge/Slide/ME_FootStep_ConcreteSlideLoop.wav",
|
[0] = "MirrorsEdge/Slide/ME_FootStep_ConcreteSlideLoop.wav",
|
||||||
[MAT_GLASS] = "MirrorsEdge/Slide/ME_FootStep_GlassSlideLoop.wav"
|
[MAT_GLASS] = "MirrorsEdge/Slide/ME_FootStep_GlassSlideLoop.wav"
|
||||||
}
|
}
|
||||||
|
|
||||||
slide_sounds[MAT_GRASS] = slide_sounds[MAT_DIRT]
|
slide_sounds[MAT_GRASS] = slide_sounds[MAT_DIRT]
|
||||||
slide_sounds[MAT_SNOW] = slide_sounds[MAT_DIRT]
|
slide_sounds[MAT_SNOW] = slide_sounds[MAT_DIRT]
|
||||||
slide_sounds[MAT_VENT] = slide_sounds[MAT_METAL]
|
slide_sounds[MAT_VENT] = slide_sounds[MAT_METAL]
|
||||||
slide_sounds[0] = slide_sounds[MAT_DIRT]
|
slide_sounds[0] = slide_sounds[MAT_DIRT]
|
||||||
|
|
||||||
|
--[[
|
||||||
local animtable = {
|
local animtable = {
|
||||||
lockang = false,
|
lockang = false,
|
||||||
allowmove = true,
|
allowmove = true,
|
||||||
|
@ -59,6 +35,8 @@ local animtable = {
|
||||||
camjoint = "camerajoint",
|
camjoint = "camerajoint",
|
||||||
usefullbody = 2
|
usefullbody = 2
|
||||||
}
|
}
|
||||||
|
]]
|
||||||
|
|
||||||
local blocked = false
|
local blocked = false
|
||||||
|
|
||||||
local function SlidingAnimThink()
|
local function SlidingAnimThink()
|
||||||
|
@ -79,18 +57,19 @@ local function SlidingAnimThink()
|
||||||
|
|
||||||
if IsValid(ba) then
|
if IsValid(ba) then
|
||||||
ply.OrigEyeAng:Set(ply:GetSlidingAngle())
|
ply.OrigEyeAng:Set(ply:GetSlidingAngle())
|
||||||
|
|
||||||
ply.OrigEyeAng.x = 0
|
ply.OrigEyeAng.x = 0
|
||||||
|
|
||||||
local tr = util.QuickTrace(ply:GetPos(), Vector(0, 0, -64), ply)
|
local tr = util.QuickTrace(ply:GetPos(), Vector(0, 0, -64), ply)
|
||||||
local normal = tr.HitNormal
|
local normal = tr.HitNormal
|
||||||
local oldang = ba:GetAngles()
|
local oldang = ba:GetAngles()
|
||||||
local ang = ba:GetAngles()
|
local ang = ba:GetAngles()
|
||||||
local slidey = ply:GetSlidingAngle().y
|
local slidey = ply:GetSlidingAngle().y
|
||||||
|
|
||||||
oldang[2] = slidey
|
oldang[2] = slidey
|
||||||
ang[2] = slidey
|
ang[2] = slidey
|
||||||
ang.x = math.max(normal:Angle().x + 90, 360)
|
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)
|
ba:SetAngles(newang)
|
||||||
|
|
||||||
BodyLimitX = math.min(40 + ang[1] - 360, 60)
|
BodyLimitX = math.min(40 + ang[1] - 360, 60)
|
||||||
|
@ -99,15 +78,11 @@ local function SlidingAnimThink()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function SlidingAnimStart()
|
local function SlidingAnimStart()
|
||||||
if not IsFirstTimePredicted() and not game.SinglePlayer() then
|
if not IsFirstTimePredicted() and not game.SinglePlayer() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
if not ply:Alive() then
|
if not ply:Alive() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
deleteonend = false
|
deleteonend = false
|
||||||
BodyLimitY = 80
|
BodyLimitY = 80
|
||||||
|
@ -131,24 +106,19 @@ local function SlidingAnimStart()
|
||||||
end
|
end
|
||||||
|
|
||||||
BodyAnim:SetAngles(ply:GetSlidingAngle())
|
BodyAnim:SetAngles(ply:GetSlidingAngle())
|
||||||
|
|
||||||
ply.OrigEyeAng = ply:GetSlidingAngle()
|
ply.OrigEyeAng = ply:GetSlidingAngle()
|
||||||
|
|
||||||
if ply:Crouching() or CurTime() < ply:GetCrouchJumpTime() then
|
if ply:Crouching() or CurTime() < ply:GetCrouchJumpTime() then
|
||||||
BodyAnimCycle = 0.1
|
BodyAnimCycle = 0.1
|
||||||
|
|
||||||
BodyAnim:SetCycle(0.1)
|
BodyAnim:SetCycle(0.1)
|
||||||
end
|
end
|
||||||
|
|
||||||
CamShake = ply:GetSlidingSlippery()
|
CamShake = ply:GetSlidingSlippery()
|
||||||
|
|
||||||
hook.Add("Think", "SlidingAnimThink", SlidingAnimThink)
|
hook.Add("Think", "SlidingAnimThink", SlidingAnimThink)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function SlidingAnimEnd(slippery, diving)
|
local function SlidingAnimEnd(slippery, diving)
|
||||||
if not IsValid(BodyAnim) then
|
if not IsValid(BodyAnim) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
|
||||||
|
@ -162,21 +132,17 @@ local function SlidingAnimEnd(slippery, diving)
|
||||||
if not slippery then
|
if not slippery then
|
||||||
if not ply.DiveSliding and not diving then
|
if not ply.DiveSliding and not diving then
|
||||||
BodyAnimString = "meslideend"
|
BodyAnimString = "meslideend"
|
||||||
|
|
||||||
BodyAnim:ResetSequence("meslideend")
|
BodyAnim:ResetSequence("meslideend")
|
||||||
else
|
else
|
||||||
ply.DiveSliding = false
|
ply.DiveSliding = false
|
||||||
|
|
||||||
ParkourEvent("diveslideend", ply, true)
|
ParkourEvent("diveslideend", ply, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
|
|
||||||
BodyAnim:SetCycle(0)
|
BodyAnim:SetCycle(0)
|
||||||
|
|
||||||
BodyAnimSpeed = 1.3
|
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
|
if ply:Alive() and BodyAnimString == "meslideend" and BodyAnimArmCopy and not ply:GetSliding() and not ply:OnGround() then
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
camjoint = "eyes"
|
camjoint = "eyes"
|
||||||
|
@ -189,17 +155,19 @@ local function SlidingAnimEnd(slippery, diving)
|
||||||
camjoint = "eyes"
|
camjoint = "eyes"
|
||||||
end
|
end
|
||||||
|
|
||||||
timer.Simple(0.5, function ()
|
timer.Simple(0.5, function()
|
||||||
if ply:Alive() and BodyAnimArmCopy and not ply:GetSliding() then
|
if ply:Alive() and BodyAnimArmCopy and not ply:GetSliding() then
|
||||||
camjoint = "eyes"
|
camjoint = "eyes"
|
||||||
|
|
||||||
BodyLimitY = 180
|
BodyLimitY = 180
|
||||||
BodyLimitX = 90
|
BodyLimitX = 90
|
||||||
|
|
||||||
CamIgnoreAng = true
|
CamIgnoreAng = true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if blocked then
|
if blocked then
|
||||||
timer.Simple(0.35, function ()
|
timer.Simple(0.35, function()
|
||||||
if IsValid(BodyAnim) then
|
if IsValid(BodyAnim) then
|
||||||
BodyAnim:SetSequence("crouchstill")
|
BodyAnim:SetSequence("crouchstill")
|
||||||
end
|
end
|
||||||
|
@ -216,11 +184,13 @@ if game.SinglePlayer() then
|
||||||
util.AddNetworkString("sliding_spfix")
|
util.AddNetworkString("sliding_spfix")
|
||||||
util.AddNetworkString("sliding_spend")
|
util.AddNetworkString("sliding_spend")
|
||||||
else
|
else
|
||||||
net.Receive("sliding_spfix", function ()
|
net.Receive("sliding_spfix", function()
|
||||||
SlidingAnimStart()
|
SlidingAnimStart()
|
||||||
end)
|
end)
|
||||||
net.Receive("sliding_spend", function ()
|
|
||||||
|
net.Receive("sliding_spend", function()
|
||||||
blocked = net.ReadBool()
|
blocked = net.ReadBool()
|
||||||
|
|
||||||
local slippery = net.ReadBool()
|
local slippery = net.ReadBool()
|
||||||
local diving = net.ReadBool()
|
local diving = net.ReadBool()
|
||||||
|
|
||||||
|
@ -230,15 +200,16 @@ if game.SinglePlayer() then
|
||||||
end
|
end
|
||||||
|
|
||||||
local slidepunch = Angle(2.5, 0, -0.5)
|
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_down = Vector(0, 0, 32)
|
||||||
local trace_up = Vector(0, 0, 32)
|
-- local trace_up = Vector(0, 0, 32)
|
||||||
local trace_tbl = {}
|
local trace_tbl = {}
|
||||||
|
|
||||||
local function SlideSurfaceSound(ply, pos)
|
local function SlideSurfaceSound(ply, pos)
|
||||||
trace_tbl.start = pos
|
trace_tbl.start = pos
|
||||||
trace_tbl.endpos = pos - trace_down
|
trace_tbl.endpos = pos - trace_down
|
||||||
trace_tbl.filter = ply
|
trace_tbl.filter = ply
|
||||||
|
|
||||||
local tr = util.TraceLine(trace_tbl)
|
local tr = util.TraceLine(trace_tbl)
|
||||||
local sndtable = slide_sounds[tr.MatType] or slide_sounds[0]
|
local sndtable = slide_sounds[tr.MatType] or slide_sounds[0]
|
||||||
|
|
||||||
|
@ -255,14 +226,15 @@ end
|
||||||
|
|
||||||
local function SlideLoopSound(ply, pos, mat)
|
local function SlideLoopSound(ply, pos, mat)
|
||||||
local sndtable = slideloop_sounds[mat] or slideloop_sounds[0]
|
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)
|
ply.SlideLoopSound:PlayEx(0.05, 100)
|
||||||
end
|
end
|
||||||
|
|
||||||
local COORD_FRACTIONAL_BITS = 5
|
-- local COORD_FRACTIONAL_BITS = 5
|
||||||
local COORD_DENOMINATOR = bit.lshift(1, COORD_FRACTIONAL_BITS)
|
-- local COORD_DENOMINATOR = bit.lshift(1, COORD_FRACTIONAL_BITS)
|
||||||
local COORD_RESOLUTION = 1 / COORD_FRACTIONAL_BITS
|
-- local COORD_RESOLUTION = 1 / COORD_FRACTIONAL_BITS
|
||||||
|
|
||||||
local metaent = FindMetaTable("Entity")
|
local metaent = FindMetaTable("Entity")
|
||||||
metaent.oldOnGround = metaent.oldOnGround or metaent.OnGround
|
metaent.oldOnGround = metaent.oldOnGround or metaent.OnGround
|
||||||
|
|
||||||
|
@ -270,10 +242,8 @@ function metaent:OnGround()
|
||||||
return self:IsPlayer() and self:GetSlidingSlippery() or self:oldOnGround()
|
return self:IsPlayer() and self:GetSlidingSlippery() or self:oldOnGround()
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
hook.Add("SetupMove", "qslide", function(ply, mv, cmd)
|
||||||
if not ply:Alive() then
|
if not ply:Alive() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ply.OldDuckSpeed then
|
if not ply.OldDuckSpeed then
|
||||||
ply.OldDuckSpeed = ply:GetDuckSpeed()
|
ply.OldDuckSpeed = ply:GetDuckSpeed()
|
||||||
|
@ -284,6 +254,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
local speed = mv:GetVelocity()
|
local speed = mv:GetVelocity()
|
||||||
speed.z = 0
|
speed.z = 0
|
||||||
speed = speed:Length()
|
speed = speed:Length()
|
||||||
|
|
||||||
local runspeed = ply:GetRunSpeed()
|
local runspeed = ply:GetRunSpeed()
|
||||||
local slidetime = math.max(0.1, qslide_duration)
|
local slidetime = math.max(0.1, qslide_duration)
|
||||||
local ducking = mv:KeyDown(IN_DUCK)
|
local ducking = mv:KeyDown(IN_DUCK)
|
||||||
|
@ -295,6 +266,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
if not ply.SlideSlipperyTrace then
|
if not ply.SlideSlipperyTrace then
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
ply.SlideSlipperyTraceOut = {}
|
ply.SlideSlipperyTraceOut = {}
|
||||||
|
|
||||||
ply.SlideSlipperyTrace = {
|
ply.SlideSlipperyTrace = {
|
||||||
mask = MASK_SHOT_HULL,
|
mask = MASK_SHOT_HULL,
|
||||||
collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT,
|
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
|
if slipperytraceout.Fraction > 0 and slipperytraceout.Fraction < 1 and not slipperytraceout.StartSolid then
|
||||||
local slipnormal = slipperytraceout.HitNormal
|
local slipnormal = slipperytraceout.HitNormal
|
||||||
local hitpos = slipperytraceout.HitPos
|
local hitpos = slipperytraceout.HitPos
|
||||||
local delta = math.abs(mv:GetOrigin().z - hitpos.z)
|
|
||||||
local ent = slipperytraceout.Entity
|
local ent = slipperytraceout.Entity
|
||||||
|
-- local delta = math.abs(mv:GetOrigin().z - hitpos.z)
|
||||||
|
|
||||||
slipperytrace.start = safestart
|
slipperytrace.start = safestart
|
||||||
slipperytrace.endpos = safestart - Vector(0, 0, 120)
|
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
|
if sang.x > 315 and sang.x < 330 then
|
||||||
mv:SetOrigin(hitpos)
|
mv:SetOrigin(hitpos)
|
||||||
|
|
||||||
ply:SetGroundEntity(ent)
|
ply:SetGroundEntity(ent)
|
||||||
ply:SetCrouchJumpBlocked(false)
|
ply:SetCrouchJumpBlocked(false)
|
||||||
|
|
||||||
|
@ -350,6 +324,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
|
|
||||||
dmg:SetDamageType(DMG_FALL)
|
dmg:SetDamageType(DMG_FALL)
|
||||||
dmg:SetDamage(1000)
|
dmg:SetDamage(1000)
|
||||||
|
|
||||||
ply:TakeDamageInfo(dmg)
|
ply:TakeDamageInfo(dmg)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -363,6 +338,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
slipperytrace.endpos = slipperytrace.start - Vector(0, 0, 32)
|
slipperytrace.endpos = slipperytrace.start - Vector(0, 0, 32)
|
||||||
|
|
||||||
util.TraceHull(slipperytrace)
|
util.TraceHull(slipperytrace)
|
||||||
|
|
||||||
ply:SetSlidingSlipperyUpdate(CT + 0.25)
|
ply:SetSlidingSlipperyUpdate(CT + 0.25)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -398,7 +374,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
vel = 230
|
vel = 230
|
||||||
|
|
||||||
ply:SetDive(false)
|
ply:SetDive(false)
|
||||||
|
|
||||||
ply.DiveSliding = false
|
ply.DiveSliding = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -410,7 +385,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
ply:SetSliding(true)
|
ply:SetSliding(true)
|
||||||
|
|
||||||
local slidecalctime = slidetime * math.min(vel / 300, 1)
|
local slidecalctime = slidetime * math.min(vel / 300, 1)
|
||||||
|
|
||||||
ply:SetSlidingTime(CT + slidecalctime)
|
ply:SetSlidingTime(CT + slidecalctime)
|
||||||
|
|
||||||
if not ply:Crouching() then
|
if not ply:Crouching() then
|
||||||
|
@ -426,14 +400,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
else
|
else
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
ply:SetSlidingAngle(ang)
|
ply:SetSlidingAngle(ang)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ply:SetSlidingVel(vel)
|
ply:SetSlidingVel(vel)
|
||||||
ply:SetSlidingStrafe(0)
|
ply:SetSlidingStrafe(0)
|
||||||
|
|
||||||
ply.SlidingInitTime = CT
|
ply.SlidingInitTime = CT
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
|
@ -452,12 +424,13 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("sliding_spfix")
|
net.Start("sliding_spfix")
|
||||||
net.WriteBool(ply:GetDive())
|
net.WriteBool(ply:GetDive())
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
SlidingAnimStart()
|
SlidingAnimStart()
|
||||||
|
|
||||||
hook.Add("Think", "SlidingAnimThink", SlidingAnimThink)
|
hook.Add("Think", "SlidingAnimThink", SlidingAnimThink)
|
||||||
end
|
end
|
||||||
elseif (not ducking and ply:GetMelee() == 0 and not slippery or not onground) and sliding then
|
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
|
if not ducking then
|
||||||
ply.SlideHull = ply.SlideHull or {}
|
ply.SlideHull = ply.SlideHull or {}
|
||||||
ply.SlideHullOut = ply.SlideHullOut or {}
|
ply.SlideHullOut = ply.SlideHullOut or {}
|
||||||
|
|
||||||
local hulltr = ply.SlideHull
|
local hulltr = ply.SlideHull
|
||||||
local hulltrout = ply.SlideHullOut
|
local hulltrout = ply.SlideHullOut
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
local origin = mv:GetOrigin()
|
local origin = mv:GetOrigin()
|
||||||
|
|
||||||
hulltr.start = origin
|
hulltr.start = origin
|
||||||
hulltr.endpos = origin
|
hulltr.endpos = origin
|
||||||
hulltr.maxs = maxs
|
hulltr.maxs = maxs
|
||||||
|
@ -497,9 +472,9 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
net.Start("sliding_spend")
|
net.Start("sliding_spend")
|
||||||
net.WriteBool(blocked)
|
net.WriteBool(blocked)
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(ply.DiveSliding)
|
net.WriteBool(ply.DiveSliding)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
ply.DiveSliding = false
|
ply.DiveSliding = false
|
||||||
|
@ -516,6 +491,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
ply:ConCommand("-duck")
|
ply:ConCommand("-duck")
|
||||||
|
|
||||||
ply:SetViewOffsetDucked(Vector(0, 0, 32))
|
ply:SetViewOffsetDucked(Vector(0, 0, 32))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -528,7 +504,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
eyeang = eyeang:Forward()
|
eyeang = eyeang:Forward()
|
||||||
|
|
||||||
ply:SetViewOffsetDucked(Vector(0, 0, 28) + eyeang * -25)
|
ply:SetViewOffsetDucked(Vector(0, 0, 28) + eyeang * -25)
|
||||||
|
|
||||||
local slidedelta = (ply:GetSlidingTime() - CT) / slidetime
|
local slidedelta = (ply:GetSlidingTime() - CT) / slidetime
|
||||||
local speed = ply:GetSlidingVel() * math.min(1.75, (ply:GetSlidingTime() - CT + 0.5) / slidetime) * qslide_speedmult
|
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
|
if mv:KeyPressed(IN_JUMP) then
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
|
|
||||||
vel:Mul(math.min(math.max(speed, 300) / 300, 1))
|
vel:Mul(math.min(math.max(speed, 300) / 300, 1))
|
||||||
|
|
||||||
vel.z = 175
|
vel.z = 175
|
||||||
|
|
||||||
ply:SetSliding(false)
|
ply:SetSliding(false)
|
||||||
|
@ -578,9 +551,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
mv:SetOrigin(mv:GetOrigin() + Vector(0, 0, 33))
|
mv:SetOrigin(mv:GetOrigin() + Vector(0, 0, 33))
|
||||||
|
|
||||||
ply:SetGroundEntity(nil)
|
ply:SetGroundEntity(nil)
|
||||||
ply:SetSlidingSlippery(false)
|
ply:SetSlidingSlippery(false)
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
ParkourEvent("jumpslide", ply)
|
ParkourEvent("jumpslide", ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -605,7 +581,6 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
ply.DiveSliding = false
|
ply.DiveSliding = false
|
||||||
|
|
||||||
ply:SetSlidingTime(0)
|
ply:SetSlidingTime(0)
|
||||||
ply:SetSliding(false)
|
ply:SetSliding(false)
|
||||||
ply:SetQuickturn(true)
|
ply:SetQuickturn(true)
|
||||||
|
@ -622,6 +597,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
ply:ViewPunch(Angle(2.5, 0, 5))
|
ply:ViewPunch(Angle(2.5, 0, 5))
|
||||||
ply:SetViewOffsetDucked(Vector(0, 0, 17))
|
ply:SetViewOffsetDucked(Vector(0, 0, 17))
|
||||||
ply:SetViewOffset(Vector(0, 0, 64))
|
ply:SetViewOffset(Vector(0, 0, 64))
|
||||||
|
|
||||||
mv:SetOrigin(mv:GetOrigin() + Vector(0, 0, 48))
|
mv:SetOrigin(mv:GetOrigin() + Vector(0, 0, 48))
|
||||||
mv:SetVelocity(mv:GetVelocity() * 0.75 + Vector(0, 0, 251))
|
mv:SetVelocity(mv:GetVelocity() * 0.75 + Vector(0, 0, 251))
|
||||||
end
|
end
|
||||||
|
@ -641,9 +617,9 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
|
|
||||||
if SERVER and game.SinglePlayer() then
|
if SERVER and game.SinglePlayer() then
|
||||||
net.Start("sliding_spend")
|
net.Start("sliding_spend")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.WriteBool(slippery)
|
net.WriteBool(slippery)
|
||||||
net.WriteBool(ply.DiveSliding)
|
net.WriteBool(ply.DiveSliding)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
elseif CLIENT_IFTP() then
|
elseif CLIENT_IFTP() then
|
||||||
SlidingAnimEnd(slippery, ply.DiveSliding)
|
SlidingAnimEnd(slippery, ply.DiveSliding)
|
||||||
|
@ -667,6 +643,7 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
DoJumpTurn(false)
|
DoJumpTurn(false)
|
||||||
|
|
||||||
BodyAnim:SetSequence("meslideendprone")
|
BodyAnim:SetSequence("meslideendprone")
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
ply:SendLua("DoJumpTurn(false) BodyAnim:SetSequence('meslideendprone')")
|
ply:SendLua("DoJumpTurn(false) BodyAnim:SetSequence('meslideendprone')")
|
||||||
|
@ -682,12 +659,12 @@ hook.Add("SetupMove", "qslide", function (ply, mv, cmd)
|
||||||
ply:SetUnDuckSpeed(ply.OldUnDuckSpeed)
|
ply:SetUnDuckSpeed(ply.OldUnDuckSpeed)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
hook.Add("PlayerFootstep", "qslidestep", function (ply)
|
|
||||||
if ply:GetSliding() then
|
hook.Add("PlayerFootstep", "qslidestep", function(ply)
|
||||||
return true
|
if ply:GetSliding() then return true end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
hook.Add("StartCommand", "qslidespeed", function (ply, cmd)
|
|
||||||
|
hook.Add("StartCommand", "qslidespeed", function(ply, cmd)
|
||||||
if ply:GetSliding() then
|
if ply:GetSliding() then
|
||||||
cmd:RemoveKey(IN_SPEED)
|
cmd:RemoveKey(IN_SPEED)
|
||||||
|
|
||||||
|
@ -696,11 +673,10 @@ hook.Add("StartCommand", "qslidespeed", function (ply, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
cmd:ClearMovement()
|
cmd:ClearMovement()
|
||||||
|
|
||||||
local slidetime = math.max(0.1, qslide_duration)
|
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
|
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))
|
cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_DUCK))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -1,10 +1,12 @@
|
||||||
soundAdd_old = sound.Add
|
soundAdd_old = sound.Add
|
||||||
|
|
||||||
local function soundAdd_detour(tbl)
|
local function soundAdd_detour(tbl)
|
||||||
if !tbl.name then return end
|
if not tbl.name then return end
|
||||||
soundAdd_old(tbl)
|
soundAdd_old(tbl)
|
||||||
|
|
||||||
timer.Simple(2, function()
|
timer.Simple(2, function()
|
||||||
util.PrecacheSound(tbl.name)
|
util.PrecacheSound(tbl.name)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
sound.Add = soundAdd_detour
|
sound.Add = soundAdd_detour
|
|
@ -3,95 +3,42 @@ sound.Add({
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Cloth.MovementRun",
|
name = "Cloth.MovementRun",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Cloth.RollLand",
|
name = "Cloth.RollLand",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Cloth.Roll",
|
name = "Cloth.Roll",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 75,
|
level = 75,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"MirrorsEdge/Body_Roll_01.wav", "MirrorsEdge/Body_Roll_02.wav", "MirrorsEdge/Body_Roll_03.wav", "MirrorsEdge/Body_Roll_04.wav"}
|
||||||
110
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"MirrorsEdge/Body_Roll_01.wav",
|
|
||||||
"MirrorsEdge/Body_Roll_02.wav",
|
|
||||||
"MirrorsEdge/Body_Roll_03.wav",
|
|
||||||
"MirrorsEdge/Body_Roll_04.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Cloth.FallShortHard",
|
name = "Cloth.FallShortHard",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 75,
|
level = 75,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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"
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -3,631 +3,251 @@ sound.Add({
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Concrete",
|
name = "Release.Concrete",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Land.Concrete",
|
name = "Land.Concrete",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Glass",
|
name = "Footsteps.Glass",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Glass",
|
name = "Release.Glass",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Land.Glass",
|
name = "Land.Glass",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Metal",
|
name = "Footsteps.Metal",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Metal",
|
name = "Release.Metal",
|
||||||
volume = 0.3,
|
volume = 0.3,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Duct",
|
name = "Footsteps.Duct",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Gantry",
|
name = "Footsteps.Gantry",
|
||||||
volume = 0.5,
|
volume = 0.5,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Gantry",
|
name = "Release.Gantry",
|
||||||
volume = 0.5,
|
volume = 0.5,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Metal.Ringout",
|
name = "Metal.Ringout",
|
||||||
volume = 0.5,
|
volume = 0.5,
|
||||||
level = 50,
|
level = 50,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Wood",
|
name = "Footsteps.Wood",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Wood",
|
name = "Release.Wood",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Water",
|
name = "Footsteps.Water",
|
||||||
volume = 0.25,
|
volume = 0.25,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Water",
|
name = "Release.Water",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Gravel",
|
name = "Footsteps.Gravel",
|
||||||
volume = 0.25,
|
volume = 0.25,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Gravel",
|
name = "Release.Gravel",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 30,
|
level = 30,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Land.Gravel",
|
name = "Land.Gravel",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.LadderHeavy",
|
name = "Footsteps.LadderHeavy",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.LadderMedium",
|
name = "Footsteps.LadderMedium",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Release.Ladder",
|
name = "Release.Ladder",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "OWallrun.Concrete",
|
name = "OWallrun.Concrete",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "OWallrunFast.Concrete",
|
name = "OWallrunFast.Concrete",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Wallrun.Concrete",
|
name = "Wallrun.Concrete",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "WallrunRelease.Concrete",
|
name = "WallrunRelease.Concrete",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Footsteps.Spark",
|
name = "Footsteps.Spark",
|
||||||
volume = 0.2,
|
volume = 0.2,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {85, 115},
|
||||||
85,
|
sound = {"bigspark1.wav", "bigspark2.wav"}
|
||||||
115
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"bigspark1.wav",
|
|
||||||
"bigspark2.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "CyborgRun",
|
name = "CyborgRun",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
sound = "cyborgrun.wav",
|
sound = "cyborgrun.wav",
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110}
|
||||||
90,
|
|
||||||
110
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
FOOTSTEPS_LUT = {
|
FOOTSTEPS_LUT = {
|
||||||
|
@ -643,6 +263,7 @@ FOOTSTEPS_LUT = {
|
||||||
["player/footsteps/wood"] = "Wood",
|
["player/footsteps/wood"] = "Wood",
|
||||||
["player/footsteps/chainlink"] = "Gantry"
|
["player/footsteps/chainlink"] = "Gantry"
|
||||||
}
|
}
|
||||||
|
|
||||||
FOOTSTEPS_RELEASE_LUT = {
|
FOOTSTEPS_RELEASE_LUT = {
|
||||||
["player/footsteps/woodpanel"] = "Wood",
|
["player/footsteps/woodpanel"] = "Wood",
|
||||||
["player/footsteps/gravel"] = "Gravel",
|
["player/footsteps/gravel"] = "Gravel",
|
||||||
|
@ -656,9 +277,10 @@ FOOTSTEPS_RELEASE_LUT = {
|
||||||
["player/footsteps/wood"] = "Wood",
|
["player/footsteps/wood"] = "Wood",
|
||||||
["player/footsteps/chainlink"] = "Gantry"
|
["player/footsteps/chainlink"] = "Gantry"
|
||||||
}
|
}
|
||||||
|
|
||||||
FOOTSTEPS_LAND_LUT = {
|
FOOTSTEPS_LAND_LUT = {
|
||||||
["physics/glass/glass_sheet_step"] = "Glass",
|
["physics/glass/glass_sheet_step"] = "Glass",
|
||||||
["player/footsteps/concrete"] = "Concrete",
|
["player/footsteps/concrete"] = "Concrete",
|
||||||
["player/footsteps/sand"] = "Gravel",
|
["player/footsteps/sand"] = "Gravel",
|
||||||
["player/footsteps/gravel"] = "Gravel"
|
["player/footsteps/gravel"] = "Gravel"
|
||||||
}
|
}
|
|
@ -3,86 +3,33 @@ sound.Add({
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Handsteps.ConcreteHard",
|
name = "Handsteps.ConcreteHard",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_01.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_02.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_03.wav"}
|
||||||
110
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_01.wav",
|
|
||||||
"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_02.wav",
|
|
||||||
"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepHard_03.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Handsteps.Ladder",
|
name = "Handsteps.Ladder",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {75, 90},
|
||||||
75,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Handsteps.ConcreteRelease",
|
name = "Handsteps.ConcreteRelease",
|
||||||
volume = 0.5,
|
volume = 0.5,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {75, 90},
|
||||||
75,
|
sound = {"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_01.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_02.wav", "MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_03.wav"}
|
||||||
90
|
})
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_01.wav",
|
|
||||||
"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_02.wav",
|
|
||||||
"MirrorsEdge/Handsteps/Concrete/ConcreteHandStepFastRelease_03.wav"
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -3,66 +3,33 @@ sound.Add({
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 50,
|
level = 50,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"melee/foot1.wav", "melee/foot2.wav", "melee/foot3.wav", "melee/foot4.wav", "melee/foot5.wav"}
|
||||||
110
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"melee/foot1.wav",
|
|
||||||
"melee/foot2.wav",
|
|
||||||
"melee/foot3.wav",
|
|
||||||
"melee/foot4.wav",
|
|
||||||
"melee/foot5.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Melee.Fist",
|
name = "Melee.Fist",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 45,
|
level = 45,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"melee/fist1.wav", "melee/fist2.wav", "melee/fist3.wav", "melee/fist4.wav", "melee/fist5.wav"}
|
||||||
110
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"melee/fist1.wav",
|
|
||||||
"melee/fist2.wav",
|
|
||||||
"melee/fist3.wav",
|
|
||||||
"melee/fist4.wav",
|
|
||||||
"melee/fist5.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Melee.LegSwoosh",
|
name = "Melee.LegSwoosh",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"melee/legswoosh1.wav", "melee/legswoosh2.wav", "melee/legswoosh3.wav", "melee/legswoosh4.wav"}
|
||||||
110
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"melee/legswoosh1.wav",
|
|
||||||
"melee/legswoosh2.wav",
|
|
||||||
"melee/legswoosh3.wav",
|
|
||||||
"melee/legswoosh4.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Melee.ArmSwoosh",
|
name = "Melee.ArmSwoosh",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"melee/armswoosh1.wav", "melee/armswoosh2.wav", "melee/armswoosh3.wav", "melee/armswoosh4.wav", "melee/armswoosh5.wav", "melee/armswoosh6.wav"}
|
||||||
110
|
})
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"melee/armswoosh1.wav",
|
|
||||||
"melee/armswoosh2.wav",
|
|
||||||
"melee/armswoosh3.wav",
|
|
||||||
"melee/armswoosh4.wav",
|
|
||||||
"melee/armswoosh5.wav",
|
|
||||||
"melee/armswoosh6.wav"
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -3,80 +3,46 @@ sound.Add({
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 50,
|
level = 50,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "Door.Barge",
|
name = "Door.Barge",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 60,
|
level = 60,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
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"}
|
||||||
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({
|
sound.Add({
|
||||||
name = "FenceClimb",
|
name = "FenceClimb",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 60,
|
level = 60,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {95, 105},
|
||||||
95,
|
sound = {"MirrorsEdge/GameplayObjects/Fence_01.wav", "MirrorsEdge/GameplayObjects/Fence_02.wav"}
|
||||||
105
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"MirrorsEdge/GameplayObjects/Fence_01.wav",
|
|
||||||
"MirrorsEdge/GameplayObjects/Fence_02.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "FenceClimbEnd",
|
name = "FenceClimbEnd",
|
||||||
volume = 0.5,
|
volume = 0.5,
|
||||||
sound = "MirrorsEdge/GameplayObjects/Fence.wav",
|
sound = "MirrorsEdge/GameplayObjects/Fence.wav",
|
||||||
level = 60,
|
level = 60,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {95, 105}
|
||||||
95,
|
|
||||||
105
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Vault",
|
name = "Vault",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"MirrorsEdge/Vault_01.wav", "MirrorsEdge/Vault_02.wav", "MirrorsEdge/Vault_03.wav", "MirrorsEdge/Vault_04.wav"}
|
||||||
110
|
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"MirrorsEdge/Vault_01.wav",
|
|
||||||
"MirrorsEdge/Vault_02.wav",
|
|
||||||
"MirrorsEdge/Vault_03.wav",
|
|
||||||
"MirrorsEdge/Vault_04.wav"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "ZiplineStart",
|
name = "ZiplineStart",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
|
@ -85,6 +51,7 @@ sound.Add({
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC
|
channel = CHAN_STATIC
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "ZiplineEnd",
|
name = "ZiplineEnd",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
|
@ -93,6 +60,7 @@ sound.Add({
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC
|
channel = CHAN_STATIC
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "ZiplineLoop",
|
name = "ZiplineLoop",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
|
@ -101,18 +69,12 @@ sound.Add({
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC
|
channel = CHAN_STATIC
|
||||||
})
|
})
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
name = "Land.Ladder",
|
name = "Land.Ladder",
|
||||||
volume = 1,
|
volume = 1,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_STATIC,
|
channel = CHAN_STATIC,
|
||||||
pitch = {
|
pitch = {90, 110},
|
||||||
90,
|
sound = {"MirrorsEdge/Ladder/Ladder_Land_01.ogg", "MirrorsEdge/Ladder/Ladder_Land_02.ogg", "MirrorsEdge/Ladder/Ladder_Land_03.ogg"}
|
||||||
110
|
})
|
||||||
},
|
|
||||||
sound = {
|
|
||||||
"MirrorsEdge/Ladder/Ladder_Land_01.ogg",
|
|
||||||
"MirrorsEdge/Ladder/Ladder_Land_02.ogg",
|
|
||||||
"MirrorsEdge/Ladder/Ladder_Land_03.ogg"
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -1,7 +1,5 @@
|
||||||
local FaithVO = CreateConVar("Beatrun_FaithVO", 0, {
|
local FaithVO = CreateConVar("Beatrun_FaithVO", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||||
FCVAR_REPLICATED,
|
|
||||||
FCVAR_ARCHIVE
|
|
||||||
})
|
|
||||||
local meta = FindMetaTable("Player")
|
local meta = FindMetaTable("Player")
|
||||||
|
|
||||||
sound.Add({
|
sound.Add({
|
||||||
|
@ -10,205 +8,106 @@ sound.Add({
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.StrainMedium",
|
name = "Faith.StrainMedium",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.StrainHard",
|
name = "Faith.StrainHard",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Impact",
|
name = "Faith.Impact",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 40,
|
level = 40,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.SoftShortIn",
|
name = "Faith.Breath.SoftShortIn",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.SoftShortOut",
|
name = "Faith.Breath.SoftShortOut",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.SoftLongIn",
|
name = "Faith.Breath.SoftLongIn",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.SoftLongOut",
|
name = "Faith.Breath.SoftLongOut",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.MediumShortIn",
|
name = "Faith.Breath.MediumShortIn",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.MediumShortOut",
|
name = "Faith.Breath.MediumShortOut",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.MediumLongIn",
|
name = "Faith.Breath.MediumLongIn",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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({
|
sound.Add({
|
||||||
name = "Faith.Breath.MediumLongOut",
|
name = "Faith.Breath.MediumLongOut",
|
||||||
volume = 0.75,
|
volume = 0.75,
|
||||||
pitch = 100,
|
pitch = 100,
|
||||||
level = 35,
|
level = 35,
|
||||||
channel = CHAN_VOICE,
|
channel = CHAN_VOICE,
|
||||||
sound = {
|
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"}
|
||||||
"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)
|
function meta:FaithVO(vo)
|
||||||
|
@ -221,4 +120,4 @@ function meta:FaithVO(vo)
|
||||||
|
|
||||||
self:EmitSound(vo)
|
self:EmitSound(vo)
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,2 +1,2 @@
|
||||||
sound.Add = soundAdd_old
|
sound.Add = soundAdd_old
|
||||||
soundAdd_old = nil
|
soundAdd_old = nil
|
|
@ -4,8 +4,10 @@ local function SwingpipeCheck(ply, mv, cmd)
|
||||||
mins.x = mins.x * 2
|
mins.x = mins.x * 2
|
||||||
maxs.y = maxs.y * 2
|
maxs.y = maxs.y * 2
|
||||||
mins.y = mins.y * 2
|
mins.y = mins.y * 2
|
||||||
|
|
||||||
local tr = ply.Monkey_tr
|
local tr = ply.Monkey_tr
|
||||||
local trout = ply.Monkey_trout
|
local trout = ply.Monkey_trout
|
||||||
|
|
||||||
tr.start = mv:GetOrigin()
|
tr.start = mv:GetOrigin()
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.maxs = maxs
|
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
|
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 swingpipe = trout.Entity
|
||||||
local dot = cmd:GetViewAngles():Forward():Dot(swingpipe:GetAngles():Forward())
|
-- local dot = cmd:GetViewAngles():Forward():Dot(swingpipe:GetAngles():Forward())
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
swingpipe:SetPredictable(true)
|
swingpipe:SetPredictable(true)
|
||||||
|
@ -27,8 +29,10 @@ local function SwingpipeCheck(ply, mv, cmd)
|
||||||
|
|
||||||
local pos = swingpipe:GetPos()
|
local pos = swingpipe:GetPos()
|
||||||
pos.z = mv:GetOrigin().z
|
pos.z = mv:GetOrigin().z
|
||||||
|
|
||||||
local entvector = pos - ply:GetShootPos()
|
local entvector = pos - ply:GetShootPos()
|
||||||
entvector.z = pos.z
|
entvector.z = pos.z
|
||||||
|
|
||||||
local entdot = entvector:Dot(mv:GetAngles():Right())
|
local entdot = entvector:Dot(mv:GetAngles():Right())
|
||||||
local dir = entdot < 0
|
local dir = entdot < 0
|
||||||
local trwall = util.QuickTrace(mv:GetOrigin(), mv:GetAngles():Right() * 100 * (dir and -1 or 1), ply)
|
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
|
end
|
||||||
|
|
||||||
ply.SwingHullCheck = false
|
ply.SwingHullCheck = false
|
||||||
|
|
||||||
ply:SetSwingpipe(swingpipe)
|
ply:SetSwingpipe(swingpipe)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
ply:SetSBDir(dir)
|
ply:SetSBDir(dir)
|
||||||
|
@ -57,8 +60,8 @@ local function SwingpipeCheck(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- local red = Color(255, 0, 0, 200)
|
||||||
local radius = 40
|
local radius = 40
|
||||||
local red = Color(255, 0, 0, 200)
|
|
||||||
local circlepos = Vector()
|
local circlepos = Vector()
|
||||||
local axis = Vector(0, 1, 0)
|
local axis = Vector(0, 1, 0)
|
||||||
|
|
||||||
|
@ -88,7 +91,6 @@ local function SwingpipeThink(ply, mv, cmd)
|
||||||
ang:RotateAroundAxis(axis, 90)
|
ang:RotateAroundAxis(axis, 90)
|
||||||
|
|
||||||
local angle = math.NormalizeAngle(ply:GetSBOffset() - ply.swingbarang) * math.pi * 2 / 360
|
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:SetUnpacked(0, math.cos(angle) * radius * -1, -math.sin(angle) * radius)
|
||||||
circlepos:Rotate(ang)
|
circlepos:Rotate(ang)
|
||||||
|
|
||||||
|
@ -110,10 +112,7 @@ local function SwingpipeThink(ply, mv, cmd)
|
||||||
if util.TraceHull({
|
if util.TraceHull({
|
||||||
start = spendpos,
|
start = spendpos,
|
||||||
endpos = spendpos,
|
endpos = spendpos,
|
||||||
filter = {
|
filter = {ply:GetSwingpipe(), ply},
|
||||||
ply:GetSwingpipe(),
|
|
||||||
ply
|
|
||||||
},
|
|
||||||
mins = minhull,
|
mins = minhull,
|
||||||
maxs = maxhull
|
maxs = maxhull
|
||||||
}).Hit then
|
}).Hit then
|
||||||
|
@ -149,9 +148,11 @@ local function SwingpipeThink(ply, mv, cmd)
|
||||||
|
|
||||||
if ply:GetSBDir() then
|
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))
|
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)
|
origin:Add(mv:GetAngles():Right() * 17 * startlerp)
|
||||||
else
|
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))
|
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)
|
origin:Sub(mv:GetAngles():Right() * 17 * startlerp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -176,7 +177,9 @@ local function SwingpipeThink(ply, mv, cmd)
|
||||||
ply:SetSwingbarLast(ply:GetSwingpipe())
|
ply:SetSwingbarLast(ply:GetSwingpipe())
|
||||||
ply:SetSwingpipe(nil)
|
ply:SetSwingpipe(nil)
|
||||||
ply:SetSBDelay(CurTime() + 0.5)
|
ply:SetSBDelay(CurTime() + 0.5)
|
||||||
|
|
||||||
mv:SetVelocity(cmd:GetViewAngles():Forward() * 260 + Vector(0, 0, 150))
|
mv:SetVelocity(cmd:GetViewAngles():Forward() * 260 + Vector(0, 0, 150))
|
||||||
|
|
||||||
ParkourEvent("jumpfar", ply)
|
ParkourEvent("jumpfar", ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -197,4 +200,4 @@ local function Swingpipe(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "Swingpipe", Swingpipe)
|
hook.Add("SetupMove", "Swingpipe", Swingpipe)
|
|
@ -1,6 +1,4 @@
|
||||||
if not game.SinglePlayer() then
|
if not game.SinglePlayer() then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local slow = false
|
local slow = false
|
||||||
local slowlerp = 1
|
local slowlerp = 1
|
||||||
|
@ -9,7 +7,8 @@ local slowspeed = 2
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
util.AddNetworkString("SlowSounds")
|
util.AddNetworkString("SlowSounds")
|
||||||
hook.Add("Think", "TimeSlow", function ()
|
|
||||||
|
hook.Add("Think", "TimeSlow", function()
|
||||||
if slow and slowlerp ~= slowtarget then
|
if slow and slowlerp ~= slowtarget then
|
||||||
slowlerp = math.Approach(slowlerp, slowtarget, slowspeed * FrameTime())
|
slowlerp = math.Approach(slowlerp, slowtarget, slowspeed * FrameTime())
|
||||||
|
|
||||||
|
@ -36,7 +35,7 @@ local function TimeSlowSounds(t)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Receive("SlowSounds", function ()
|
net.Receive("SlowSounds", function()
|
||||||
local slowed = net.ReadBool()
|
local slowed = net.ReadBool()
|
||||||
|
|
||||||
if slowed then
|
if slowed then
|
||||||
|
@ -45,11 +44,12 @@ net.Receive("SlowSounds", function ()
|
||||||
hook.Remove("EntityEmitSound", "TimeSlow")
|
hook.Remove("EntityEmitSound", "TimeSlow")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
concommand.Add("ToggleTimeSlow", function (ply)
|
|
||||||
|
concommand.Add("ToggleTimeSlow", function(ply)
|
||||||
slow = not slow
|
slow = not slow
|
||||||
|
|
||||||
net.Start("SlowSounds")
|
net.Start("SlowSounds")
|
||||||
net.WriteBool(slow)
|
net.WriteBool(slow)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
|
|
||||||
if slow then
|
if slow then
|
||||||
|
@ -57,4 +57,4 @@ concommand.Add("ToggleTimeSlow", function (ply)
|
||||||
else
|
else
|
||||||
hook.Remove("EntityEmitSound", "TimeSlow")
|
hook.Remove("EntityEmitSound", "TimeSlow")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -73,6 +73,7 @@ end
|
||||||
|
|
||||||
local function Vault1(ply, mv, ang, t, h)
|
local function Vault1(ply, mv, ang, t, h)
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
|
|
||||||
t.start = mv:GetOrigin() + eyevec + ang:Forward() * 25
|
t.start = mv:GetOrigin() + eyevec + ang:Forward() * 25
|
||||||
t.endpos = t.start - neckvec
|
t.endpos = t.start - neckvec
|
||||||
t.filter = ply
|
t.filter = ply
|
||||||
|
@ -81,17 +82,9 @@ local function Vault1(ply, mv, ang, t, h)
|
||||||
|
|
||||||
t = util.TraceLine(t)
|
t = util.TraceLine(t)
|
||||||
|
|
||||||
if t.Entity and t.Entity.NoPlayerCollisions then
|
if t.Entity and t.Entity.NoPlayerCollisions then return false end
|
||||||
return false
|
if t.Entity and t.Entity.IsNPC and t.Entity:IsPlayer() then return false end
|
||||||
end
|
if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" 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
|
if t.Hit and t.Fraction > 0.3 then
|
||||||
local stepup = t.Fraction > 0.65
|
local stepup = t.Fraction > 0.65
|
||||||
|
@ -105,17 +98,12 @@ local function Vault1(ply, mv, ang, t, h)
|
||||||
|
|
||||||
tsafetyout = util.TraceLine(tsafety)
|
tsafetyout = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
TraceSetData(tsafety, t.HitPos, t.HitPos, mins, maxs, ply)
|
TraceSetData(tsafety, t.HitPos, t.HitPos, mins, maxs, ply)
|
||||||
|
|
||||||
tsafetyout = util.TraceHull(tsafety)
|
tsafetyout = util.TraceHull(tsafety)
|
||||||
|
if tsafetyout.Hit then return false end
|
||||||
if tsafetyout.Hit then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
TraceParkourMask(h)
|
TraceParkourMask(h)
|
||||||
TraceSetData(h, vaultend, vaultend, mins, maxs, ply)
|
TraceSetData(h, vaultend, vaultend, mins, maxs, ply)
|
||||||
|
@ -144,29 +132,25 @@ local function Vault1(ply, mv, ang, t, h)
|
||||||
TraceSetData(t, start, vaultendcheck, ply)
|
TraceSetData(t, start, vaultendcheck, ply)
|
||||||
|
|
||||||
t = util.TraceLine(t)
|
t = util.TraceLine(t)
|
||||||
|
if t.Hit then return end
|
||||||
if t.Hit then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
ply:SetMantleStartPos(mv:GetOrigin())
|
ply:SetMantleStartPos(mv:GetOrigin())
|
||||||
ply:SetMantleEndPos(vaultend)
|
ply:SetMantleEndPos(vaultend)
|
||||||
ply:SetMantleLerp(0)
|
ply:SetMantleLerp(0)
|
||||||
ply:SetMantle(1)
|
ply:SetMantle(1)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
PlayVaultAnim(ply)
|
|
||||||
ply:ViewPunch(vpunch1)
|
|
||||||
|
|
||||||
|
PlayVaultAnim(ply)
|
||||||
|
|
||||||
|
ply:ViewPunch(vpunch1)
|
||||||
ply.MantleInitVel = mv:GetVelocity()
|
ply.MantleInitVel = mv:GetVelocity()
|
||||||
ply.MantleMatType = mat
|
ply.MantleMatType = mat
|
||||||
|
|
||||||
if stepup then
|
if stepup then
|
||||||
ParkourEvent("stepup", ply)
|
ParkourEvent("stepup", ply)
|
||||||
|
|
||||||
ply.VaultStepUp = true
|
ply.VaultStepUp = true
|
||||||
else
|
else
|
||||||
ParkourEvent("vaultonto", ply)
|
ParkourEvent("vaultonto", ply)
|
||||||
|
|
||||||
ply.VaultStepUp = false
|
ply.VaultStepUp = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -199,25 +183,19 @@ local function Vault2(ply, mv, ang, t, h)
|
||||||
|
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
maxs.z = maxs.z * 0.5
|
maxs.z = maxs.z * 0.5
|
||||||
|
|
||||||
local start = mv:GetOrigin() + chestvec + ang:Forward() * 35
|
local start = mv:GetOrigin() + chestvec + ang:Forward() * 35
|
||||||
|
|
||||||
TraceSetData(t, start, start, mins, maxs, ply)
|
TraceSetData(t, start, start, mins, maxs, ply)
|
||||||
TraceParkourMask(t)
|
TraceParkourMask(t)
|
||||||
|
|
||||||
local vaultpos = t.endpos + ang:Forward() * 35
|
local vaultpos = t.endpos + ang:Forward() * 35
|
||||||
|
|
||||||
t = util.TraceHull(t)
|
t = util.TraceHull(t)
|
||||||
|
|
||||||
if t.Entity and t.Entity.NoPlayerCollisions then
|
if t.Entity and t.Entity.NoPlayerCollisions then return false end
|
||||||
return false
|
if t.Entity and t.Entity.IsNPC and t.Entity:IsPlayer() then return false end
|
||||||
end
|
if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" 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
|
if t.Hit then
|
||||||
local tsafety = {}
|
local tsafety = {}
|
||||||
|
@ -225,32 +203,27 @@ local function Vault2(ply, mv, ang, t, h)
|
||||||
local start = nil
|
local start = nil
|
||||||
|
|
||||||
TraceParkourMask(tsafety)
|
TraceParkourMask(tsafety)
|
||||||
|
|
||||||
tsafety.output = tsafetyout
|
tsafety.output = tsafetyout
|
||||||
start = mv:GetOrigin() + eyevec
|
start = mv:GetOrigin() + eyevec
|
||||||
|
|
||||||
TraceSetData(tsafety, start, start + ang:Forward() * 100, mins, maxs, ply)
|
TraceSetData(tsafety, start, start + ang:Forward() * 100, mins, maxs, ply)
|
||||||
|
|
||||||
util.TraceLine(tsafety)
|
util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
start = start + ang:Forward() * 100
|
start = start + ang:Forward() * 100
|
||||||
|
|
||||||
TraceSetData(tsafety, start, start - thoraxvec)
|
TraceSetData(tsafety, start, start - thoraxvec)
|
||||||
|
|
||||||
util.TraceLine(tsafety)
|
util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
start = t.StartPos + chestvec
|
start = t.StartPos + chestvec
|
||||||
|
|
||||||
TraceSetData(h, start, start, mins, maxs, ply)
|
TraceSetData(h, start, start, mins, maxs, ply)
|
||||||
|
|
||||||
TraceParkourMask(h)
|
TraceParkourMask(h)
|
||||||
|
|
||||||
local hulltr = util.TraceHull(h)
|
local hulltr = util.TraceHull(h)
|
||||||
|
|
||||||
mins, maxs = ply:GetHull()
|
mins, maxs = ply:GetHull()
|
||||||
|
|
||||||
TraceSetData(h, vaultpos, vaultpos, mins, maxs, ply)
|
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:SetMantleData(mv:GetOrigin(), vaultpos, 0, 2)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
PlayVaultAnim(ply, 1)
|
|
||||||
ply:ViewPunch(vpunch2)
|
|
||||||
|
|
||||||
|
PlayVaultAnim(ply, 1)
|
||||||
|
|
||||||
|
ply:ViewPunch(vpunch2)
|
||||||
ply.MantleInitVel = mv:GetVelocity()
|
ply.MantleInitVel = mv:GetVelocity()
|
||||||
ply.MantleInitVel.z = 0
|
ply.MantleInitVel.z = 0
|
||||||
ply.MantleMatType = t.MatType
|
ply.MantleMatType = t.MatType
|
||||||
|
@ -274,10 +248,11 @@ local function Vault2(ply, mv, ang, t, h)
|
||||||
ParkourEvent("vault", ply)
|
ParkourEvent("vault", ply)
|
||||||
|
|
||||||
if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then
|
if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then
|
||||||
timer.Simple(0.1, function ()
|
timer.Simple(0.1, function()
|
||||||
ply:EmitSound("Cloth.VaultSwish")
|
ply:EmitSound("Cloth.VaultSwish")
|
||||||
ply:FaithVO("Faith.StrainSoft")
|
ply:FaithVO("Faith.StrainSoft")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ply:EmitSound("Handsteps.ConcreteHard")
|
ply:EmitSound("Handsteps.ConcreteHard")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -291,28 +266,22 @@ end
|
||||||
local function Vault3(ply, mv, ang, t, h)
|
local function Vault3(ply, mv, ang, t, h)
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
maxs.z = maxs.z * 0.5
|
maxs.z = maxs.z * 0.5
|
||||||
|
|
||||||
t.start = mv:GetOrigin() + chestvec + ang:Forward() * 35
|
t.start = mv:GetOrigin() + chestvec + ang:Forward() * 35
|
||||||
t.endpos = t.start
|
t.endpos = t.start
|
||||||
t.filter = ply
|
t.filter = ply
|
||||||
|
|
||||||
TraceParkourMask(t)
|
TraceParkourMask(t)
|
||||||
|
|
||||||
t.maxs = maxs
|
t.maxs = maxs
|
||||||
t.mins = mins
|
t.mins = mins
|
||||||
|
|
||||||
local vaultpos = t.endpos + ang:Forward() * 60
|
local vaultpos = t.endpos + ang:Forward() * 60
|
||||||
|
|
||||||
t = util.TraceHull(t)
|
t = util.TraceHull(t)
|
||||||
|
|
||||||
if t.Entity and t.Entity.NoPlayerCollisions then
|
if t.Entity and t.Entity.NoPlayerCollisions then return false end
|
||||||
return false
|
if t.Entity and t.Entity.IsNPC and (t.Entity:IsNPC() or t.Entity:IsPlayer()) then return false end
|
||||||
end
|
if IsValid(t.Entity) and t.Entity:GetClass() == "br_swingbar" 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
|
if t.Hit then
|
||||||
local tsafety = {}
|
local tsafety = {}
|
||||||
|
@ -320,34 +289,27 @@ local function Vault3(ply, mv, ang, t, h)
|
||||||
local start = nil
|
local start = nil
|
||||||
|
|
||||||
TraceParkourMask(tsafety)
|
TraceParkourMask(tsafety)
|
||||||
|
|
||||||
tsafety.output = tsafetyout
|
tsafety.output = tsafetyout
|
||||||
start = mv:GetOrigin() + eyevec
|
start = mv:GetOrigin() + eyevec
|
||||||
|
|
||||||
TraceSetData(tsafety, start, start + ang:Forward() * 150, ply)
|
TraceSetData(tsafety, start, start + ang:Forward() * 150, ply)
|
||||||
|
|
||||||
util.TraceLine(tsafety)
|
util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
start = mv:GetOrigin() + eyevec + ang:Forward() * 150
|
start = mv:GetOrigin() + eyevec + ang:Forward() * 150
|
||||||
|
|
||||||
TraceSetData(tsafety, start, start - thoraxvec)
|
TraceSetData(tsafety, start, start - thoraxvec)
|
||||||
|
|
||||||
util.TraceLine(tsafety)
|
util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
start = mv:GetOrigin() + eyevec + ang:Forward() * 150
|
start = mv:GetOrigin() + eyevec + ang:Forward() * 150
|
||||||
|
|
||||||
TraceSetData(tsafety, start, start - aircheck)
|
TraceSetData(tsafety, start, start - aircheck)
|
||||||
|
|
||||||
util.TraceLine(tsafety)
|
util.TraceLine(tsafety)
|
||||||
|
|
||||||
if not tsafetyout.Hit then
|
if not tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
mins.z = mins.z * 1
|
mins.z = mins.z * 1
|
||||||
h.start = t.StartPos + chestvec
|
h.start = t.StartPos + chestvec
|
||||||
|
@ -357,14 +319,15 @@ local function Vault3(ply, mv, ang, t, h)
|
||||||
h.mins = mins
|
h.mins = mins
|
||||||
|
|
||||||
TraceParkourMask(h)
|
TraceParkourMask(h)
|
||||||
|
|
||||||
local hulltr = util.TraceHull(h)
|
local hulltr = util.TraceHull(h)
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
|
|
||||||
h.start = vaultpos
|
h.start = vaultpos
|
||||||
h.endpos = h.start
|
h.endpos = h.start
|
||||||
h.filter = ply
|
h.filter = ply
|
||||||
h.maxs = maxs
|
h.maxs = maxs
|
||||||
h.mins = mins
|
h.mins = mins
|
||||||
|
|
||||||
local hulltr2 = util.TraceHull(h)
|
local hulltr2 = util.TraceHull(h)
|
||||||
|
|
||||||
if not hulltr.Hit and not hulltr2.Hit then
|
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:SetMantleData(mv:GetOrigin(), vaultpos, 0, 3)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
PlayVaultAnim(ply, 2)
|
|
||||||
ply:ViewPunch(vpunch3)
|
|
||||||
|
|
||||||
|
PlayVaultAnim(ply, 2)
|
||||||
|
|
||||||
|
ply:ViewPunch(vpunch3)
|
||||||
ply.MantleInitVel = mv:GetVelocity()
|
ply.MantleInitVel = mv:GetVelocity()
|
||||||
ply.MantleInitVel.z = 0
|
ply.MantleInitVel.z = 0
|
||||||
ply.MantleMatType = t.MatType
|
ply.MantleMatType = t.MatType
|
||||||
|
@ -384,10 +348,11 @@ local function Vault3(ply, mv, ang, t, h)
|
||||||
ParkourEvent("vaultkong", ply)
|
ParkourEvent("vaultkong", ply)
|
||||||
|
|
||||||
if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then
|
if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then
|
||||||
timer.Simple(0.1, function ()
|
timer.Simple(0.1, function()
|
||||||
ply:EmitSound("Cloth.VaultSwish")
|
ply:EmitSound("Cloth.VaultSwish")
|
||||||
ply:FaithVO("Faith.StrainSoft")
|
ply:FaithVO("Faith.StrainSoft")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ply:EmitSound("Handsteps.ConcreteHard")
|
ply:EmitSound("Handsteps.ConcreteHard")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -400,36 +365,36 @@ end
|
||||||
|
|
||||||
function Vault4(ply, mv, ang, t, h)
|
function Vault4(ply, mv, ang, t, h)
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
|
|
||||||
t.StartPos = mv:GetOrigin() + eyevec + ang:Forward() * 50
|
t.StartPos = mv:GetOrigin() + eyevec + ang:Forward() * 50
|
||||||
|
|
||||||
local vaultpos = mv:GetOrigin() + ang:Forward() * 65 + vault1vec
|
local vaultpos = mv:GetOrigin() + ang:Forward() * 65 + vault1vec
|
||||||
|
|
||||||
local tsafety = {
|
local tsafety = {
|
||||||
start = mv:GetOrigin() + hairvec
|
start = mv:GetOrigin() + hairvec
|
||||||
}
|
}
|
||||||
|
|
||||||
tsafety.endpos = tsafety.start + ang:Forward() * 75
|
tsafety.endpos = tsafety.start + ang:Forward() * 75
|
||||||
tsafety.filter = ply
|
tsafety.filter = ply
|
||||||
tsafety.mask = MASK_PLAYERSOLID
|
tsafety.mask = MASK_PLAYERSOLID
|
||||||
tsafety.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
tsafety.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
||||||
|
|
||||||
local tsafetyout = util.TraceLine(tsafety)
|
local tsafetyout = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
tsafety.start = mv:GetOrigin() + aircheck + ang:Forward() * 40
|
tsafety.start = mv:GetOrigin() + aircheck + ang:Forward() * 40
|
||||||
tsafety.endpos = tsafety.start - hairvec
|
tsafety.endpos = tsafety.start - hairvec
|
||||||
|
|
||||||
local tsafetyout = util.TraceLine(tsafety)
|
local tsafetyout = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
tsafety.start = mv:GetOrigin() + chestvec
|
tsafety.start = mv:GetOrigin() + chestvec
|
||||||
tsafety.endpos = tsafety.start + ang:Forward() * 150
|
tsafety.endpos = tsafety.start + ang:Forward() * 150
|
||||||
|
|
||||||
local tsafetyout = util.TraceLine(tsafety)
|
local tsafetyout = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if not tsafetyout.Hit then
|
if not tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
mins.z = mins.z * 1
|
mins.z = mins.z * 1
|
||||||
h.start = vaultpos
|
h.start = vaultpos
|
||||||
|
@ -439,19 +404,19 @@ function Vault4(ply, mv, ang, t, h)
|
||||||
h.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
h.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
||||||
h.maxs = maxs
|
h.maxs = maxs
|
||||||
h.mins = mins
|
h.mins = mins
|
||||||
|
|
||||||
local hsafetyout = util.TraceHull(h)
|
local hsafetyout = util.TraceHull(h)
|
||||||
|
|
||||||
if hsafetyout.Hit then
|
if hsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local startpos = ply:GetWallrun() ~= 1 and mv:GetOrigin() or mv:GetOrigin() + Vector(0, 0, 20) - ang:Forward() * 5
|
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:SetMantleData(startpos, vaultpos, 0, 4)
|
||||||
ply:SetWallrunTime(0)
|
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 = mv:GetVelocity()
|
||||||
ply.MantleInitVel.z = 0
|
ply.MantleInitVel.z = 0
|
||||||
ply.MantleMatType = t.MatType
|
ply.MantleMatType = t.MatType
|
||||||
|
@ -465,21 +430,24 @@ function Vault4(ply, mv, ang, t, h)
|
||||||
end
|
end
|
||||||
|
|
||||||
if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then
|
if game.SinglePlayer() or CLIENT and IsFirstTimePredicted() then
|
||||||
timer.Simple(0.1, function ()
|
timer.Simple(0.1, function()
|
||||||
ply:EmitSound("Cloth.VaultSwish")
|
ply:EmitSound("Cloth.VaultSwish")
|
||||||
ply:FaithVO("Faith.StrainSoft")
|
ply:FaithVO("Faith.StrainSoft")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ply:EmitSound("Handsteps.ConcreteHard")
|
ply:EmitSound("Handsteps.ConcreteHard")
|
||||||
end
|
end
|
||||||
|
|
||||||
if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then
|
if CLIENT and IsFirstTimePredicted() or game.SinglePlayer() then
|
||||||
tsafety.start = ply:EyePos()
|
tsafety.start = ply:EyePos()
|
||||||
tsafety.endpos = tsafety.start + ang:Forward() * 100
|
tsafety.endpos = tsafety.start + ang:Forward() * 100
|
||||||
|
|
||||||
local tsafetyout = util.TraceLine(tsafety)
|
local tsafetyout = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.MatType == MAT_GRATE then
|
if tsafetyout.MatType == MAT_GRATE then
|
||||||
ply:EmitSound("FenceClimb")
|
ply:EmitSound("FenceClimb")
|
||||||
timer.Simple(0.45, function ()
|
|
||||||
|
timer.Simple(0.45, function()
|
||||||
ply:EmitSound("FenceClimbEnd")
|
ply:EmitSound("FenceClimbEnd")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -489,16 +457,12 @@ function Vault4(ply, mv, ang, t, h)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Vault5(ply, mv, ang, t, h)
|
function Vault5(ply, mv, ang, t, h)
|
||||||
if ply:GetWallrun() == 1 and ply:GetWallrunTime() - CurTime() < 0.75 then
|
if ply:GetWallrun() == 1 and ply:GetWallrunTime() - CurTime() < 0.75 then return false end
|
||||||
return false
|
if mv:GetVelocity().z < (not ply:GetDive() and -100 or -1000) then return false end
|
||||||
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 eyevec = not ply:Crouching() and eyevec or eyevecduck
|
||||||
local neckvec = not ply:Crouching() and neckvec or neckvecduck
|
local neckvec = not ply:Crouching() and neckvec or neckvecduck
|
||||||
|
|
||||||
t.start = mv:GetOrigin() + eyevec + ang:Forward() * 70
|
t.start = mv:GetOrigin() + eyevec + ang:Forward() * 70
|
||||||
t.endpos = t.start - neckvec
|
t.endpos = t.start - neckvec
|
||||||
t.filter = ply
|
t.filter = ply
|
||||||
|
@ -506,15 +470,11 @@ function Vault5(ply, mv, ang, t, h)
|
||||||
t.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
t.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
||||||
t = util.TraceLine(t)
|
t = util.TraceLine(t)
|
||||||
|
|
||||||
if not t.Hit then
|
if not t.Hit then return false end
|
||||||
return false
|
if t.Entity and t.Entity.NoPlayerCollisions then return false end
|
||||||
end
|
|
||||||
|
|
||||||
if t.Entity and t.Entity.NoPlayerCollisions then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local vaultend = t.HitPos + mantlevec
|
local vaultend = t.HitPos + mantlevec
|
||||||
|
|
||||||
local tsafety = {
|
local tsafety = {
|
||||||
start = t.StartPos - ang:Forward() * 70,
|
start = t.StartPos - ang:Forward() * 70,
|
||||||
endpos = t.StartPos,
|
endpos = t.StartPos,
|
||||||
|
@ -522,19 +482,17 @@ function Vault5(ply, mv, ang, t, h)
|
||||||
mask = MASK_PLAYERSOLID,
|
mask = MASK_PLAYERSOLID,
|
||||||
collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
||||||
}
|
}
|
||||||
|
|
||||||
tsafety = util.TraceLine(tsafety)
|
tsafety = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafety.Hit then
|
if tsafety.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
tsafety.start = mv:GetOrigin() + hairvec
|
tsafety.start = mv:GetOrigin() + hairvec
|
||||||
tsafety.endpos = tsafety.start + ang:Forward() * 60
|
tsafety.endpos = tsafety.start + ang:Forward() * 60
|
||||||
|
|
||||||
local tsafetyout = util.TraceLine(tsafety)
|
local tsafetyout = util.TraceLine(tsafety)
|
||||||
|
|
||||||
if tsafetyout.Hit then
|
if tsafetyout.Hit then return false end
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
h.start = vaultend
|
h.start = vaultend
|
||||||
h.endpos = h.start
|
h.endpos = h.start
|
||||||
|
@ -542,6 +500,7 @@ function Vault5(ply, mv, ang, t, h)
|
||||||
h.mask = MASK_PLAYERSOLID
|
h.mask = MASK_PLAYERSOLID
|
||||||
h.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
h.collisiongroup = COLLISION_GROUP_PLAYER_MOVEMENT
|
||||||
h.mins, h.maxs = ply:GetHull()
|
h.mins, h.maxs = ply:GetHull()
|
||||||
|
|
||||||
local hulltr = util.TraceHull(h)
|
local hulltr = util.TraceHull(h)
|
||||||
|
|
||||||
if not hulltr.Hit then
|
if not hulltr.Hit then
|
||||||
|
@ -554,9 +513,10 @@ function Vault5(ply, mv, ang, t, h)
|
||||||
ply:SetMantleLerp(0)
|
ply:SetMantleLerp(0)
|
||||||
ply:SetMantle(5)
|
ply:SetMantle(5)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
PlayVaultAnim(ply, false, ang)
|
|
||||||
ply:ViewPunch(vpunch1)
|
|
||||||
|
|
||||||
|
PlayVaultAnim(ply, false, ang)
|
||||||
|
|
||||||
|
ply:ViewPunch(vpunch1)
|
||||||
ply.MantleInitVel = mv:GetVelocity()
|
ply.MantleInitVel = mv:GetVelocity()
|
||||||
ply.MantleMatType = t.MatType
|
ply.MantleMatType = t.MatType
|
||||||
|
|
||||||
|
@ -572,10 +532,8 @@ function Vault5(ply, mv, ang, t, h)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
hook.Add("SetupMove", "BeatrunVaulting", function(ply, mv, cmd)
|
||||||
if ply.MantleDisabled or IsValid(ply:GetSwingbar()) or ply:GetClimbing() ~= 0 or ply:GetMelee() ~= 0 then
|
if ply.MantleDisabled or IsValid(ply:GetSwingbar()) or ply:GetClimbing() ~= 0 or ply:GetMelee() ~= 0 then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not ply:Alive() then
|
if not ply:Alive() then
|
||||||
if ply:GetMantle() ~= 0 then
|
if ply:GetMantle() ~= 0 then
|
||||||
|
@ -588,13 +546,12 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
||||||
if ply:GetMantle() == 0 then
|
if ply:GetMantle() == 0 then
|
||||||
local mvtype = ply:GetMoveType()
|
local mvtype = ply:GetMoveType()
|
||||||
|
|
||||||
if ply:OnGround() or mv:GetVelocity().z < -350 or mvtype == MOVETYPE_NOCLIP or mvtype == MOVETYPE_LADDER then
|
if ply:OnGround() or mv:GetVelocity().z < -350 or mvtype == MOVETYPE_NOCLIP or mvtype == MOVETYPE_LADDER then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
ply.mantletr = ply.mantletr or {}
|
ply.mantletr = ply.mantletr or {}
|
||||||
ply.mantlehull = ply.mantlehull or {}
|
ply.mantlehull = ply.mantlehull or {}
|
||||||
|
|
||||||
local t = ply.mantletr
|
local t = ply.mantletr
|
||||||
local h = ply.mantlehull
|
local h = ply.mantlehull
|
||||||
|
|
||||||
|
@ -618,8 +575,11 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
||||||
mv:SetSideSpeed(0)
|
mv:SetSideSpeed(0)
|
||||||
mv:SetUpSpeed(0)
|
mv:SetUpSpeed(0)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
|
|
||||||
cmd:ClearMovement()
|
cmd:ClearMovement()
|
||||||
|
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
|
||||||
ply:SetMoveType(MOVETYPE_NOCLIP)
|
ply:SetMoveType(MOVETYPE_NOCLIP)
|
||||||
|
|
||||||
local mantletype = ply:GetMantle()
|
local mantletype = ply:GetMantle()
|
||||||
|
@ -653,6 +613,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
||||||
if mlerp < 0.25 then
|
if mlerp < 0.25 then
|
||||||
if mlerp > 0.1 then
|
if mlerp > 0.1 then
|
||||||
local mult = math.max(0.5, 0.5 + ply.MantleInitVel:Length() / 375 * 0.3 - 0.2)
|
local mult = math.max(0.5, 0.5 + ply.MantleInitVel:Length() / 375 * 0.3 - 0.2)
|
||||||
|
|
||||||
mlerprate = mlerprate * mult
|
mlerprate = mlerprate * mult
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -686,6 +647,7 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
local mult = math.max(0.75, 0.75 + ply.MantleInitVel:Length() / 350 * 0.3 - 0.2)
|
local mult = math.max(0.75, 0.75 + ply.MantleInitVel:Length() / 350 * 0.3 - 0.2)
|
||||||
|
|
||||||
mlerprate = mlerprate * mult
|
mlerprate = mlerprate * mult
|
||||||
|
|
||||||
ply:SetMantleLerp(math.Approach(mlerp, 1, mlerprate))
|
ply:SetMantleLerp(math.Approach(mlerp, 1, mlerprate))
|
||||||
|
@ -740,11 +702,13 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
mlerp = ply:GetMantleLerp()
|
mlerp = ply:GetMantleLerp()
|
||||||
|
|
||||||
h.start = mvec
|
h.start = mvec
|
||||||
h.endpos = h.start
|
h.endpos = h.start
|
||||||
h.filter = ply
|
h.filter = ply
|
||||||
h.mask = MASK_PLAYERSOLID
|
h.mask = MASK_PLAYERSOLID
|
||||||
h.mins, h.maxs = ply:GetHull()
|
h.mins, h.maxs = ply:GetHull()
|
||||||
|
|
||||||
local hulltr = util.TraceHull(h)
|
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
|
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
|
end
|
||||||
|
|
||||||
local springboardvel = ang:Forward() * math.Clamp((ply.MantleInitVel or vector_origin):Length() * 0.75, 200, 300) + Vector(0, 0, 350)
|
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:Mul(ply:GetOverdriveMult())
|
||||||
|
|
||||||
springboardvel[3] = springboardvel[3] / ply:GetOverdriveMult()
|
springboardvel[3] = springboardvel[3] / ply:GetOverdriveMult()
|
||||||
|
|
||||||
mv:SetVelocity(springboardvel)
|
mv:SetVelocity(springboardvel)
|
||||||
|
@ -810,4 +772,4 @@ hook.Add("SetupMove", "BeatrunVaulting", function (ply, mv, cmd)
|
||||||
mv:SetButtons(0)
|
mv:SetButtons(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -2,10 +2,8 @@ local vwrtime = 1.5
|
||||||
local hwrtime = 1.5
|
local hwrtime = 1.5
|
||||||
tiltdir = 1
|
tiltdir = 1
|
||||||
local tilt = 0
|
local tilt = 0
|
||||||
PuristWallrun = CreateConVar("Beatrun_PuristWallrun", 1, {
|
|
||||||
FCVAR_REPLICATED,
|
PuristWallrun = CreateConVar("Beatrun_PuristWallrun", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "'Realistic' wallrunning", 0, 1)
|
||||||
FCVAR_ARCHIVE
|
|
||||||
}, "'Realistic' wallrunning", 0, 1)
|
|
||||||
|
|
||||||
function WallrunningTilt(ply, pos, ang, fov)
|
function WallrunningTilt(ply, pos, ang, fov)
|
||||||
local wr = ply:GetWallrun()
|
local wr = ply:GetWallrun()
|
||||||
|
@ -17,7 +15,9 @@ function WallrunningTilt(ply, pos, ang, fov)
|
||||||
end
|
end
|
||||||
|
|
||||||
ang.z = ang.z + tilt
|
ang.z = ang.z + tilt
|
||||||
|
|
||||||
local tiltspeed = wr >= 2 and math.max(math.abs(tilt / 15 * tiltdir - 1) * 1.75, 0.1) or 1
|
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)
|
tilt = math.Approach(tilt, wr >= 2 and 15 * tiltdir or 0, RealFrameTime() * (wr >= 2 and 30 or 70) * tiltspeed)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,28 +27,30 @@ if SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
if CLIENT and game.SinglePlayer() then
|
if CLIENT and game.SinglePlayer() then
|
||||||
net.Receive("BodyAnimWallrun", function ()
|
net.Receive("BodyAnimWallrun", function()
|
||||||
local a = net.ReadBool()
|
local a = net.ReadBool()
|
||||||
|
|
||||||
if a then
|
if a then
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local eyeang = ply:EyeAngles()
|
local eyeang = ply:EyeAngles()
|
||||||
|
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
ply.WallrunOrigAng = net.ReadAngle()
|
ply.WallrunOrigAng = net.ReadAngle()
|
||||||
|
|
||||||
BodyLimitX = 25
|
BodyLimitX = 25
|
||||||
BodyLimitY = 70
|
BodyLimitY = 70
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
|
|
||||||
BodyAnim:SetSequence("wallrunverticalstart")
|
BodyAnim:SetSequence("wallrunverticalstart")
|
||||||
else
|
else
|
||||||
BodyLimitX = 90
|
BodyLimitX = 90
|
||||||
BodyLimitY = 180
|
BodyLimitY = 180
|
||||||
BodyAnimCycle = 0
|
BodyAnimCycle = 0
|
||||||
|
|
||||||
BodyAnim:SetSequence("jumpair")
|
BodyAnim:SetSequence("jumpair")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
net.Receive("WallrunTilt", function ()
|
|
||||||
|
net.Receive("WallrunTilt", function()
|
||||||
if net.ReadBool() then
|
if net.ReadBool() then
|
||||||
tiltdir = -1
|
tiltdir = -1
|
||||||
else
|
else
|
||||||
|
@ -72,6 +74,7 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
if mv:KeyPressed(IN_DUCK) then
|
if mv:KeyPressed(IN_DUCK) then
|
||||||
ply:SetCrouchJumpBlocked(true)
|
ply:SetCrouchJumpBlocked(true)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
|
|
||||||
mv:SetButtons(mv:GetButtons() - IN_DUCK)
|
mv:SetButtons(mv:GetButtons() - IN_DUCK)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -86,6 +89,7 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
if wr == 4 then
|
if wr == 4 then
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
local vel = ang:Forward() * 30
|
local vel = ang:Forward() * 30
|
||||||
vel.z = 25
|
vel.z = 25
|
||||||
|
|
||||||
|
@ -96,6 +100,7 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then
|
if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then
|
||||||
ply:SetWallrun(0)
|
ply:SetWallrun(0)
|
||||||
ply:SetQuickturn(false)
|
ply:SetQuickturn(false)
|
||||||
|
|
||||||
mv:SetVelocity(vel * 4)
|
mv:SetVelocity(vel * 4)
|
||||||
|
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
|
@ -114,12 +119,13 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
|
|
||||||
if mv:KeyPressed(IN_JUMP) then
|
if mv:KeyPressed(IN_JUMP) then
|
||||||
ParkourEvent("jumpwallrun", ply)
|
ParkourEvent("jumpwallrun", ply)
|
||||||
|
|
||||||
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
||||||
|
|
||||||
vel.z = 30
|
vel.z = 30
|
||||||
|
|
||||||
vel:Mul(ply:GetOverdriveMult())
|
vel:Mul(ply:GetOverdriveMult())
|
||||||
|
|
||||||
mv:SetVelocity(vel * 8)
|
mv:SetVelocity(vel * 8)
|
||||||
|
|
||||||
ply:SetWallrun(0)
|
ply:SetWallrun(0)
|
||||||
ply:SetQuickturn(false)
|
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 velz = math.Clamp((ply:GetWallrunTime() - CurTime()) / vwrtime, 0.1, 1)
|
||||||
local vecvel = Vector()
|
local vecvel = Vector()
|
||||||
vecvel.z = 200 * velz
|
vecvel.z = 200 * velz
|
||||||
|
|
||||||
vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50)
|
vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50)
|
||||||
vecvel:Mul(ply:GetOverdriveMult())
|
vecvel:Mul(ply:GetOverdriveMult())
|
||||||
|
|
||||||
mv:SetVelocity(vecvel)
|
mv:SetVelocity(vecvel)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
mv:SetSideSpeed(0)
|
|
||||||
|
|
||||||
|
mv:SetSideSpeed(0)
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
local eyeang = ply.WallrunOrigAng or Angle()
|
local eyeang = ply.WallrunOrigAng or Angle()
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
||||||
tr.endpos = tr.start + eyeang:Forward() * 40
|
tr.endpos = tr.start + eyeang:Forward() * 40
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -281,6 +288,7 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
ply:SetQuickturn(false)
|
ply:SetQuickturn(false)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
||||||
|
|
||||||
mv:SetVelocity(eyeang:Forward() * math.max(150, vecvel:Length() - 50) + Vector(0, 0, 250))
|
mv:SetVelocity(eyeang:Forward() * math.max(150, vecvel:Length() - 50) + Vector(0, 0, 250))
|
||||||
|
|
||||||
local event = ply:GetWallrun() == 3 and "jumpwallrunright" or "jumpwallrunleft"
|
local event = ply:GetWallrun() == 3 and "jumpwallrunright" or "jumpwallrunleft"
|
||||||
|
@ -305,7 +313,8 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
ply:EmitSound("Wallrun.Concrete")
|
ply:EmitSound("Wallrun.Concrete")
|
||||||
timer.Simple(0.025, function ()
|
|
||||||
|
timer.Simple(0.025, function()
|
||||||
ply:EmitSound("WallrunRelease.Concrete")
|
ply:EmitSound("WallrunRelease.Concrete")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -327,7 +336,7 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
BodyAnim:SetSequence("jumpair")
|
BodyAnim:SetSequence("jumpair")
|
||||||
elseif game.SinglePlayer() and wr == 1 then
|
elseif game.SinglePlayer() and wr == 1 then
|
||||||
net.Start("BodyAnimWallrun")
|
net.Start("BodyAnimWallrun")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -337,7 +346,7 @@ local function WallrunningThink(ply, mv, cmd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local upcheck = Vector(0, 0, 75)
|
-- local upcheck = Vector(0, 0, 75)
|
||||||
|
|
||||||
local function WallrunningCheck(ply, mv, cmd)
|
local function WallrunningCheck(ply, mv, cmd)
|
||||||
if not ply.WallrunTrace then
|
if not ply.WallrunTrace then
|
||||||
|
@ -347,18 +356,15 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
local eyeang = ply:EyeAngles()
|
local eyeang = ply:EyeAngles()
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
local vel = mv:GetVelocity()
|
local vel = mv:GetVelocity()
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
|
|
||||||
local timemult = math.max(1 - math.max(ply:GetWallrunCount() - 1, 0) * 0.2, 0.5)
|
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)
|
local speedmult = math.max(0.9, math.min(vel:Length(), 260) / 250)
|
||||||
|
|
||||||
if ply:GetGrappling() then
|
if ply:GetGrappling() then return end
|
||||||
return
|
if ply:GetJumpTurn() then return end
|
||||||
end
|
|
||||||
|
|
||||||
if ply:GetJumpTurn() then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if PuristWallrun:GetBool() then
|
if PuristWallrun:GetBool() then
|
||||||
PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
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
|
if not ply:OnGround() and mv:KeyDown(IN_JUMP) and mv:GetVelocity().z > -200 then
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
|
|
||||||
tr.start = ply:EyePos() - Vector(0, 0, 15)
|
tr.start = ply:EyePos() - Vector(0, 0, 15)
|
||||||
tr.endpos = tr.start + eyeang:Forward() * 25
|
tr.endpos = tr.start + eyeang:Forward() * 25
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -377,13 +384,8 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then
|
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end
|
||||||
return
|
if trout.Entity and trout.Entity.IsNPC and (trout.Entity.NoWallrun or trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end
|
||||||
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
|
if trout.Hit and timemult > 0.5 then
|
||||||
tr.start = tr.start + Vector(0, 0, 10)
|
tr.start = tr.start + Vector(0, 0, 10)
|
||||||
|
@ -394,9 +396,11 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
if trout.Hit then
|
if trout.Hit then
|
||||||
local angdir = trout.HitNormal:Angle()
|
local angdir = trout.HitNormal:Angle()
|
||||||
angdir.y = angdir.y - 180
|
angdir.y = angdir.y - 180
|
||||||
|
|
||||||
local wallnormal = trout.HitNormal
|
local wallnormal = trout.HitNormal
|
||||||
local eyeang = Angle(angdir)
|
local eyeang = Angle(angdir)
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
||||||
tr.endpos = tr.start + eyeang:Forward() * 40
|
tr.endpos = tr.start + eyeang:Forward() * 40
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -405,18 +409,16 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if not trout.Hit then
|
if not trout.Hit then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
ply:EmitSound("Bump.Concrete")
|
ply:EmitSound("Bump.Concrete")
|
||||||
end
|
end
|
||||||
|
|
||||||
ply.WallrunOrigAng = angdir
|
ply.WallrunOrigAng = angdir
|
||||||
|
|
||||||
ply:SetWallrunData(1, CurTime() + vwrtime * timemult * speedmult, wallnormal)
|
ply:SetWallrunData(1, CurTime() + vwrtime * timemult * speedmult, wallnormal)
|
||||||
ply:ViewPunch(Angle(-5, 0, 0))
|
ply:ViewPunch(Angle(-5, 0, 0))
|
||||||
|
|
||||||
ParkourEvent("wallrunv", ply)
|
ParkourEvent("wallrunv", ply)
|
||||||
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
|
@ -429,8 +431,8 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
ply.OrigEyeAng = angdir
|
ply.OrigEyeAng = angdir
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("BodyAnimWallrun")
|
net.Start("BodyAnimWallrun")
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.WriteAngle(angdir)
|
net.WriteAngle(angdir)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
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
|
if mv:KeyDown(IN_JUMP) and not ply:OnGround() or mv:KeyPressed(IN_JUMP) then
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
|
|
||||||
tr.start = ply:EyePos()
|
tr.start = ply:EyePos()
|
||||||
tr.endpos = tr.start + eyeang:Right() * 25
|
tr.endpos = tr.start + eyeang:Right() * 25
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -450,9 +453,7 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then
|
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
||||||
local ovel = mv:GetVelocity()
|
local ovel = mv:GetVelocity()
|
||||||
|
@ -460,8 +461,11 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
ply:SetWallrunOrigVel(ovel)
|
ply:SetWallrunOrigVel(ovel)
|
||||||
ply:SetWallrunElevated(false)
|
ply:SetWallrunElevated(false)
|
||||||
|
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
|
||||||
ply:SetWallrunData(2, CurTime() + hwrtime * timemult, trout.HitNormal)
|
ply:SetWallrunData(2, CurTime() + hwrtime * timemult, trout.HitNormal)
|
||||||
|
|
||||||
ParkourEvent("wallrunh", ply)
|
ParkourEvent("wallrunh", ply)
|
||||||
|
|
||||||
if CLIENT and IsFirstTimePredicted() then
|
if CLIENT and IsFirstTimePredicted() then
|
||||||
|
@ -470,7 +474,7 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
||||||
elseif SERVER and game.SinglePlayer() then
|
elseif SERVER and game.SinglePlayer() then
|
||||||
net.Start("WallrunTilt")
|
net.Start("WallrunTilt")
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
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
|
if mv:KeyDown(IN_JUMP) and not ply:OnGround() or mv:KeyPressed(IN_JUMP) then
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
|
|
||||||
tr.start = ply:EyePos()
|
tr.start = ply:EyePos()
|
||||||
tr.endpos = tr.start + eyeang:Right() * -25
|
tr.endpos = tr.start + eyeang:Right() * -25
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -489,9 +494,7 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then
|
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
||||||
local ovel = mv:GetVelocity()
|
local ovel = mv:GetVelocity()
|
||||||
|
@ -499,9 +502,12 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
|
|
||||||
ply:SetWallrunOrigVel(ovel)
|
ply:SetWallrunOrigVel(ovel)
|
||||||
ply:SetWallrunDir(trout.HitNormal)
|
ply:SetWallrunDir(trout.HitNormal)
|
||||||
|
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
|
||||||
ply:SetWallrunElevated(false)
|
ply:SetWallrunElevated(false)
|
||||||
ply:SetWallrunData(3, CurTime() + hwrtime * timemult, trout.HitNormal)
|
ply:SetWallrunData(3, CurTime() + hwrtime * timemult, trout.HitNormal)
|
||||||
|
|
||||||
ParkourEvent("wallrunh", ply)
|
ParkourEvent("wallrunh", ply)
|
||||||
|
|
||||||
if CLIENT and IsFirstTimePredicted() then
|
if CLIENT and IsFirstTimePredicted() then
|
||||||
|
@ -510,7 +516,7 @@ local function WallrunningCheck(ply, mv, cmd)
|
||||||
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("WallrunTilt")
|
net.Start("WallrunTilt")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -521,7 +527,7 @@ end
|
||||||
|
|
||||||
local vecdir = Vector(1000, 1000, 1000)
|
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
|
if ply:GetWallrun() == nil or not ply:Alive() then
|
||||||
ply:SetWallrun(0)
|
ply:SetWallrun(0)
|
||||||
end
|
end
|
||||||
|
@ -538,4 +544,4 @@ hook.Add("SetupMove", "Wallrunning", function (ply, mv, cmd)
|
||||||
ply:SetWallrunDir(vecdir)
|
ply:SetWallrunDir(vecdir)
|
||||||
ply:SetWallrunCount(0)
|
ply:SetWallrunCount(0)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
|
@ -1,7 +1,7 @@
|
||||||
local vwrtime = 1.5
|
local vwrtime = 1.5
|
||||||
local hwrtime = 1.5
|
local hwrtime = 1.5
|
||||||
tiltdir = 1
|
tiltdir = 1
|
||||||
local tilt = 0
|
-- local tilt = 0
|
||||||
local wrmins = Vector(-16, -16, 0)
|
local wrmins = Vector(-16, -16, 0)
|
||||||
local wrmaxs = Vector(16, 16, 16)
|
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
|
if not ply:OnGround() and mv:KeyDown(IN_JUMP) and mv:GetVelocity().z > -200 then
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
|
|
||||||
tr.start = ply:EyePos() - Vector(0, 0, 15)
|
tr.start = ply:EyePos() - Vector(0, 0, 15)
|
||||||
tr.endpos = tr.start + eyeang:Forward() * 25
|
tr.endpos = tr.start + eyeang:Forward() * 25
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -25,13 +26,8 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then
|
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end
|
||||||
return
|
if trout.Entity and trout.Entity.IsNPC and (trout.Entity.NoWallrun or trout.Entity:IsNPC() or trout.Entity:IsPlayer()) then return false end
|
||||||
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
|
if trout.Hit and timemult > 0.5 then
|
||||||
tr.start = tr.start + Vector(0, 0, 10)
|
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
|
if trout.Hit then
|
||||||
local angdir = trout.HitNormal:Angle()
|
local angdir = trout.HitNormal:Angle()
|
||||||
angdir.y = angdir.y - 180
|
angdir.y = angdir.y - 180
|
||||||
|
|
||||||
local wallnormal = trout.HitNormal
|
local wallnormal = trout.HitNormal
|
||||||
local eyeang = Angle(angdir)
|
local eyeang = Angle(angdir)
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
||||||
tr.endpos = tr.start + eyeang:Forward() * 40
|
tr.endpos = tr.start + eyeang:Forward() * 40
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -53,9 +51,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if not trout.Hit then
|
if not trout.Hit then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
ply:EmitSound("Bump.Concrete")
|
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:SetWallrunData(1, CurTime() + vwrtime * timemult * speedmult, wallnormal)
|
||||||
ply:ViewPunch(Angle(-5, 0, 0))
|
ply:ViewPunch(Angle(-5, 0, 0))
|
||||||
|
|
||||||
ParkourEvent("wallrunv", ply)
|
ParkourEvent("wallrunv", ply)
|
||||||
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
|
@ -83,8 +80,8 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
ply.OrigEyeAng = angdir
|
ply.OrigEyeAng = angdir
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("BodyAnimWallrun")
|
net.Start("BodyAnimWallrun")
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.WriteAngle(angdir)
|
net.WriteAngle(angdir)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -96,6 +93,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
if not ply:OnGround() or mv:KeyPressed(IN_JUMP) then
|
if not ply:OnGround() or mv:KeyPressed(IN_JUMP) then
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
|
|
||||||
tr.start = ply:EyePos()
|
tr.start = ply:EyePos()
|
||||||
tr.endpos = tr.start + eyeang:Right() * 25
|
tr.endpos = tr.start + eyeang:Right() * 25
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -104,9 +102,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then
|
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
||||||
local ovel = mv:GetVelocity() * 0.85
|
local ovel = mv:GetVelocity() * 0.85
|
||||||
|
@ -114,9 +110,13 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
|
|
||||||
ply:SetWallrunOrigVel(ovel)
|
ply:SetWallrunOrigVel(ovel)
|
||||||
ply:SetWallrunElevated(false)
|
ply:SetWallrunElevated(false)
|
||||||
|
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
|
||||||
ply:SetWallrunData(2, CurTime() + hwrtime * timemult, trout.HitNormal)
|
ply:SetWallrunData(2, CurTime() + hwrtime * timemult, trout.HitNormal)
|
||||||
|
|
||||||
ParkourEvent("wallrunh", ply)
|
ParkourEvent("wallrunh", ply)
|
||||||
|
|
||||||
ply:ViewPunch(Angle(0, 1, 0))
|
ply:ViewPunch(Angle(0, 1, 0))
|
||||||
|
|
||||||
if CLIENT and IsFirstTimePredicted() then
|
if CLIENT and IsFirstTimePredicted() then
|
||||||
|
@ -125,7 +125,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
||||||
elseif SERVER and game.SinglePlayer() then
|
elseif SERVER and game.SinglePlayer() then
|
||||||
net.Start("WallrunTilt")
|
net.Start("WallrunTilt")
|
||||||
net.WriteBool(true)
|
net.WriteBool(true)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -136,6 +136,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
if not ply:OnGround() or mv:KeyPressed(IN_JUMP) then
|
if not ply:OnGround() or mv:KeyPressed(IN_JUMP) then
|
||||||
local tr = ply.WallrunTrace
|
local tr = ply.WallrunTrace
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
|
|
||||||
tr.start = ply:EyePos()
|
tr.start = ply:EyePos()
|
||||||
tr.endpos = tr.start + eyeang:Right() * -25
|
tr.endpos = tr.start + eyeang:Right() * -25
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -144,9 +145,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
|
|
||||||
util.TraceLine(tr)
|
util.TraceLine(tr)
|
||||||
|
|
||||||
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then
|
if trout.HitNormal:IsEqualTol(ply:GetWallrunDir(), 0.25) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
if trout.Hit and trout.HitNormal:IsEqualTol(ply:GetEyeTrace().HitNormal, 0.1) then
|
||||||
local ovel = mv:GetVelocity() * 0.85
|
local ovel = mv:GetVelocity() * 0.85
|
||||||
|
@ -154,10 +153,14 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
|
|
||||||
ply:SetWallrunOrigVel(ovel)
|
ply:SetWallrunOrigVel(ovel)
|
||||||
ply:SetWallrunDir(trout.HitNormal)
|
ply:SetWallrunDir(trout.HitNormal)
|
||||||
|
|
||||||
mv:SetVelocity(vector_origin)
|
mv:SetVelocity(vector_origin)
|
||||||
|
|
||||||
ply:SetWallrunElevated(false)
|
ply:SetWallrunElevated(false)
|
||||||
ply:SetWallrunData(3, CurTime() + hwrtime * timemult, trout.HitNormal)
|
ply:SetWallrunData(3, CurTime() + hwrtime * timemult, trout.HitNormal)
|
||||||
|
|
||||||
ParkourEvent("wallrunh", ply)
|
ParkourEvent("wallrunh", ply)
|
||||||
|
|
||||||
ply:ViewPunch(Angle(0, -1, 0))
|
ply:ViewPunch(Angle(0, -1, 0))
|
||||||
|
|
||||||
if CLIENT and IsFirstTimePredicted() then
|
if CLIENT and IsFirstTimePredicted() then
|
||||||
|
@ -166,7 +169,7 @@ function PuristWallrunningCheck(ply, mv, cmd, vel, eyeang, timemult, speedmult)
|
||||||
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
hook.Add("CalcViewBA", "WallrunningTilt", WallrunningTilt)
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("WallrunTilt")
|
net.Start("WallrunTilt")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -179,6 +182,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
if wr == 4 then
|
if wr == 4 then
|
||||||
local ang = cmd:GetViewAngles()
|
local ang = cmd:GetViewAngles()
|
||||||
ang.x = 0
|
ang.x = 0
|
||||||
|
|
||||||
local vel = ang:Forward() * 30
|
local vel = ang:Forward() * 30
|
||||||
vel.z = 25
|
vel.z = 25
|
||||||
|
|
||||||
|
@ -189,6 +193,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then
|
if ply:GetWallrunTime() < CurTime() or mv:GetVelocity():Length() < 10 then
|
||||||
ply:SetWallrun(0)
|
ply:SetWallrun(0)
|
||||||
ply:SetQuickturn(false)
|
ply:SetQuickturn(false)
|
||||||
|
|
||||||
mv:SetVelocity(vel * 4)
|
mv:SetVelocity(vel * 4)
|
||||||
|
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
|
@ -207,12 +212,14 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
|
|
||||||
if mv:KeyPressed(IN_JUMP) then
|
if mv:KeyPressed(IN_JUMP) then
|
||||||
ParkourEvent("jumpwallrun", ply)
|
ParkourEvent("jumpwallrun", ply)
|
||||||
|
|
||||||
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
||||||
|
|
||||||
vel.z = 30
|
vel.z = 30
|
||||||
|
|
||||||
vel:Mul(ply:GetOverdriveMult())
|
vel:Mul(ply:GetOverdriveMult())
|
||||||
|
|
||||||
mv:SetVelocity(vel * 8)
|
mv:SetVelocity(vel * 8)
|
||||||
|
|
||||||
ply:SetWallrun(0)
|
ply:SetWallrun(0)
|
||||||
ply:SetQuickturn(false)
|
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 velz = math.Clamp((ply:GetWallrunTime() - CurTime()) / vwrtime, 0.1, 1)
|
||||||
local vecvel = Vector()
|
local vecvel = Vector()
|
||||||
vecvel.z = 200 * velz
|
vecvel.z = 200 * velz
|
||||||
|
|
||||||
vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50)
|
vecvel:Add(ply:GetWallrunDir():Angle():Forward() * -50)
|
||||||
vecvel:Mul(ply:GetOverdriveMult())
|
vecvel:Mul(ply:GetOverdriveMult())
|
||||||
|
|
||||||
mv:SetVelocity(vecvel)
|
mv:SetVelocity(vecvel)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
mv:SetSideSpeed(0)
|
mv:SetSideSpeed(0)
|
||||||
|
@ -246,6 +253,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
local trout = ply.WallrunTraceOut
|
local trout = ply.WallrunTraceOut
|
||||||
local eyeang = ply.WallrunOrigAng or Angle()
|
local eyeang = ply.WallrunOrigAng or Angle()
|
||||||
eyeang.x = 0
|
eyeang.x = 0
|
||||||
|
|
||||||
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
tr.start = ply:EyePos() - Vector(0, 0, 5)
|
||||||
tr.endpos = tr.start + eyeang:Forward() * 40
|
tr.endpos = tr.start + eyeang:Forward() * 40
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
@ -286,6 +294,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
|
|
||||||
if ovel:Length() > 400 then
|
if ovel:Length() > 400 then
|
||||||
ovel:Mul(0.975)
|
ovel:Mul(0.975)
|
||||||
|
|
||||||
ply:SetWallrunOrigVel(ovel)
|
ply:SetWallrunOrigVel(ovel)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -374,6 +383,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
ply:SetQuickturn(false)
|
ply:SetQuickturn(false)
|
||||||
ply:SetWallrunTime(0)
|
ply:SetWallrunTime(0)
|
||||||
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
ply:SetSafetyRollKeyTime(CurTime() + 0.001)
|
||||||
|
|
||||||
mv:SetVelocity(eyeang:Forward() * math.max(150, vecvel:Length() - 25) + Vector(0, 0, 250))
|
mv:SetVelocity(eyeang:Forward() * math.max(150, vecvel:Length() - 25) + Vector(0, 0, 250))
|
||||||
|
|
||||||
local event = ply:GetWallrun() == 3 and "jumpwallrunright" or "jumpwallrunleft"
|
local event = ply:GetWallrun() == 3 and "jumpwallrunright" or "jumpwallrunleft"
|
||||||
|
@ -398,7 +408,8 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
ply:EmitSound("Wallrun.Concrete")
|
ply:EmitSound("Wallrun.Concrete")
|
||||||
timer.Simple(0.025, function ()
|
|
||||||
|
timer.Simple(0.025, function()
|
||||||
ply:EmitSound("WallrunRelease.Concrete")
|
ply:EmitSound("WallrunRelease.Concrete")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
@ -420,7 +431,7 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
BodyAnim:SetSequence("jumpair")
|
BodyAnim:SetSequence("jumpair")
|
||||||
elseif game.SinglePlayer() and wr == 1 then
|
elseif game.SinglePlayer() and wr == 1 then
|
||||||
net.Start("BodyAnimWallrun")
|
net.Start("BodyAnimWallrun")
|
||||||
net.WriteBool(false)
|
net.WriteBool(false)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -428,4 +439,4 @@ function PuristWallrunningThink(ply, mv, cmd, wr, wrtimeremains)
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,13 +1,11 @@
|
||||||
if SERVER and game.SinglePlayer() then
|
if SERVER and game.SinglePlayer() then
|
||||||
util.AddNetworkString("Zipline_SPFix")
|
util.AddNetworkString("Zipline_SPFix")
|
||||||
elseif CLIENT and game.SinglePlayer() then
|
elseif CLIENT and game.SinglePlayer() then
|
||||||
net.Receive("Zipline_SPFix", function ()
|
net.Receive("Zipline_SPFix", function()
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local zipline = ply:GetZipline()
|
local zipline = ply:GetZipline()
|
||||||
|
|
||||||
if not IsValid(zipline) then
|
if not IsValid(zipline) then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local startpos = zipline:GetStartPos()
|
local startpos = zipline:GetStartPos()
|
||||||
local endpos = zipline:GetEndPos()
|
local endpos = zipline:GetEndPos()
|
||||||
|
@ -30,12 +28,13 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
|
||||||
local startp = startpos
|
local startp = startpos
|
||||||
startpos = endpos
|
startpos = endpos
|
||||||
endpos = startp
|
endpos = startp
|
||||||
|
|
||||||
ply.ZiplineTwoWay = true
|
ply.ZiplineTwoWay = true
|
||||||
else
|
else
|
||||||
ply.ZiplineTwoWay = false
|
ply.ZiplineTwoWay = false
|
||||||
end
|
end
|
||||||
|
|
||||||
local dist, near = util.DistanceToLine(startpos, endpos, mv:GetOrigin())
|
local _, near = util.DistanceToLine(startpos, endpos, mv:GetOrigin())
|
||||||
local neardist = near:Distance(endpos)
|
local neardist = near:Distance(endpos)
|
||||||
local totaldist = startpos:Distance(endpos)
|
local totaldist = startpos:Distance(endpos)
|
||||||
local start = math.abs(neardist / totaldist - 1)
|
local start = math.abs(neardist / totaldist - 1)
|
||||||
|
@ -45,6 +44,7 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
|
||||||
local trout = ply.ZiplineTraceOut
|
local trout = ply.ZiplineTraceOut
|
||||||
local omins = tr.mins
|
local omins = tr.mins
|
||||||
local omaxs = tr.maxs
|
local omaxs = tr.maxs
|
||||||
|
|
||||||
tr.start = LerpVector(start, startpos, endpos)
|
tr.start = LerpVector(start, startpos, endpos)
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.mins, tr.maxs = ply:GetHull()
|
tr.mins, tr.maxs = ply:GetHull()
|
||||||
|
@ -59,12 +59,10 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
|
||||||
start = start + 25 / div
|
start = start + 25 / div
|
||||||
tr.start = LerpVector(start, startpos, endpos)
|
tr.start = LerpVector(start, startpos, endpos)
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
|
|
||||||
util.TraceHull(tr)
|
util.TraceHull(tr)
|
||||||
|
|
||||||
if not trout.Hit or trout.Entity == zipline and start < 1 then
|
if not trout.Hit or trout.Entity == zipline and start < 1 then
|
||||||
fail = false
|
fail = false
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -81,6 +79,7 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
|
||||||
|
|
||||||
tr.maxs = omaxs
|
tr.maxs = omaxs
|
||||||
tr.mins = omins
|
tr.mins = omins
|
||||||
|
|
||||||
local origin = mv:GetOrigin()
|
local origin = mv:GetOrigin()
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
@ -106,11 +105,11 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
|
||||||
ply:SetCrouchJumpBlocked(false)
|
ply:SetCrouchJumpBlocked(false)
|
||||||
|
|
||||||
if CLIENT_IFTP() then
|
if CLIENT_IFTP() then
|
||||||
local zipline = ply:GetZipline()
|
-- local zipline = ply:GetZipline()
|
||||||
ply.OrigEyeAng = (endpos - startpos):Angle()
|
ply.OrigEyeAng = (endpos - startpos):Angle()
|
||||||
elseif game.SinglePlayer() then
|
elseif game.SinglePlayer() then
|
||||||
net.Start("Zipline_SPFix")
|
net.Start("Zipline_SPFix")
|
||||||
net.WriteBool(ply.ZiplineTwoWay)
|
net.WriteBool(ply.ZiplineTwoWay)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -123,7 +122,7 @@ local function ZiplineCheck(ply, mv, cmd, zipline)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local zipvec = Vector(0, 0, 85)
|
-- local zipvec = Vector(0, 0, 85)
|
||||||
|
|
||||||
local function ZiplineThink(ply, mv, cmd, zipline)
|
local function ZiplineThink(ply, mv, cmd, zipline)
|
||||||
local fraction = ply:GetZiplineFraction()
|
local fraction = ply:GetZiplineFraction()
|
||||||
|
@ -144,8 +143,10 @@ local function ZiplineThink(ply, mv, cmd, zipline)
|
||||||
ply:SetZipline(nil)
|
ply:SetZipline(nil)
|
||||||
ply:SetMoveType(MOVETYPE_WALK)
|
ply:SetMoveType(MOVETYPE_WALK)
|
||||||
ply:SetCrouchJumpBlocked(true)
|
ply:SetCrouchJumpBlocked(true)
|
||||||
|
|
||||||
mv:SetVelocity(dir * speed * 0.75)
|
mv:SetVelocity(dir * speed * 0.75)
|
||||||
mv:SetButtons(0)
|
mv:SetButtons(0)
|
||||||
|
|
||||||
ply:SetZiplineDelay(CurTime() + 0.75)
|
ply:SetZiplineDelay(CurTime() + 0.75)
|
||||||
|
|
||||||
if CLIENT_IFTP() or game.SinglePlayer() then
|
if CLIENT_IFTP() or game.SinglePlayer() then
|
||||||
|
@ -167,13 +168,13 @@ local function ZiplineThink(ply, mv, cmd, zipline)
|
||||||
ply:SetZiplineFraction(newfraction)
|
ply:SetZiplineFraction(newfraction)
|
||||||
|
|
||||||
local ziplerp = LerpVector(newfraction, startpos, endpos)
|
local ziplerp = LerpVector(newfraction, startpos, endpos)
|
||||||
|
|
||||||
ziplerp:Sub(zipline:GetUp() * 75)
|
ziplerp:Sub(zipline:GetUp() * 75)
|
||||||
|
|
||||||
local tr = ply.ZiplineTrace
|
local tr = ply.ZiplineTrace
|
||||||
local trout = ply.ZiplineTraceOut
|
local trout = ply.ZiplineTraceOut
|
||||||
local omins = tr.mins
|
local omins = tr.mins
|
||||||
local omaxs = tr.maxs
|
local omaxs = tr.maxs
|
||||||
|
|
||||||
tr.start = ziplerp
|
tr.start = ziplerp
|
||||||
tr.endpos = ziplerp
|
tr.endpos = ziplerp
|
||||||
tr.mins, tr.maxs = ply:GetHull()
|
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
|
if trout.Hit and trout.Entity ~= zipline and newfraction > 0.1 then
|
||||||
ply:SetZipline(nil)
|
ply:SetZipline(nil)
|
||||||
ply:SetMoveType(MOVETYPE_WALK)
|
ply:SetMoveType(MOVETYPE_WALK)
|
||||||
|
|
||||||
mv:SetVelocity(dir * speed * 0.75)
|
mv:SetVelocity(dir * speed * 0.75)
|
||||||
|
|
||||||
ply:SetZiplineDelay(CurTime() + 0.75)
|
ply:SetZiplineDelay(CurTime() + 0.75)
|
||||||
|
|
||||||
if CLIENT_IFTP() or game.SinglePlayer() then
|
if CLIENT_IFTP() or game.SinglePlayer() then
|
||||||
|
@ -207,7 +210,9 @@ local function ZiplineThink(ply, mv, cmd, zipline)
|
||||||
tr.mins = omins
|
tr.mins = omins
|
||||||
|
|
||||||
mv:SetOrigin(ziplerp)
|
mv:SetOrigin(ziplerp)
|
||||||
|
|
||||||
ply:SetZiplineSpeed(math.Approach(speed, 750, FrameTime() * 250))
|
ply:SetZiplineSpeed(math.Approach(speed, 750, FrameTime() * 250))
|
||||||
|
|
||||||
mv:SetVelocity(dir * speed)
|
mv:SetVelocity(dir * speed)
|
||||||
mv:SetButtons(0)
|
mv:SetButtons(0)
|
||||||
mv:SetForwardSpeed(0)
|
mv:SetForwardSpeed(0)
|
||||||
|
@ -219,16 +224,17 @@ local function Zipline(ply, mv, cmd)
|
||||||
if not ply.ZiplineTrace then
|
if not ply.ZiplineTrace then
|
||||||
ply.ZiplineTrace = {}
|
ply.ZiplineTrace = {}
|
||||||
ply.ZiplineTraceOut = {}
|
ply.ZiplineTraceOut = {}
|
||||||
|
|
||||||
local tr = ply.ZiplineTrace
|
local tr = ply.ZiplineTrace
|
||||||
local mins, maxs = ply:GetHull()
|
local mins, maxs = ply:GetHull()
|
||||||
|
|
||||||
mins.z = maxs.z * 0.8
|
mins.z = maxs.z * 0.8
|
||||||
maxs.z = maxs.z * 2
|
maxs.z = maxs.z * 2
|
||||||
|
|
||||||
mins:Mul(2)
|
mins:Mul(2)
|
||||||
maxs:Mul(2)
|
maxs:Mul(2)
|
||||||
|
|
||||||
mins.z = mins.z * 0.5
|
mins.z = mins.z * 0.5
|
||||||
maxs.z = maxs.z * 0.5
|
maxs.z = maxs.z * 0.5
|
||||||
|
|
||||||
tr.maxs = maxs
|
tr.maxs = maxs
|
||||||
tr.mins = mins
|
tr.mins = mins
|
||||||
ply.ZiplineTrace.mask = MASK_PLAYERSOLID
|
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
|
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 tr = ply.ZiplineTrace
|
||||||
local trout = ply.ZiplineTraceOut
|
local trout = ply.ZiplineTraceOut
|
||||||
|
|
||||||
tr.output = trout
|
tr.output = trout
|
||||||
tr.start = mv:GetOrigin()
|
tr.start = mv:GetOrigin()
|
||||||
tr.endpos = tr.start
|
tr.endpos = tr.start
|
||||||
tr.filter = ply
|
tr.filter = ply
|
||||||
|
|
||||||
util.TraceHull(tr)
|
util.TraceHull(tr)
|
||||||
|
|
||||||
local trentity = trout.Entity
|
local trentity = trout.Entity
|
||||||
|
|
||||||
if IsValid(trentity) and trentity:GetClass() == "br_zipline" and ply:GetMoveType() == MOVETYPE_WALK then
|
if IsValid(trentity) and trentity:GetClass() == "br_zipline" and ply:GetMoveType() == MOVETYPE_WALK then
|
||||||
|
@ -269,4 +275,4 @@ function CreateZipline(startpos, endpos)
|
||||||
|
|
||||||
return zipline
|
return zipline
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -5,57 +5,20 @@ function CLIENT_IFTP()
|
||||||
return CLIENT and IsFirstTimePredicted()
|
return CLIENT and IsFirstTimePredicted()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--[[
|
||||||
local matrixdatatmp = {
|
local matrixdatatmp = {
|
||||||
{
|
{0, 0, 0, 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,
|
|
||||||
1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
]]
|
||||||
|
|
||||||
local mtmp = {
|
local mtmp = {
|
||||||
{
|
{0, 0, 0, 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,
|
|
||||||
1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function vmatrixmeta:FastToTable(tbl)
|
function vmatrixmeta:FastToTable(tbl)
|
||||||
|
@ -115,12 +78,6 @@ function playermeta:SetWallrunData(wr, wrtime, dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
function playermeta:UsingRH(wep)
|
function playermeta:UsingRH(wep)
|
||||||
local usingrh = false
|
|
||||||
local activewep = wep or self:GetActiveWeapon()
|
local activewep = wep or self:GetActiveWeapon()
|
||||||
|
if IsValid(activewep) then return activewep:GetClass() == "runnerhands" end
|
||||||
if IsValid(activewep) then
|
end
|
||||||
usingrh = activewep:GetClass() == "runnerhands"
|
|
||||||
end
|
|
||||||
|
|
||||||
return usingrh
|
|
||||||
end
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,11 +1,6 @@
|
||||||
local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {
|
local quakejump = CreateConVar("Beatrun_QuakeJump", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||||
FCVAR_REPLICATED,
|
|
||||||
FCVAR_ARCHIVE
|
local sidestep = CreateConVar("Beatrun_SideStep", 1, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
|
||||||
})
|
|
||||||
local sidestep = CreateConVar("Beatrun_SideStep", 1, {
|
|
||||||
FCVAR_REPLICATED,
|
|
||||||
FCVAR_ARCHIVE
|
|
||||||
})
|
|
||||||
|
|
||||||
local function Hardland(jt)
|
local function Hardland(jt)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
|
@ -34,12 +29,12 @@ if game.SinglePlayer() and SERVER then
|
||||||
end
|
end
|
||||||
|
|
||||||
if game.SinglePlayer() and CLIENT then
|
if game.SinglePlayer() and CLIENT then
|
||||||
net.Receive("Beatrun_HardLand", function ()
|
net.Receive("Beatrun_HardLand", function()
|
||||||
Hardland(net.ReadBool())
|
Hardland(net.ReadBool())
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
hook.Add("PlayerStepSoundTime", "MEStepTime", function (ply, step, walking)
|
hook.Add("PlayerStepSoundTime", "MEStepTime", function(ply, step, walking)
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
local sprint = ply:GetMEMoveLimit() < 300
|
local sprint = ply:GetMEMoveLimit() < 300
|
||||||
local stepmod = ply:GetStepRight() and 1 or -1
|
local stepmod = ply:GetStepRight() and 1 or -1
|
||||||
|
@ -51,6 +46,7 @@ hook.Add("PlayerStepSoundTime", "MEStepTime", function (ply, step, walking)
|
||||||
end
|
end
|
||||||
|
|
||||||
stepvel = stepvel - math.abs(ply:GetMEMoveLimit() / 100 - 1) * 0.33
|
stepvel = stepvel - math.abs(ply:GetMEMoveLimit() / 100 - 1) * 0.33
|
||||||
|
|
||||||
local stepmod2 = 1
|
local stepmod2 = 1
|
||||||
local stepmod3 = 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 not ply:Crouching() and not ply:KeyDown(IN_WALK) then
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
local intensity = ply:GetInfoNum("Beatrun_ViewbobIntensity", 20) / 20
|
local intensity = ply:GetInfoNum("Beatrun_ViewbobIntensity", 20) / 20
|
||||||
|
|
||||||
intensity = sprint and intensity * 0.5 or intensity * 0.25
|
intensity = sprint and intensity * 0.5 or intensity * 0.25
|
||||||
|
|
||||||
ply:ViewPunch(Angle(0.45 * stepmod2 * stepvel2, 0, 0.5 * stepmod * stepvel * stepmod3) * intensity)
|
ply:ViewPunch(Angle(0.45 * stepmod2 * stepvel2, 0, 0.5 * stepmod * stepvel * stepmod3) * intensity)
|
||||||
elseif CLIENT and IsFirstTimePredicted() then
|
elseif CLIENT and IsFirstTimePredicted() then
|
||||||
local intensity = ply:GetInfoNum("Beatrun_ViewbobIntensity", 20) / 20
|
local intensity = ply:GetInfoNum("Beatrun_ViewbobIntensity", 20) / 20
|
||||||
|
|
||||||
intensity = sprint and intensity * 0.25 or intensity * 0.1
|
intensity = sprint and intensity * 0.25 or intensity * 0.1
|
||||||
|
|
||||||
ply:CLViewPunch(Angle(0.45 * stepmod2 * stepvel2, 0, 0.5 * stepmod * stepvel * stepmod3) * intensity)
|
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
|
return steptime
|
||||||
end)
|
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())
|
ply:SetStepRight(not ply:GetStepRight())
|
||||||
|
|
||||||
if (ply:GetSliding() or CurTime() < ply:GetSafetyRollTime() - 0.5) and not skipcheck then
|
if (ply:GetSliding() or CurTime() < ply:GetSafetyRollTime() - 0.5) and not skipcheck then return true end
|
||||||
return true
|
if ply:GetMEMoveLimit() < 155 and ply:KeyDown(IN_FORWARD) and not ply.FootstepLand and not IsValid(ply:GetBalanceEntity()) then return true end
|
||||||
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 mat = sound:sub(0, -6)
|
||||||
local newsound = FOOTSTEPS_LUT[mat]
|
local newsound = FOOTSTEPS_LUT[mat]
|
||||||
|
|
||||||
if mat == "player/footsteps/ladder" then
|
if mat == "player/footsteps/ladder" then return end
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
newsound = newsound or "Concrete"
|
newsound = newsound or "Concrete"
|
||||||
|
|
||||||
ply.LastStepMat = newsound
|
ply.LastStepMat = newsound
|
||||||
|
|
||||||
if game.SinglePlayer() then
|
if game.SinglePlayer() then
|
||||||
|
@ -148,9 +141,11 @@ hook.Add("PlayerFootstep", "MEStepSound", function (ply, pos, foot, sound, volum
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end)
|
end)
|
||||||
hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, speed)
|
|
||||||
|
hook.Add("OnPlayerHitGround", "MELandSound", function(ply, water, floater, speed)
|
||||||
local vel = ply:GetVelocity()
|
local vel = ply:GetVelocity()
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
|
|
||||||
ply.FootstepLand = true
|
ply.FootstepLand = true
|
||||||
ply.LastLandTime = CurTime()
|
ply.LastLandTime = CurTime()
|
||||||
|
|
||||||
|
@ -181,6 +176,7 @@ hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, spee
|
||||||
local eyedir = ply:EyeAngles()
|
local eyedir = ply:EyeAngles()
|
||||||
eyedir.x = 0
|
eyedir.x = 0
|
||||||
eyedir = eyedir:Forward()
|
eyedir = eyedir:Forward()
|
||||||
|
|
||||||
local vel = ply:GetVelocity()
|
local vel = ply:GetVelocity()
|
||||||
vel.z = 0
|
vel.z = 0
|
||||||
|
|
||||||
|
@ -194,7 +190,7 @@ hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, spee
|
||||||
Hardland(jt)
|
Hardland(jt)
|
||||||
elseif SERVER and game.SinglePlayer() then
|
elseif SERVER and game.SinglePlayer() then
|
||||||
net.Start("Beatrun_HardLand")
|
net.Start("Beatrun_HardLand")
|
||||||
net.WriteBool(jt)
|
net.WriteBool(jt)
|
||||||
net.Send(ply)
|
net.Send(ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -208,11 +204,13 @@ hook.Add("OnPlayerHitGround", "MELandSound", function (ply, water, floater, spee
|
||||||
info:SetDamageType(DMG_FALL)
|
info:SetDamageType(DMG_FALL)
|
||||||
info:SetAttacker(game.GetWorld())
|
info:SetAttacker(game.GetWorld())
|
||||||
info:SetInflictor(game.GetWorld())
|
info:SetInflictor(game.GetWorld())
|
||||||
|
|
||||||
ply:TakeDamageInfo(info)
|
ply:TakeDamageInfo(info)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd)
|
|
||||||
|
hook.Add("SetupMove", "MESetupMove", function(ply, mv, cmd)
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands"
|
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())
|
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
|
end
|
||||||
|
|
||||||
ply:EmitSound("Release." .. newsound)
|
ply:EmitSound("Release." .. newsound)
|
||||||
|
|
||||||
ply.FootstepReleaseLand = false
|
ply.FootstepReleaseLand = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -246,15 +243,18 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd)
|
||||||
if ply:KeyDown(IN_WALK) then
|
if ply:KeyDown(IN_WALK) then
|
||||||
mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.0065)
|
mv:SetForwardSpeed(mv:GetForwardSpeed() * 0.0065)
|
||||||
mv:SetSideSpeed(mv:GetSideSpeed() * 0.0065)
|
mv:SetSideSpeed(mv:GetSideSpeed() * 0.0065)
|
||||||
|
|
||||||
ply:SetMEMoveLimit(150)
|
ply:SetMEMoveLimit(150)
|
||||||
ply:SetMESprintDelay(0)
|
ply:SetMESprintDelay(0)
|
||||||
ply:SetMEAng(0)
|
ply:SetMEAng(0)
|
||||||
|
|
||||||
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP)))
|
mv:SetButtons(bit.band(mv:GetButtons(), bit.bnot(IN_JUMP)))
|
||||||
end
|
end
|
||||||
|
|
||||||
local ang = mv:GetAngles()
|
local ang = mv:GetAngles()
|
||||||
ang[1] = 0
|
ang[1] = 0
|
||||||
ang[3] = 0
|
ang[3] = 0
|
||||||
|
|
||||||
local MEAng = math.Truncate(ang:Forward().x, 2)
|
local MEAng = math.Truncate(ang:Forward().x, 2)
|
||||||
local MEAngDiff = math.abs((MEAng - ply:GetMEAng()) * 100)
|
local MEAngDiff = math.abs((MEAng - ply:GetMEAng()) * 100)
|
||||||
local weaponspeed = 150
|
local weaponspeed = 150
|
||||||
|
@ -282,7 +282,6 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd)
|
||||||
|
|
||||||
if MEAngDiff > 1.25 and ply:GetWallrun() == 0 then
|
if MEAngDiff > 1.25 and ply:GetWallrun() == 0 then
|
||||||
local slow = MEAngDiff * 0.75
|
local slow = MEAngDiff * 0.75
|
||||||
|
|
||||||
ply:SetMEMoveLimit(math.max(ply:GetMEMoveLimit() - slow, 160))
|
ply:SetMEMoveLimit(math.max(ply:GetMEMoveLimit() - slow, 160))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -304,14 +303,18 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
mv:SetMaxClientSpeed(ply:GetMEMoveLimit())
|
mv:SetMaxClientSpeed(ply:GetMEMoveLimit())
|
||||||
|
|
||||||
ply:SetMEAng(MEAng)
|
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 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
|
if mv:KeyDown(IN_MOVELEFT) then
|
||||||
activewep:SendWeaponAnim(ACT_TURNLEFT45)
|
activewep:SendWeaponAnim(ACT_TURNLEFT45)
|
||||||
activewep:SetSideStep(true)
|
activewep:SetSideStep(true)
|
||||||
|
|
||||||
mv:SetVelocity(cmd:GetViewAngles():Right() * -600)
|
mv:SetVelocity(cmd:GetViewAngles():Right() * -600)
|
||||||
|
|
||||||
ply:ViewPunch(Angle(-3, 0, -4.5))
|
ply:ViewPunch(Angle(-3, 0, -4.5))
|
||||||
|
|
||||||
ParkourEvent("sidestepleft", ply)
|
ParkourEvent("sidestepleft", ply)
|
||||||
|
|
||||||
activewep.SideStepDir = ang:Forward()
|
activewep.SideStepDir = ang:Forward()
|
||||||
|
@ -322,8 +325,11 @@ hook.Add("SetupMove", "MESetupMove", function (ply, mv, cmd)
|
||||||
elseif mv:KeyDown(IN_MOVERIGHT) then
|
elseif mv:KeyDown(IN_MOVERIGHT) then
|
||||||
activewep:SendWeaponAnim(ACT_TURNRIGHT45)
|
activewep:SendWeaponAnim(ACT_TURNRIGHT45)
|
||||||
activewep:SetSideStep(true)
|
activewep:SetSideStep(true)
|
||||||
|
|
||||||
mv:SetVelocity(cmd:GetViewAngles():Right() * 600)
|
mv:SetVelocity(cmd:GetViewAngles():Right() * 600)
|
||||||
|
|
||||||
ply:ViewPunch(Angle(-3, 0, 4.5))
|
ply:ViewPunch(Angle(-3, 0, 4.5))
|
||||||
|
|
||||||
ParkourEvent("sidestepright", ply)
|
ParkourEvent("sidestepright", ply)
|
||||||
|
|
||||||
activewep.SideStepDir = ang:Forward()
|
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
|
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()
|
local vel = mv:GetVelocity()
|
||||||
|
|
||||||
vel:Mul(0.75)
|
vel:Mul(0.75)
|
||||||
|
|
||||||
vel.z = -300
|
vel.z = -300
|
||||||
|
|
||||||
mv:SetVelocity(vel)
|
mv:SetVelocity(vel)
|
||||||
|
|
||||||
activewep:SetWasOnGround(false)
|
activewep:SetWasOnGround(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
local jumpseq = {
|
-- local jumpseq = {ACT_VM_HAULBACK, ACT_VM_SWINGHARD}
|
||||||
ACT_VM_HAULBACK,
|
|
||||||
ACT_VM_SWINGHARD
|
|
||||||
}
|
|
||||||
|
|
||||||
hook.Add("CreateMove", "MECreateMove", function (cmd)
|
hook.Add("CreateMove", "MECreateMove", function(cmd)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local usingrh = ply:UsingRH()
|
local usingrh = ply:UsingRH()
|
||||||
local hardland = CurTime() < (ply.hardlandtime or 0)
|
local hardland = CurTime() < (ply.hardlandtime or 0)
|
||||||
|
@ -382,7 +384,8 @@ if CLIENT then
|
||||||
cmd:SetButtons(cmd:GetButtons() + IN_SPEED)
|
cmd:SetButtons(cmd:GetButtons() + IN_SPEED)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
hook.Add("GetMotionBlurValues", "MEBlur", function (h, v, f, r)
|
|
||||||
|
hook.Add("GetMotionBlurValues", "MEBlur", function(h, v, f, r)
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local vel = LocalPlayer():GetVelocity()
|
local vel = LocalPlayer():GetVelocity()
|
||||||
|
|
||||||
|
@ -407,9 +410,10 @@ end
|
||||||
MMY = 0
|
MMY = 0
|
||||||
MMX = 0
|
MMX = 0
|
||||||
|
|
||||||
hook.Add("InputMouseApply", "MouseMovement", function (cmd, x, y)
|
hook.Add("InputMouseApply", "MouseMovement", function(cmd, x, y)
|
||||||
MMY = y
|
MMY = y
|
||||||
MMX = x
|
MMX = x
|
||||||
|
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
local activewep = ply:GetActiveWeapon()
|
local activewep = ply:GetActiveWeapon()
|
||||||
local usingrh = ply:UsingRH(activewep)
|
local usingrh = ply:UsingRH(activewep)
|
||||||
|
@ -420,8 +424,8 @@ hook.Add("InputMouseApply", "MouseMovement", function (cmd, x, y)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
net.Receive("DoorBashAnim", function ()
|
net.Receive("DoorBashAnim", function()
|
||||||
ArmInterrupt("doorbash")
|
ArmInterrupt("doorbash")
|
||||||
LocalPlayer():CLViewPunch(Angle(1.5, -0.75, 0))
|
LocalPlayer():CLViewPunch(Angle(1.5, -0.75, 0))
|
||||||
end)
|
end)
|
||||||
end
|
end
|
|
@ -72,7 +72,7 @@ concommand.Add("blindplayer", function(ply, cmd, args)
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Start("BlindPlayers")
|
net.Start("BlindPlayers")
|
||||||
net.WriteBool(blinded)
|
net.WriteBool(blinded)
|
||||||
net.Send(mply)
|
net.Send(mply)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
BIN
lua/bin/gmcl_gdiscord_win32.dll
Normal file
BIN
lua/bin/gmcl_gdiscord_win32.dll
Normal file
Binary file not shown.
Loading…
Reference in a new issue