mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-01-31 03:57:27 +05:00
fixes and cleanup for client part and player class
This commit is contained in:
parent
5c758a7c7b
commit
7d937f7507
38 changed files with 1061 additions and 1251 deletions
|
@ -1,8 +1,10 @@
|
|||
function CreateRopes()
|
||||
local ents = ents.GetAll()
|
||||
for k,v in pairs(ents) do
|
||||
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass() == "move_rope" then
|
||||
local endpoint = v:GetInternalVariable("m_hEndPoint")
|
||||
|
||||
if IsValid(endpoint) then
|
||||
local zipline = CreateZipline(v:GetPos(), endpoint:GetPos())
|
||||
zipline:SetNW2Bool("BRProtected", true)
|
||||
|
@ -10,11 +12,12 @@ function CreateRopes()
|
|||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(ents) do
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass():find("rope") then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
hook.Remove("InitPostEntity", "CreateRopes")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,58 +1,25 @@
|
|||
local START_Z = -15800
|
||||
local CURRENT_Z = 0
|
||||
|
||||
local ROTATION = {
|
||||
Vector(-325.8125, 573.90625, START_Z),
|
||||
Vector(-66.3125, 573.90625, START_Z),
|
||||
Vector(189.15625, 573.90625, START_Z),
|
||||
Vector(412.5625, 573.90625, START_Z),
|
||||
Vector(568.09375, 316.59375, START_Z),
|
||||
Vector(568.09375, 69.03125, START_Z),
|
||||
Vector(568.09375, -189.28125, START_Z),
|
||||
Vector(568.09375, -408.125, START_Z),
|
||||
Vector(412.5625, -569.375, START_Z),
|
||||
Vector(189.15625, -569.375, START_Z),
|
||||
Vector(-66.3125, -569.375, START_Z),
|
||||
Vector(-325.8125, -569.375, START_Z),
|
||||
Vector(-568.65625, -408.125, START_Z),
|
||||
Vector(-568.65625, -189.28125, START_Z),
|
||||
Vector(-568.65625, 69.03125, START_Z),
|
||||
Vector(-568.65625, 316.59375, START_Z),
|
||||
}
|
||||
local ANGLES = {
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, 0, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, -90, 0),
|
||||
Angle(0, -90, 0),
|
||||
}
|
||||
local ROTATION = {Vector(-325.8125, 573.90625, START_Z), Vector(-66.3125, 573.90625, START_Z), Vector(189.15625, 573.90625, START_Z), Vector(412.5625, 573.90625, START_Z), Vector(568.09375, 316.59375, START_Z), Vector(568.09375, 69.03125, START_Z), Vector(568.09375, -189.28125, START_Z), Vector(568.09375, -408.125, START_Z), Vector(412.5625, -569.375, START_Z), Vector(189.15625, -569.375, START_Z), Vector(-66.3125, -569.375, START_Z), Vector(-325.8125, -569.375, START_Z), Vector(-568.65625, -408.125, START_Z), Vector(-568.65625, -189.28125, START_Z), Vector(-568.65625, 69.03125, START_Z), Vector(-568.65625, 316.59375, START_Z),}
|
||||
|
||||
local ANGLES = {Angle(0, 0, 0), Angle(0, 0, 0), Angle(0, 0, 0), Angle(0, 0, 0), Angle(0, -90, 0), Angle(0, -90, 0), Angle(0, -90, 0), Angle(0, -90, 0), Angle(0, 0, 0), Angle(0, 0, 0), Angle(0, 0, 0), Angle(0, 0, 0), Angle(0, -90, 0), Angle(0, -90, 0), Angle(0, -90, 0), Angle(0, -90, 0),}
|
||||
|
||||
local CURRENT_ROTATION = 1
|
||||
local MAX_ROTATION = #ROTATION
|
||||
|
||||
for i=0, 100 do
|
||||
for i = 0, 100 do
|
||||
local mdl = "models/hunter/blocks/cube2x3x025.mdl"
|
||||
local plat = ents.Create("prop_physics")
|
||||
plat:SetModel(mdl)
|
||||
plat:SetPos(ROTATION[CURRENT_ROTATION]+Vector(0,0,CURRENT_Z))
|
||||
plat:SetAngles(ANGLES[CURRENT_ROTATION])
|
||||
|
||||
plat:SetModel(mdl)
|
||||
plat:SetPos(ROTATION[CURRENT_ROTATION] + Vector(0, 0, CURRENT_Z))
|
||||
plat:SetAngles(ANGLES[CURRENT_ROTATION])
|
||||
plat:Spawn()
|
||||
plat:PhysicsDestroy()
|
||||
|
||||
CURRENT_Z = CURRENT_Z+math.random(20,70)
|
||||
CURRENT_ROTATION = CURRENT_ROTATION+1
|
||||
CURRENT_Z = CURRENT_Z + math.random(20, 70)
|
||||
CURRENT_ROTATION = CURRENT_ROTATION + 1
|
||||
|
||||
if CURRENT_ROTATION > MAX_ROTATION then
|
||||
CURRENT_ROTATION = 1
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
local replaysdir = "beatrun/gamemode/Maps/TrainingData/"
|
||||
TUTORIALMODE = true
|
||||
|
||||
local tutorialcount = 3
|
||||
|
||||
for i=1, tutorialcount do
|
||||
AddCSLuaFile(replaysdir.."tut"..i..".lua")
|
||||
for i = 1, tutorialcount do
|
||||
AddCSLuaFile(replaysdir .. "tut" .. i .. ".lua")
|
||||
end
|
||||
|
||||
hook.Add("PlayerDeath", "Ouch", function(ply)
|
||||
|
@ -15,41 +14,52 @@ end)
|
|||
slidegate = slidegate or nil
|
||||
local movegate = false
|
||||
local sentreset = false
|
||||
|
||||
local function CreateSlideGate()
|
||||
slidegate = ents.Create("prop_physics")
|
||||
|
||||
slidegate:SetModel("models/hunter/blocks/cube8x8x025.mdl")
|
||||
slidegate:SetPos(Vector(6332, 858, 895))
|
||||
slidegate:SetAngles(Angle(90,0,0))
|
||||
slidegate:SetAngles(Angle(90, 0, 0))
|
||||
slidegate:Spawn()
|
||||
slidegate:PhysicsDestroy()
|
||||
end
|
||||
|
||||
hook.Add("InitPostEntity", "TutorialSlideGate", CreateSlideGate)
|
||||
|
||||
local function ResetSlideGate()
|
||||
if !IsValid(slidegate) then return end
|
||||
if not IsValid(slidegate) then return end
|
||||
|
||||
slidegate:SetPos(Vector(6332, 858, 895))
|
||||
slidegate:SetAngles(Angle(90,0,0))
|
||||
slidegate:SetAngles(Angle(90, 0, 0))
|
||||
|
||||
movegate = false
|
||||
sentreset = false
|
||||
end
|
||||
|
||||
hook.Add("PostReplayRequest", "ResetSlideGate", ResetSlideGate)
|
||||
|
||||
local function MoveSlideGate()
|
||||
if !IsValid(slidegate) or !IsValid(Entity(1)) then return end
|
||||
if !movegate then
|
||||
if not IsValid(slidegate) or not IsValid(Entity(1)) then return end
|
||||
|
||||
if not movegate then
|
||||
if Entity(1):GetVelocity():Length() > 25 then
|
||||
movegate = true
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local pos = slidegate:GetPos()
|
||||
|
||||
if pos[3] > 350 then
|
||||
pos[3] = math.max(350, pos[3]-2.75)
|
||||
pos[3] = math.max(350, pos[3] - 2.75)
|
||||
|
||||
slidegate:SetPos(pos)
|
||||
elseif !sentreset and !Entity(1).InReplay then
|
||||
elseif not sentreset and not Entity(1).InReplay then
|
||||
Entity(1):SendLua("SGR()")
|
||||
sentreset = true
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("Tick", "MoveSlideGate", MoveSlideGate)
|
|
@ -1,23 +1,20 @@
|
|||
local replaysdir = "beatrun/gamemode/Maps/TrainingData/"
|
||||
TUTORIALMODE = true
|
||||
|
||||
local tutorialcount = 7
|
||||
local endticks = {300, 300, 350, 500, 500, 230, 800}
|
||||
tutorials = {}
|
||||
|
||||
local endticks = {300, 300, 350, 500, 500, 230, 800}
|
||||
|
||||
tutorials = {}
|
||||
curtutorial = 1
|
||||
|
||||
local tutorialtext = {
|
||||
"Move towards a wall while in the air to climb it",
|
||||
{"Press [%s] before landing to break your fall","+speed"},
|
||||
"Jump towards an obstacle to vault over it",
|
||||
{"Hold Jump while holding [%s] and looking at a wall to wallrun\nYou can release either key during the wallrun, you won't fall off", "+forward"},
|
||||
"Press Jump during a wallrun to jump off\nYou can chain wallruns this way",
|
||||
"Hold Jump while moving towards a wall to wallclimb\nYou can release either key afterwards\nYou will automatically climb ledges",
|
||||
{"Press [%s] while moving left or right to sidestep\nSidestep lets you move at max speed immediately\nHold Crouch to slide under the gate", "+attack2"}
|
||||
"Move towards a wall while in the air to climb it", {"Press [%s] before landing to break your fall", "+speed"},
|
||||
"Jump towards an obstacle to vault over it", {"Hold Jump while holding [%s] and looking at a wall to wallrun\nYou can release either key during the wallrun, you won't fall off", "+forward"},
|
||||
"Press Jump during a wallrun to jump off\nYou can chain wallruns this way", "Hold Jump while moving towards a wall to wallclimb\nYou can release either key afterwards\nYou will automatically climb ledges", {"Press [%s] while moving left or right to sidestep\nSidestep lets you move at max speed immediately\nHold Crouch to slide under the gate", "+attack2"}
|
||||
}
|
||||
|
||||
for i=1, tutorialcount do
|
||||
tutorials[i] = util.JSONToTable(util.Decompress(file.Read(replaysdir.."tut"..i..".lua", "LUA")))
|
||||
for i = 1, tutorialcount do
|
||||
tutorials[i] = util.JSONToTable(util.Decompress(file.Read(replaysdir .. "tut" .. i .. ".lua", "LUA")))
|
||||
end
|
||||
|
||||
function PlayTutorialReplay(num)
|
||||
|
@ -26,11 +23,14 @@ function PlayTutorialReplay(num)
|
|||
|
||||
curtutorial = num
|
||||
ply.ReplayEndAtTick = endticks[num]
|
||||
|
||||
ReplayPlay(ply, data[2], data[1])
|
||||
end
|
||||
|
||||
function PTRD()
|
||||
PlayTutorialReplay(curtutorial)
|
||||
end
|
||||
|
||||
function SGR()
|
||||
if curtutorial == 7 and LocalPlayer():GetPos()[1] < 6345 then
|
||||
PlayTutorialReplay(curtutorial)
|
||||
|
@ -39,99 +39,103 @@ end
|
|||
|
||||
local curevent = {}
|
||||
local eventcheck = {}
|
||||
|
||||
local eventwhitelist = {
|
||||
["step"] = true,
|
||||
["sidestep"] = true,
|
||||
["jump"] = true,
|
||||
["land"] = true,
|
||||
["jumpwallrun"] = true
|
||||
["step"] = true,
|
||||
["sidestep"] = true,
|
||||
["jump"] = true,
|
||||
["land"] = true,
|
||||
["jumpwallrun"] = true
|
||||
}
|
||||
|
||||
local eventrequired = {
|
||||
{"climb"},
|
||||
{"roll"},
|
||||
{"vault", "vault"},
|
||||
{"wallrunh"},
|
||||
{"wallrunh", "wallrunh"},
|
||||
{"wallrunv", "climb"},
|
||||
{"slide"}
|
||||
{"climb"},
|
||||
{"roll"},
|
||||
{"vault", "vault"},
|
||||
{"wallrunh"},
|
||||
{"wallrunh", "wallrunh"},
|
||||
{"wallrunv", "climb"},
|
||||
{"slide"}
|
||||
}
|
||||
|
||||
local eventnicenames = {
|
||||
["climb"] = "Climb",
|
||||
["roll"] = "Roll",
|
||||
["vault"] = "Vault",
|
||||
["wallrunh"] = "Wallrun (H)",
|
||||
["wallrunv"] = "Wallrun (V)",
|
||||
["slide"] = "Slide",
|
||||
["springboard"] = "Springboard",
|
||||
["coil"] = "Coil"
|
||||
["climb"] = "Climb",
|
||||
["roll"] = "Roll",
|
||||
["vault"] = "Vault",
|
||||
["wallrunh"] = "Wallrun (H)",
|
||||
["wallrunv"] = "Wallrun (V)",
|
||||
["slide"] = "Slide",
|
||||
["springboard"] = "Springboard",
|
||||
["coil"] = "Coil"
|
||||
}
|
||||
|
||||
local eventhudtext = {}
|
||||
|
||||
local function DrawTutorialText()
|
||||
surface.SetFont("BeatrunHUD")
|
||||
local offsetx, offsety = ScrW()*0.33, ScrH()*0.75
|
||||
|
||||
local _, offsety = ScrW() * 0.33, ScrH() * 0.75
|
||||
local data = tutorialtext[curtutorial]
|
||||
local text
|
||||
if type(data) != "table" then
|
||||
|
||||
if type(data) ~= "table" then
|
||||
text = tutorialtext[curtutorial]
|
||||
else
|
||||
text = string.format(tutorialtext[curtutorial][1], input.LookupBinding(tutorialtext[curtutorial][2]))
|
||||
end
|
||||
|
||||
local textsplit = string.Split(text,"\n")
|
||||
local linecount = #textsplit
|
||||
|
||||
local textsplit = string.Split(text, "\n")
|
||||
-- local linecount = #textsplit
|
||||
local tw, th = surface.GetTextSize(text)
|
||||
local boxw = tw
|
||||
|
||||
surface.SetTextColor(220, 220, 220, 255)
|
||||
surface.SetDrawColor(75, 75, 75, 45)
|
||||
surface.DrawRect(ScrW()/2 - (tw*0.5)-15-1, offsety-1, boxw + 30+1, 3)
|
||||
surface.DrawRect(ScrW() / 2 - (tw * 0.5) - 15 - 1, offsety - 1, boxw + 30 + 1, 3)
|
||||
|
||||
for k,v in ipairs(textsplit) do
|
||||
for k, v in ipairs(textsplit) do
|
||||
local tw, th = surface.GetTextSize(v)
|
||||
surface.SetTextPos(ScrW()/2 - (tw*0.5), offsety + 30 - (th * 0.5) + (th * (k-1)) )
|
||||
|
||||
surface.SetTextPos(ScrW() / 2 - (tw * 0.5), offsety + 30 - (th * 0.5) + (th * (k - 1)))
|
||||
surface.DrawText(v)
|
||||
end
|
||||
|
||||
table.Empty(eventhudtext)
|
||||
for k,v in ipairs(curevent) do
|
||||
if !eventwhitelist[v] and eventnicenames[v] then
|
||||
|
||||
for k, v in ipairs(curevent) do
|
||||
if not eventwhitelist[v] and eventnicenames[v] then
|
||||
table.insert(eventhudtext, eventnicenames[v])
|
||||
end
|
||||
end
|
||||
offsety = ScrH()*0.7
|
||||
|
||||
offsety = ScrH() * 0.7
|
||||
text = table.concat(eventhudtext, " + ")
|
||||
tw, th = surface.GetTextSize(text)
|
||||
surface.SetTextPos(ScrW()/2 - (tw*0.5), offsety + 30 - (th * 0.5) )
|
||||
|
||||
surface.SetTextPos(ScrW() / 2 - (tw * 0.5), offsety + 30 - (th * 0.5))
|
||||
surface.DrawText(text)
|
||||
end
|
||||
|
||||
hook.Add("HUDPaint", "TutorialText", DrawTutorialText)
|
||||
hook.Add("BeatrunHUDCourse", "TutorialHUD", function() return "Tutorial" end)
|
||||
|
||||
hook.Add("BeatrunHUDCourse", "TutorialHUD", function()
|
||||
return "Tutorial"
|
||||
end)
|
||||
|
||||
local tutorialendpos = {
|
||||
tutorials[2][1],
|
||||
tutorials[3][1],
|
||||
tutorials[4][1],
|
||||
tutorials[5][1],
|
||||
tutorials[6][1],
|
||||
tutorials[7][1],
|
||||
Vector()
|
||||
}
|
||||
local tutorialendpos = {tutorials[2][1], tutorials[3][1], tutorials[4][1], tutorials[5][1], tutorials[6][1], tutorials[7][1], Vector()}
|
||||
|
||||
local function TutorialLogic()
|
||||
local ply = LocalPlayer()
|
||||
if !IsValid(ply) then return end
|
||||
|
||||
if not IsValid(ply) then return end
|
||||
if ply.InReplay then return end
|
||||
|
||||
local endpos = tutorialendpos[curtutorial]
|
||||
if !endpos then return end
|
||||
|
||||
if not endpos then return end
|
||||
|
||||
if ply:GetPos():Distance(endpos) < 20 then
|
||||
table.Empty(eventcheck)
|
||||
for k,v in ipairs(curevent) do
|
||||
if !eventwhitelist[v] then
|
||||
|
||||
for k, v in ipairs(curevent) do
|
||||
if not eventwhitelist[v] then
|
||||
table.insert(eventcheck, v)
|
||||
end
|
||||
end
|
||||
|
@ -139,24 +143,30 @@ local function TutorialLogic()
|
|||
if table.concat(eventcheck) == table.concat(eventrequired[curtutorial]) then
|
||||
table.Empty(curevent)
|
||||
table.Empty(eventcheck)
|
||||
|
||||
curtutorial = curtutorial + 1
|
||||
|
||||
PlayTutorialReplay(curtutorial)
|
||||
else
|
||||
table.Empty(curevent)
|
||||
table.Empty(eventcheck)
|
||||
|
||||
PlayTutorialReplay(curtutorial)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("Tick", "TutorialLogic", TutorialLogic)
|
||||
|
||||
local function TutorialEvents(event, ply)
|
||||
if !eventnicenames[event] then return end
|
||||
if not eventnicenames[event] then return end
|
||||
table.insert(curevent, event)
|
||||
|
||||
if #curevent > 10 then
|
||||
table.remove(curevent, 1)
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("OnParkour", "TutorialEvents", TutorialEvents)
|
||||
|
||||
function TutorialClearEvents()
|
||||
|
@ -165,81 +175,103 @@ end
|
|||
|
||||
local markerup = Vector()
|
||||
local markercol = Color(255, 25, 25)
|
||||
|
||||
local function TutorialMarker()
|
||||
local markerpos = tutorialendpos[curtutorial]
|
||||
|
||||
if markerpos then
|
||||
markerup:Set(markerpos)
|
||||
markerup[3] = markerup[3] + 50
|
||||
|
||||
render.DrawLine(markerpos, markerup, markercol, true)
|
||||
|
||||
local ang = EyeAngles()
|
||||
ang.x = -90
|
||||
|
||||
markerup[3] = markerup[3] + 50 + math.sin(CurTime()*4)*5
|
||||
cam.Start3D2D(markerup - ang:Right()*13, ang, 1)
|
||||
markerup[3] = markerup[3] + 50 + math.sin(CurTime() * 4) * 5
|
||||
|
||||
cam.Start3D2D(markerup - ang:Right() * 13, ang, 1)
|
||||
|
||||
surface.SetFont("BeatrunHUD")
|
||||
surface.SetTextPos(0,0)
|
||||
surface.SetTextPos(0, 0)
|
||||
surface.SetTextColor(markercol)
|
||||
surface.DrawText("←")
|
||||
|
||||
cam.End3D2D()
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("PostDrawTranslucentRenderables", "TutorialMarker", TutorialMarker)
|
||||
|
||||
|
||||
local creditslist = {
|
||||
{3.25, "Beatrun"},
|
||||
{3.25, "Authored by datae"},
|
||||
{3.25, "Ideas stolen from Mirror's Edge"},
|
||||
{3.75, "Sounds stolen from Mirror's Edge"},
|
||||
{3.25, "Infection music stolen from Dying Light"},
|
||||
{1.75, "Maybe I forgot more?"},
|
||||
{3.25, "Anyways..."},
|
||||
{8.75, "Thanks for playing, %s!"},
|
||||
{7.5, ""},
|
||||
{3.25, "Beatrun"},
|
||||
{3.25, "Authored by datae"},
|
||||
{3.25, "Ideas stolen from Mirror's Edge"},
|
||||
{3.75, "Sounds stolen from Mirror's Edge"},
|
||||
{3.25, "Infection music stolen from Dying Light"},
|
||||
{1.75, "Maybe I forgot more?"},
|
||||
{3.25, "Anyways..."},
|
||||
{8.75, "Thanks for playing, %s!"},
|
||||
{7.5, ""},
|
||||
}
|
||||
|
||||
local creditstime = 0
|
||||
local curcredit = 1
|
||||
|
||||
local function CreditsThink()
|
||||
if gui.IsGameUIVisible() then return end
|
||||
|
||||
cam.Start2D()
|
||||
|
||||
local data = creditslist[curcredit]
|
||||
surface.SetDrawColor(0,0,0)
|
||||
|
||||
surface.SetDrawColor(0, 0, 0)
|
||||
surface.DrawRect(0, 0, ScrW(), ScrH())
|
||||
surface.SetFont("BeatrunHUD")
|
||||
|
||||
local text = data[2]
|
||||
text = string.format(text, LocalPlayer():Nick())
|
||||
|
||||
local tw, th = surface.GetTextSize(text)
|
||||
|
||||
surface.SetTextColor(220, 220, 220, 255)
|
||||
surface.SetTextPos(ScrW()/2 - (tw*0.5), ScrH()/2 - (th*0.5))
|
||||
surface.SetTextPos(ScrW() / 2 - (tw * 0.5), ScrH() / 2 - (th * 0.5))
|
||||
surface.DrawText(text)
|
||||
if CurTime() > creditstime+data[1] then
|
||||
|
||||
if CurTime() > creditstime + data[1] then
|
||||
creditstime = CurTime()
|
||||
curcredit = curcredit + 1
|
||||
if !creditslist[curcredit] then
|
||||
|
||||
if not creditslist[curcredit] then
|
||||
hook.Remove("PreRender", "Credits")
|
||||
RunConsoleCommand("disconnect")
|
||||
end
|
||||
end
|
||||
|
||||
cam.End2D()
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
local function CreditsStart()
|
||||
creditstime = CurTime()
|
||||
curcredit = 1
|
||||
hook.Add("PreRender", "Credits", CreditsThink)
|
||||
|
||||
hook.Add("PreRender", "Credits", CreditsThink)
|
||||
RunConsoleCommand("stopsound")
|
||||
timer.Simple(0, function() EmitSound("music/credits.mp3", vector_origin, -2, CHAN_AUTO, 1, 75, SND_SHOULDPAUSE) end)
|
||||
|
||||
timer.Simple(0, function()
|
||||
EmitSound("music/credits.mp3", vector_origin, -2, CHAN_AUTO, 1, 75, SND_SHOULDPAUSE)
|
||||
end)
|
||||
end
|
||||
|
||||
local creditscheck = 0
|
||||
|
||||
hook.Add("PlayerBindPress", "CreditsCheck", function(ply, bind, pressed)
|
||||
if creditstime == 0 and bind == "+use" then
|
||||
creditscheck = creditscheck + 1
|
||||
if creditscheck > (30-ply:GetLevel()) then
|
||||
|
||||
if creditscheck > (30 - ply:GetLevel()) then
|
||||
CreditsStart()
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
net.Receive("DeathStopSound", function()
|
||||
if !blinded then
|
||||
if not blinded then
|
||||
RunConsoleCommand("stopsound")
|
||||
|
||||
if LocalPlayer():GetPos().z < -2200 then
|
||||
timer.Simple(0.011, function() RunConsoleCommand("stopsound") end)
|
||||
timer.Simple(0.02, function() LocalPlayer():EmitSound("enterwater_highvelocity_0"..math.random(1,2)..".wav") end)
|
||||
timer.Simple(0.011, function()
|
||||
RunConsoleCommand("stopsound")
|
||||
end)
|
||||
|
||||
timer.Simple(0.02, function()
|
||||
LocalPlayer():EmitSound("enterwater_highvelocity_0" .. math.random(1, 2) .. ".wav")
|
||||
end)
|
||||
|
||||
timer.Simple(0.02, function()
|
||||
local rag = LocalPlayer():GetRagdollEntity()
|
||||
|
||||
if IsValid(rag) then
|
||||
for i = 0, rag:GetPhysicsObjectCount() - 1 do
|
||||
local phys = rag:GetPhysicsObjectNum( i )
|
||||
local phys = rag:GetPhysicsObjectNum(i)
|
||||
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
net.Receive("DeathStopSound", function()
|
||||
if !blinded then
|
||||
if not blinded then
|
||||
RunConsoleCommand("stopsound")
|
||||
|
||||
if LocalPlayer():GetPos().z < -2200 then
|
||||
timer.Simple(0.011, function() RunConsoleCommand("stopsound") end)
|
||||
timer.Simple(0.02, function() LocalPlayer():EmitSound("enterwater_highvelocity_0"..math.random(1,2)..".wav") end)
|
||||
timer.Simple(0.011, function()
|
||||
RunConsoleCommand("stopsound")
|
||||
end)
|
||||
|
||||
timer.Simple(0.02, function()
|
||||
LocalPlayer():EmitSound("enterwater_highvelocity_0" .. math.random(1, 2) .. ".wav")
|
||||
end)
|
||||
|
||||
timer.Simple(0.02, function()
|
||||
local rag = LocalPlayer():GetRagdollEntity()
|
||||
|
||||
if IsValid(rag) then
|
||||
for i = 0, rag:GetPhysicsObjectCount() - 1 do
|
||||
local phys = rag:GetPhysicsObjectNum( i )
|
||||
local phys = rag:GetPhysicsObjectNum(i)
|
||||
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
local spawn = {
|
||||
{"br_swingbar", Vector(935.281250, 847.187500, 13185), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(935.281250, 813.875000, 13185), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(935.281250, 847.187500, 13185), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(935.281250, 813.875000, 13185), Angle(0, 0, 0)},
|
||||
}
|
||||
|
||||
function PrintAllBars()
|
||||
for k,v in pairs(ents.FindByClass("br_swingbar")) do
|
||||
for k, v in pairs(ents.FindByClass("br_swingbar")) do
|
||||
local pos, ang = v:GetPos(), v:GetAngles()
|
||||
local str = '{"br_swingbar", Vector('..pos.x..", "..pos.y..", "..pos.z.."), Angle("..ang.x..", "..ang.y..", "..ang.z..")},"
|
||||
local str = "{\"br_swingbar\", Vector(" .. pos.x .. ", " .. pos.y .. ", " .. pos.z .. "), Angle(" .. ang.x .. ", " .. ang.y .. ", " .. ang.z .. ")},"
|
||||
print(str)
|
||||
end
|
||||
end
|
||||
|
||||
local function CreateSpawnEntities()
|
||||
for k,v in ipairs(spawn) do
|
||||
for k, v in ipairs(spawn) do
|
||||
BRProtectedEntity(v[1], v[2], v[3])
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("InitPostEntity", "CreateSpawnEntities", CreateSpawnEntities)
|
||||
hook.Add("PostCleanupMap", "CreateSpawnEntities", CreateSpawnEntities)
|
||||
|
||||
|
||||
print("Loaded worlds")
|
||||
|
||||
BlockWhitescaleSkypaint = true
|
|
@ -1,42 +1,48 @@
|
|||
local blacklistedents = {
|
||||
["weapon_pistol"] = true,
|
||||
["weapon_357"] = true,
|
||||
["weapon_crossbow"] = true,
|
||||
["weapon_crowbar"] = true,
|
||||
["weapon_ar2"] = true,
|
||||
["weapon_rpg"] = true,
|
||||
["weapon_shotgun"] = true,
|
||||
["weapon_smg1"] = true,
|
||||
["item_ammo_357"] = true,
|
||||
["item_ammo_ar2"] = true,
|
||||
["item_ammo_ar2_altfire"] = true,
|
||||
["item_healthkit"] = true,
|
||||
["item_healthvial"] = true,
|
||||
["item_ammo_smg1"] = true,
|
||||
["item_box_buckshot"] = true,
|
||||
["item_battery"] = true,
|
||||
["item_ammo_smg1_grenade"] = true,
|
||||
["item_ammo_pistol"] = true,
|
||||
["item_ammo_crossbow"] = true,
|
||||
["item_rpg_round"] = true,
|
||||
["item_ammo_smg1_large"] = true,
|
||||
["weapon_frag"] = true
|
||||
["weapon_pistol"] = true,
|
||||
["weapon_357"] = true,
|
||||
["weapon_crossbow"] = true,
|
||||
["weapon_crowbar"] = true,
|
||||
["weapon_ar2"] = true,
|
||||
["weapon_rpg"] = true,
|
||||
["weapon_shotgun"] = true,
|
||||
["weapon_smg1"] = true,
|
||||
["item_ammo_357"] = true,
|
||||
["item_ammo_ar2"] = true,
|
||||
["item_ammo_ar2_altfire"] = true,
|
||||
["item_healthkit"] = true,
|
||||
["item_healthvial"] = true,
|
||||
["item_ammo_smg1"] = true,
|
||||
["item_box_buckshot"] = true,
|
||||
["item_battery"] = true,
|
||||
["item_ammo_smg1_grenade"] = true,
|
||||
["item_ammo_pistol"] = true,
|
||||
["item_ammo_crossbow"] = true,
|
||||
["item_rpg_round"] = true,
|
||||
["item_ammo_smg1_large"] = true,
|
||||
["weapon_frag"] = true
|
||||
}
|
||||
|
||||
local old = game.CleanUpMap
|
||||
|
||||
local CleanUpMapDetoured = function(dsc, efilters)
|
||||
if istable(efilters) then
|
||||
table.insert(efilters, "env_skypaint")
|
||||
end
|
||||
|
||||
old(dsc, efilters)
|
||||
end
|
||||
|
||||
game.CleanUpMap = CleanUpMapDetoured
|
||||
|
||||
local skypaint
|
||||
|
||||
hook.Add("PlayerSpawn", "CubixInit", function()
|
||||
RunConsoleCommand("sv_skyname","painted")
|
||||
if !skypaint then
|
||||
RunConsoleCommand("sv_skyname", "painted")
|
||||
|
||||
if not skypaint then
|
||||
skypaint = ents.Create("env_skypaint")
|
||||
|
||||
WhitescaleOn()
|
||||
end
|
||||
end)
|
||||
|
@ -44,12 +50,14 @@ end)
|
|||
hook.Add("OnEntityCreated", "BlacklistedEnts", function(ent)
|
||||
if IsValid(ent) and blacklistedents[ent:GetClass()] then
|
||||
ent:Remove()
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
timer.Simple(0, function()
|
||||
if IsValid(ent) and (ent:GetClass()=="prop_physics" or ent:GetClass()=="prop_physics_respawnable") then
|
||||
if IsValid(ent) and (ent:GetClass() == "prop_physics" or ent:GetClass() == "prop_physics_respawnable") then
|
||||
local phys = ent:GetPhysicsObject()
|
||||
|
||||
if IsValid(phys) then
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
|
|
|
@ -1,219 +1,223 @@
|
|||
local blacklistedents = {
|
||||
["weapon_pistol"] = true,
|
||||
["weapon_357"] = true,
|
||||
["weapon_crossbow"] = true,
|
||||
["weapon_crowbar"] = true,
|
||||
["weapon_ar2"] = true,
|
||||
["weapon_rpg"] = true,
|
||||
["weapon_shotgun"] = true,
|
||||
["weapon_smg1"] = true,
|
||||
["item_ammo_357"] = true,
|
||||
["item_ammo_ar2"] = true,
|
||||
["item_ammo_ar2_altfire"] = true,
|
||||
["item_healthkit"] = true,
|
||||
["item_healthvial"] = true,
|
||||
["item_ammo_smg1"] = true,
|
||||
["item_box_buckshot"] = true,
|
||||
["item_battery"] = true,
|
||||
["item_ammo_smg1_grenade"] = true,
|
||||
["item_ammo_pistol"] = true,
|
||||
["item_ammo_crossbow"] = true,
|
||||
["item_rpg_round"] = true,
|
||||
["item_ammo_smg1_large"] = true
|
||||
["weapon_pistol"] = true,
|
||||
["weapon_357"] = true,
|
||||
["weapon_crossbow"] = true,
|
||||
["weapon_crowbar"] = true,
|
||||
["weapon_ar2"] = true,
|
||||
["weapon_rpg"] = true,
|
||||
["weapon_shotgun"] = true,
|
||||
["weapon_smg1"] = true,
|
||||
["item_ammo_357"] = true,
|
||||
["item_ammo_ar2"] = true,
|
||||
["item_ammo_ar2_altfire"] = true,
|
||||
["item_healthkit"] = true,
|
||||
["item_healthvial"] = true,
|
||||
["item_ammo_smg1"] = true,
|
||||
["item_box_buckshot"] = true,
|
||||
["item_battery"] = true,
|
||||
["item_ammo_smg1_grenade"] = true,
|
||||
["item_ammo_pistol"] = true,
|
||||
["item_ammo_crossbow"] = true,
|
||||
["item_rpg_round"] = true,
|
||||
["item_ammo_smg1_large"] = true
|
||||
}
|
||||
|
||||
local old = game.CleanUpMap
|
||||
|
||||
local CleanUpMapDetoured = function(dsc, efilters)
|
||||
if istable(efilters) then
|
||||
table.insert(efilters, "env_skypaint")
|
||||
end
|
||||
|
||||
old(dsc, efilters)
|
||||
end
|
||||
|
||||
local spawn = {
|
||||
{"br_swingbar", Vector(-473.625, 2578.53125, 219.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-303.8125, 2578.53125, 219.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-398.15625, 2578.53125, 219.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(3387.78125, 2381.0625, 235.1875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(3387.78125, 2286.84375, 235.1875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1222.21875, 1197.59375, 561.15625), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1566.3125, 1181.9375, 465.78125), Angle(0, -45, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1228.65625, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1062.25, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1156.25, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2076.34375, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2076.34375, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2076.375, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2014.34375, 2145.6875, 670.9375), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(2014.34375, 2145.6875, 355.125), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(1967.34375, 1558.59375, 582.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2014.34375, 2145.6875, 454.21875), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(-302.65625, 5230.15625, 461.625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-445.125, 5230.15625, 461.59375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-350.5, 5230.15625, 461.59375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-350.5, 5692.8125, 381.84375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-302.65625, 5692.8125, 381.84375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-445.125, 5692.8125, 381.84375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-350.5, 5489.90625, 420.3125), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-302.65625, 5489.90625, 420.34375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-445.125, 5489.90625, 420.3125), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4603.78125, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4698.09375, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4509.8125, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4415.53125, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(748.8125, 4341.1875, 374), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(654.09375, 4341.1875, 374), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(558.34375, 4341.1875, 374), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1261.25, 4447.3125, 229.40625), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1425.46875, 4447.3125, 229.40625), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1331.21875, 4447.3125, 229.40625), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1261.25, 4259.6875, 165.875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1425.46875, 4259.6875, 165.875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1331.21875, 4259.6875, 165.875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4595.125, -248.8125), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4689.65625, -248.8125), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4527.5625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4811.40625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4622.09375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4716.84375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4527.5625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4811.40625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4622.09375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4716.84375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1718, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.34375, 4811.40625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1718, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1718, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4595.125, -248.78125), Angle(-14.96875, 0, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4689.65625, -248.78125), Angle(-14.96875, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4622.09375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4527.5625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4716.84375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1202.625, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1202.625, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1202.625, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1481.375, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1481.375, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1481.375, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1773.0625, 4249.3125, -0.875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1774.59375, 4251.5, -0.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1938, 4251.5, -0.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1866.53125, 4249.3125, -0.875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1868.0625, 4251.5, -0.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1936.46875, 4249.3125, -0.875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1773.0625, 4399.96875, -91.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1938, 4402.15625, -90.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1866.53125, 4399.96875, -91.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1868.0625, 4402.15625, -90.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1936.46875, 4399.96875, -91.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1774.59375, 4402.15625, -90.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4689.65625, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4595.125, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4595.125, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4689.65625, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(-740.78125, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-740.75, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-519.09375, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-519.09375, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-238.9375, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-17.28125, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-238.9375, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-17.28125, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(927.21875, 2399.8125, 115.3125), Angle(0, 135, 0)},
|
||||
{"br_swingbar", Vector(913.59375, 2681.71875, 114.09375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1309.09375, 2333.59375, 19), Angle(0, -45, 0)},
|
||||
{"br_swingbar", Vector(1360.53125, 2053.5625, -3.59375), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1360.90625, 1734.5625, -65.09375), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1316.84375, 1415.65625, -84.125), Angle(0, -60, 0)},
|
||||
{"br_swingbar", Vector(1765.78125, 1377.84375, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1765.78125, 1284.0625, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1529.1875, 1197.1875, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1529.1875, 1290.96875, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2635.4375, 1493.15625, 8.46875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2635.4375, 1330.03125, 8.5), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2713.09375, 1418.4375, 99.78125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2055, 1418.4375, -183.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2055, 1488.59375, -183.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2055, 1325.46875, -183.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2237, 1418.4375, -140.96875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2237, 1488.59375, -141), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2237, 1325.46875, -140.96875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2463.84375, 1418.4375, -85.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2463.84375, 1488.59375, -85.71875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2463.84375, 1325.46875, -85.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2635.4375, 1423, 8.46875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-2400.0625, 95.59375, 307.90625), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(2274.5, 2412.0625, 136.46875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2274.5, 2650.0625, 123.46875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2606.75, 1556, 594.78125), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2600.21875, 1798.09375, 611.125), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2582.125, 2146.9375, 531.6875), Angle(0, -45, 0)},
|
||||
{"br_swingbar", Vector(2437.125, 2715.25, 377.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2345.5, 2715.25, 377.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2376.90625, 2456.28125, 377.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2285.28125, 2456.28125, 377.5), Angle(0, 90, 0)},
|
||||
{"br_anticampbox", Vector(-778.63702392578, -1732.625, 1833.2685546875), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-1413.6267089844, -889.77520751953, 1408.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-2296.6579589844, -766.48419189453, 1152.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-1411.6685791016, 7568.8515625, 1024.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(653.60040283203, 7546.6235351563, 1024.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(1083.7712402344, 3445.6235351563, 896.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(1605.3482666016, 3456.8474121094, 896.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(2105.6247558594, 3471.8090820313, 896.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(4092.0490722656, 4081.3520507813, 1280.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(4089.609375, 2811.6884765625, 1280.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(3846.6906738281, 2050.796875, 1216.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(3843.7377929688, 1138.6533203125, 1216.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(2306.8647460938, 1014.7623291016, 1474.8770751953), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(501.71005249023, 63.838512420654, 1280.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-74.375015258789, 125.63264465332, 1408.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-136.48791503906, -894.35400390625, 1408.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-380.66781616211, 1725.1768798828, 2131.5939941406), Angle(0, 0, 0)},
|
||||
|
||||
|
||||
{"br_swingbar", Vector(-473.625, 2578.53125, 219.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-303.8125, 2578.53125, 219.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-398.15625, 2578.53125, 219.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(3387.78125, 2381.0625, 235.1875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(3387.78125, 2286.84375, 235.1875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1222.21875, 1197.59375, 561.15625), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1566.3125, 1181.9375, 465.78125), Angle(0, -45, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1228.65625, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1062.25, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1156.25, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2309.21875, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2076.34375, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2076.34375, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2076.375, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1417.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1323.1875, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1792.15625, 1489.59375, 228.59375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2014.34375, 2145.6875, 670.9375), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(2014.34375, 2145.6875, 355.125), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(1967.34375, 1558.59375, 582.5625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2014.34375, 2145.6875, 454.21875), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(-302.65625, 5230.15625, 461.625), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-445.125, 5230.15625, 461.59375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-350.5, 5230.15625, 461.59375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-350.5, 5692.8125, 381.84375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-302.65625, 5692.8125, 381.84375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-445.125, 5692.8125, 381.84375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-350.5, 5489.90625, 420.3125), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-302.65625, 5489.90625, 420.34375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(-445.125, 5489.90625, 420.3125), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4603.78125, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4698.09375, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4509.8125, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(446.40625, 4415.53125, 370.9375), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(748.8125, 4341.1875, 374), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(654.09375, 4341.1875, 374), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(558.34375, 4341.1875, 374), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1261.25, 4447.3125, 229.40625), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1425.46875, 4447.3125, 229.40625), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1331.21875, 4447.3125, 229.40625), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1261.25, 4259.6875, 165.875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1425.46875, 4259.6875, 165.875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1331.21875, 4259.6875, 165.875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4595.125, -248.8125), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4689.65625, -248.8125), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4527.5625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4811.40625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4622.09375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1504.59375, 4716.84375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4527.5625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4811.40625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4622.09375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1166.28125, 4716.84375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1718, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.34375, 4811.40625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1718, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1718, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4595.125, -248.78125), Angle(-14.96875, 0, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4689.65625, -248.78125), Angle(-14.96875, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4622.09375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4527.5625, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4716.84375, 216.03125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(967.3125, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1202.625, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1202.625, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1202.625, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1481.375, 4622.09375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1481.375, 4527.5625, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1481.375, 4716.84375, -37.53125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1773.0625, 4249.3125, -0.875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1774.59375, 4251.5, -0.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1938, 4251.5, -0.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1866.53125, 4249.3125, -0.875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1868.0625, 4251.5, -0.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1936.46875, 4249.3125, -0.875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1773.0625, 4399.96875, -91.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1938, 4402.15625, -90.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1866.53125, 4399.96875, -91.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1868.0625, 4402.15625, -90.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1936.46875, 4399.96875, -91.1875), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1774.59375, 4402.15625, -90.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4689.65625, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(538.03125, 4595.125, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4595.125, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(377.3125, 4689.65625, -5.46875), Angle(-15, 0, 0)},
|
||||
{"br_swingbar", Vector(-740.78125, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-740.75, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-519.09375, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-519.09375, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-238.9375, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-17.28125, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-238.9375, 2292.65625, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-17.28125, 2385.21875, 638.25), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(927.21875, 2399.8125, 115.3125), Angle(0, 135, 0)},
|
||||
{"br_swingbar", Vector(913.59375, 2681.71875, 114.09375), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(1309.09375, 2333.59375, 19), Angle(0, -45, 0)},
|
||||
{"br_swingbar", Vector(1360.53125, 2053.5625, -3.59375), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1360.90625, 1734.5625, -65.09375), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(1316.84375, 1415.65625, -84.125), Angle(0, -60, 0)},
|
||||
{"br_swingbar", Vector(1765.78125, 1377.84375, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1765.78125, 1284.0625, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1529.1875, 1197.1875, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(1529.1875, 1290.96875, -99.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2635.4375, 1493.15625, 8.46875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2635.4375, 1330.03125, 8.5), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2713.09375, 1418.4375, 99.78125), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2055, 1418.4375, -183.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2055, 1488.59375, -183.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2055, 1325.46875, -183.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2237, 1418.4375, -140.96875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2237, 1488.59375, -141), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2237, 1325.46875, -140.96875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2463.84375, 1418.4375, -85.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2463.84375, 1488.59375, -85.71875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2463.84375, 1325.46875, -85.6875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(2635.4375, 1423, 8.46875), Angle(0, 0, 0)},
|
||||
{"br_swingbar", Vector(-2400.0625, 95.59375, 307.90625), Angle(0, 45, 0)},
|
||||
{"br_swingbar", Vector(2274.5, 2412.0625, 136.46875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2274.5, 2650.0625, 123.46875), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2606.75, 1556, 594.78125), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2600.21875, 1798.09375, 611.125), Angle(0, -90, 0)},
|
||||
{"br_swingbar", Vector(2582.125, 2146.9375, 531.6875), Angle(0, -45, 0)},
|
||||
{"br_swingbar", Vector(2437.125, 2715.25, 377.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2345.5, 2715.25, 377.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2376.90625, 2456.28125, 377.5), Angle(0, 90, 0)},
|
||||
{"br_swingbar", Vector(2285.28125, 2456.28125, 377.5), Angle(0, 90, 0)},
|
||||
{"br_anticampbox", Vector(-778.63702392578, -1732.625, 1833.2685546875), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-1413.6267089844, -889.77520751953, 1408.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-2296.6579589844, -766.48419189453, 1152.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-1411.6685791016, 7568.8515625, 1024.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(653.60040283203, 7546.6235351563, 1024.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(1083.7712402344, 3445.6235351563, 896.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(1605.3482666016, 3456.8474121094, 896.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(2105.6247558594, 3471.8090820313, 896.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(4092.0490722656, 4081.3520507813, 1280.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(4089.609375, 2811.6884765625, 1280.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(3846.6906738281, 2050.796875, 1216.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(3843.7377929688, 1138.6533203125, 1216.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(2306.8647460938, 1014.7623291016, 1474.8770751953), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(501.71005249023, 63.838512420654, 1280.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-74.375015258789, 125.63264465332, 1408.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-136.48791503906, -894.35400390625, 1408.03125), Angle(0, 0, 0)},
|
||||
{"br_anticampbox", Vector(-380.66781616211, 1725.1768798828, 2131.5939941406), Angle(0, 0, 0)},
|
||||
}
|
||||
|
||||
function PrintAllBars()
|
||||
for k,v in pairs(ents.FindByClass("br_swingbar")) do
|
||||
for k, v in pairs(ents.FindByClass("br_swingbar")) do
|
||||
local pos, ang = v:GetPos(), v:GetAngles()
|
||||
local str = '{"br_swingbar", Vector('..pos.x..", "..pos.y..", "..pos.z.."), Angle("..ang.x..", "..ang.y..", "..ang.z..")},"
|
||||
local str = "{\"br_swingbar\", Vector(" .. pos.x .. ", " .. pos.y .. ", " .. pos.z .. "), Angle(" .. ang.x .. ", " .. ang.y .. ", " .. ang.z .. ")},"
|
||||
print(str)
|
||||
end
|
||||
end
|
||||
|
||||
function PrintAllCampBoxes()
|
||||
for k,v in pairs(ents.FindByClass("br_anticampbox")) do
|
||||
for k, v in pairs(ents.FindByClass("br_anticampbox")) do
|
||||
local pos, ang = v:GetPos(), v:GetAngles()
|
||||
local str = '{"br_anticampbox", Vector('..pos.x..", "..pos.y..", "..pos.z.."), Angle("..ang.x..", "..ang.y..", "..ang.z..")},"
|
||||
local str = "{\"br_anticampbox\", Vector(" .. pos.x .. ", " .. pos.y .. ", " .. pos.z .. "), Angle(" .. ang.x .. ", " .. ang.y .. ", " .. ang.z .. ")},"
|
||||
print(str)
|
||||
end
|
||||
end
|
||||
|
||||
local function CreateSpawnEntities()
|
||||
for k,v in ipairs(spawn) do
|
||||
for k, v in ipairs(spawn) do
|
||||
BRProtectedEntity(v[1], v[2], v[3])
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("InitPostEntity", "CreateSpawnEntities", CreateSpawnEntities)
|
||||
hook.Add("PostCleanupMap", "CreateSpawnEntities", CreateSpawnEntities)
|
||||
|
||||
game.CleanUpMap = CleanUpMapDetoured
|
||||
|
||||
local skypaint
|
||||
|
||||
hook.Add("PlayerSpawn", "CubixInit", function()
|
||||
RunConsoleCommand("sv_skyname","painted")
|
||||
if !skypaint then
|
||||
RunConsoleCommand("sv_skyname", "painted")
|
||||
|
||||
if not skypaint then
|
||||
skypaint = ents.Create("env_skypaint")
|
||||
WhitescaleOn()
|
||||
end
|
||||
|
@ -222,16 +226,20 @@ end)
|
|||
hook.Add("OnEntityCreated", "BlacklistedEnts", function(ent)
|
||||
if IsValid(ent) and blacklistedents[ent:GetClass()] then
|
||||
ent:Remove()
|
||||
|
||||
return
|
||||
end
|
||||
if IsValid(ent) and ent:GetClass()=="func_button" and ent:GetName() == "device_ctrl" then
|
||||
|
||||
if IsValid(ent) and ent:GetClass() == "func_button" and ent:GetName() == "device_ctrl" then
|
||||
ent:Remove()
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
timer.Simple(0, function()
|
||||
if IsValid(ent) and (ent:GetClass()=="prop_physics" or ent:GetClass()=="prop_physics_respawnable") then
|
||||
if IsValid(ent) and (ent:GetClass() == "prop_physics" or ent:GetClass() == "prop_physics_respawnable") then
|
||||
local phys = ent:GetPhysicsObject()
|
||||
|
||||
if IsValid(phys) then
|
||||
phys:EnableMotion(false)
|
||||
end
|
||||
|
@ -240,8 +248,7 @@ hook.Add("OnEntityCreated", "BlacklistedEnts", function(ent)
|
|||
end)
|
||||
|
||||
hook.Add("PlayerUse", "button", function(ply, ent)
|
||||
if ent:GetName() == "device_ctrl" then
|
||||
return false
|
||||
end
|
||||
if ent:GetName() == "device_ctrl" then return false end
|
||||
end)
|
||||
|
||||
print("Loaded cubix")
|
|
@ -1,17 +1,18 @@
|
|||
local spawn = {
|
||||
{"br_databank", Vector(46.673126220703,957.37548828125,256.03125)},
|
||||
{"br_databank", Vector(-3.3380174636841,-939.83837890625,256.03125)},
|
||||
{"br_databank", Vector(946.02209472656,269.16903686523,522.03125)},
|
||||
{"br_databank", Vector(-802.15405273438,343.96166992188,272.03125)},
|
||||
{"br_databank", Vector(-694.69586181641,-590.50836181641,272.03125)},
|
||||
{"br_databank", Vector(-46.449630737305,-1083.9945068359,256.03125)},
|
||||
{"br_databank", Vector(651.01989746094,-464.4665222168,458.03125)},
|
||||
{"br_databank", Vector(46.673126220703, 957.37548828125, 256.03125)},
|
||||
{"br_databank", Vector(-3.3380174636841, -939.83837890625, 256.03125)},
|
||||
{"br_databank", Vector(946.02209472656, 269.16903686523, 522.03125)},
|
||||
{"br_databank", Vector(-802.15405273438, 343.96166992188, 272.03125)},
|
||||
{"br_databank", Vector(-694.69586181641, -590.50836181641, 272.03125)},
|
||||
{"br_databank", Vector(-46.449630737305, -1083.9945068359, 256.03125)},
|
||||
{"br_databank", Vector(651.01989746094, -464.4665222168, 458.03125)},
|
||||
}
|
||||
|
||||
local function CreateSpawnEntities()
|
||||
for k,v in ipairs(spawn) do
|
||||
for k, v in ipairs(spawn) do
|
||||
BRProtectedEntity(v[1], v[2], angle_zero)
|
||||
end
|
||||
end
|
||||
|
||||
hook.Add("InitPostEntity", "CreateSpawnEntities", CreateSpawnEntities)
|
||||
hook.Add("PostCleanupMap", "CreateSpawnEntities", CreateSpawnEntities)
|
|
@ -3,11 +3,11 @@ hook.Add("OnEntityCreated", "lol", function(ent)
|
|||
SafeRemoveEntityDelayed(ent, 0.1)
|
||||
end
|
||||
|
||||
if ent:GetClass()=="trigger_weapon_strip" then
|
||||
if ent:GetClass() == "trigger_weapon_strip" then
|
||||
ent:Remove()
|
||||
end
|
||||
|
||||
if ent:GetClass()=="trigger_once" then
|
||||
if ent:GetClass() == "trigger_once" then
|
||||
ent:Remove()
|
||||
end
|
||||
end)
|
|
@ -1,20 +1,24 @@
|
|||
function CreateRopes()
|
||||
local ents = ents.GetAll()
|
||||
for k,v in pairs(ents) do
|
||||
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass() == "move_rope" then
|
||||
local endpoint = v:GetInternalVariable("m_hEndPoint")
|
||||
|
||||
if IsValid(endpoint) then
|
||||
local zipline = CreateZipline(v:GetPos(), endpoint:GetPos())
|
||||
|
||||
zipline:SetNW2Bool("BRProtected", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(ents) do
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass():find("rope") then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
hook.Remove("InitPostEntity", "CreateRopes")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
function CreateRopes()
|
||||
local ents = ents.GetAll()
|
||||
for k,v in pairs(ents) do
|
||||
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass() == "move_rope" then
|
||||
local endpoint = v:GetInternalVariable("m_hEndPoint")
|
||||
|
||||
if IsValid(endpoint) then
|
||||
local zipline = CreateZipline(v:GetPos(), endpoint:GetPos())
|
||||
|
||||
zipline:SetNW2Bool("BRProtected", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(ents) do
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass():find("rope") then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
hook.Remove("InitPostEntity", "CreateRopes")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
function CreateRopes()
|
||||
local ents = ents.GetAll()
|
||||
for k,v in pairs(ents) do
|
||||
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass() == "move_rope" then
|
||||
local endpoint = v:GetInternalVariable("m_hEndPoint")
|
||||
|
||||
if IsValid(endpoint) then
|
||||
local zipline = CreateZipline(v:GetPos(), endpoint:GetPos())
|
||||
|
||||
zipline:SetNW2Bool("BRProtected", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(ents) do
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass():find("rope") then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
hook.Remove("InitPostEntity", "CreateRopes")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
function CreateRopes()
|
||||
local ents = ents.GetAll()
|
||||
for k,v in pairs(ents) do
|
||||
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass() == "move_rope" then
|
||||
local endpoint = v:GetInternalVariable("m_hEndPoint")
|
||||
|
||||
if IsValid(endpoint) then
|
||||
local zipline = CreateZipline(v:GetPos(), endpoint:GetPos())
|
||||
|
||||
zipline:SetNW2Bool("BRProtected", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(ents) do
|
||||
for k, v in pairs(ents) do
|
||||
if v:GetClass():find("rope") then
|
||||
v:Remove()
|
||||
end
|
||||
end
|
||||
|
||||
hook.Remove("InitPostEntity", "CreateRopes")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
if not game.SinglePlayer() then return end
|
||||
|
||||
local bigboy = false
|
||||
|
||||
local welcome = {
|
||||
w = 700,
|
||||
h = 400
|
||||
}
|
||||
|
||||
welcome.x = 960 - welcome.w * 0.5
|
||||
welcome.y = 540 - welcome.h * 0.5
|
||||
welcome.bgcolor = Color(32, 32, 32)
|
||||
|
@ -10,12 +14,12 @@ welcome.outlinecolor = Color(54, 55, 56)
|
|||
welcome.alpha = 0.9
|
||||
welcome.elements = {}
|
||||
|
||||
/*
|
||||
--[[
|
||||
local function closebutton(self)
|
||||
LocalPlayer():EmitSound("holygrenade.mp3")
|
||||
AEUI:Clear()
|
||||
end
|
||||
*/
|
||||
]]
|
||||
|
||||
local function warnclosebutton(self)
|
||||
LocalPlayer():EmitSound("holygrenade.mp3")
|
||||
|
@ -24,10 +28,9 @@ local function warnclosebutton(self)
|
|||
bigboy = true
|
||||
end
|
||||
|
||||
if not game.SinglePlayer() then return end
|
||||
|
||||
local addons = 0
|
||||
local warning = Material("vgui/warning.png")
|
||||
|
||||
local shit = {
|
||||
["378401390"] = true,
|
||||
["2027577882"] = true,
|
||||
|
@ -48,16 +51,19 @@ local shit = {
|
|||
["142911907"] = true,
|
||||
["2316713217"] = true
|
||||
}
|
||||
|
||||
local warnpanel = {
|
||||
w = 500,
|
||||
h = 350
|
||||
}
|
||||
|
||||
warnpanel.x = 960 - warnpanel.w * 0.5
|
||||
warnpanel.y = 540 - warnpanel.h * 0.5
|
||||
warnpanel.bgcolor = Color(32, 32, 32)
|
||||
warnpanel.outlinecolor = Color(54, 55, 56)
|
||||
warnpanel.alpha = 0.9
|
||||
warnpanel.elements = {}
|
||||
|
||||
local conflictpanel = {
|
||||
w = 400,
|
||||
h = 150,
|
||||
|
@ -68,6 +74,7 @@ local conflictpanel = {
|
|||
alpha = 1,
|
||||
elements = {}
|
||||
}
|
||||
|
||||
local warntext = {
|
||||
type = "Text",
|
||||
font = "AEUIDefault",
|
||||
|
@ -88,10 +95,11 @@ local quitbutton = {
|
|||
centered = true,
|
||||
color = color_white,
|
||||
string = "Return to Main Menu",
|
||||
onclick = function (self)
|
||||
onclick = function(self)
|
||||
surface.PlaySound("garrysmod/ui_click.wav")
|
||||
MsgC(Color(255, 100, 100), "Quitting Beatrun due to conflicting addons!")
|
||||
timer.Simple(0.5, function ()
|
||||
|
||||
timer.Simple(0.5, function()
|
||||
RunConsoleCommand("killserver")
|
||||
end)
|
||||
|
||||
|
@ -146,6 +154,7 @@ local function Seal()
|
|||
local eyeang = EyeAngles()
|
||||
|
||||
LocalPlayer():DrawViewModel(false)
|
||||
|
||||
render.RenderView({
|
||||
y = 0,
|
||||
x = 0,
|
||||
|
@ -154,6 +163,7 @@ local function Seal()
|
|||
w = w,
|
||||
h = h
|
||||
})
|
||||
|
||||
render.SetScissorRect(0, 0, w, h, true)
|
||||
|
||||
local light = render.GetLightColor(eyepos)
|
||||
|
@ -171,11 +181,14 @@ local function Seal()
|
|||
surface.SetDrawColor(math.min(colx, 255), math.min(coly, 255), math.min(colz, 255), 255)
|
||||
surface.SetMaterial(sealplead)
|
||||
surface.DrawTexturedRectRotated(x + w * 0.5, y + h * 0.5, w + x, h + y + math.abs(math.sin(CurTime()) * 10), eyeang.z)
|
||||
|
||||
render.SetScissorRect(0, 0, 0, 0, false)
|
||||
|
||||
surface.SetFont("BeatrunHUD")
|
||||
surface.SetTextPos(2, 0)
|
||||
surface.SetTextColor(220, 20, 20, math.abs(math.sin(CurTime() * 2) * 255))
|
||||
surface.DrawText(REC .. " LIVE PLAYER CAM")
|
||||
|
||||
LocalPlayer():DrawViewModel(true)
|
||||
end
|
||||
|
||||
|
@ -202,7 +215,7 @@ else
|
|||
end
|
||||
|
||||
if conflictlist.string ~= "" then
|
||||
timer.Simple(0, function ()
|
||||
timer.Simple(0, function()
|
||||
AEUI:AddPanel(warnpanel)
|
||||
AEUI:AddPanel(conflictpanel)
|
||||
end)
|
||||
|
|
|
@ -1,45 +1,5 @@
|
|||
local playermodelbones = {
|
||||
"ValveBiped.Bip01_R_Clavicle",
|
||||
"ValveBiped.Bip01_R_UpperArm",
|
||||
"ValveBiped.Bip01_R_Forearm",
|
||||
"ValveBiped.Bip01_R_Hand",
|
||||
"ValveBiped.Bip01_L_Clavicle",
|
||||
"ValveBiped.Bip01_L_UpperArm",
|
||||
"ValveBiped.Bip01_L_Forearm",
|
||||
"ValveBiped.Bip01_L_Hand",
|
||||
"ValveBiped.Bip01_L_Wrist",
|
||||
"ValveBiped.Bip01_R_Wrist",
|
||||
"ValveBiped.Bip01_L_Finger4",
|
||||
"ValveBiped.Bip01_L_Finger41",
|
||||
"ValveBiped.Bip01_L_Finger42",
|
||||
"ValveBiped.Bip01_L_Finger3",
|
||||
"ValveBiped.Bip01_L_Finger31",
|
||||
"ValveBiped.Bip01_L_Finger32",
|
||||
"ValveBiped.Bip01_L_Finger2",
|
||||
"ValveBiped.Bip01_L_Finger21",
|
||||
"ValveBiped.Bip01_L_Finger22",
|
||||
"ValveBiped.Bip01_L_Finger1",
|
||||
"ValveBiped.Bip01_L_Finger11",
|
||||
"ValveBiped.Bip01_L_Finger12",
|
||||
"ValveBiped.Bip01_L_Finger0",
|
||||
"ValveBiped.Bip01_L_Finger01",
|
||||
"ValveBiped.Bip01_L_Finger02",
|
||||
"ValveBiped.Bip01_R_Finger4",
|
||||
"ValveBiped.Bip01_R_Finger41",
|
||||
"ValveBiped.Bip01_R_Finger42",
|
||||
"ValveBiped.Bip01_R_Finger3",
|
||||
"ValveBiped.Bip01_R_Finger31",
|
||||
"ValveBiped.Bip01_R_Finger32",
|
||||
"ValveBiped.Bip01_R_Finger2",
|
||||
"ValveBiped.Bip01_R_Finger21",
|
||||
"ValveBiped.Bip01_R_Finger22",
|
||||
"ValveBiped.Bip01_R_Finger1",
|
||||
"ValveBiped.Bip01_R_Finger11",
|
||||
"ValveBiped.Bip01_R_Finger12",
|
||||
"ValveBiped.Bip01_R_Finger0",
|
||||
"ValveBiped.Bip01_R_Finger01",
|
||||
"ValveBiped.Bip01_R_Finger02"
|
||||
}
|
||||
local playermodelbones = {"ValveBiped.Bip01_R_Clavicle", "ValveBiped.Bip01_R_UpperArm", "ValveBiped.Bip01_R_Forearm", "ValveBiped.Bip01_R_Hand", "ValveBiped.Bip01_L_Clavicle", "ValveBiped.Bip01_L_UpperArm", "ValveBiped.Bip01_L_Forearm", "ValveBiped.Bip01_L_Hand", "ValveBiped.Bip01_L_Wrist", "ValveBiped.Bip01_R_Wrist", "ValveBiped.Bip01_L_Finger4", "ValveBiped.Bip01_L_Finger41", "ValveBiped.Bip01_L_Finger42", "ValveBiped.Bip01_L_Finger3", "ValveBiped.Bip01_L_Finger31", "ValveBiped.Bip01_L_Finger32", "ValveBiped.Bip01_L_Finger2", "ValveBiped.Bip01_L_Finger21", "ValveBiped.Bip01_L_Finger22", "ValveBiped.Bip01_L_Finger1", "ValveBiped.Bip01_L_Finger11", "ValveBiped.Bip01_L_Finger12", "ValveBiped.Bip01_L_Finger0", "ValveBiped.Bip01_L_Finger01", "ValveBiped.Bip01_L_Finger02", "ValveBiped.Bip01_R_Finger4", "ValveBiped.Bip01_R_Finger41", "ValveBiped.Bip01_R_Finger42", "ValveBiped.Bip01_R_Finger3", "ValveBiped.Bip01_R_Finger31", "ValveBiped.Bip01_R_Finger32", "ValveBiped.Bip01_R_Finger2", "ValveBiped.Bip01_R_Finger21", "ValveBiped.Bip01_R_Finger22", "ValveBiped.Bip01_R_Finger1", "ValveBiped.Bip01_R_Finger11", "ValveBiped.Bip01_R_Finger12", "ValveBiped.Bip01_R_Finger0", "ValveBiped.Bip01_R_Finger01", "ValveBiped.Bip01_R_Finger02"}
|
||||
|
||||
BodyAnim = BodyAnim or nil
|
||||
BodyAnimMDL = BodyAnimMDL or nil
|
||||
BodyAnimMDLarm = BodyAnimMDLarm or nil
|
||||
|
@ -172,6 +132,7 @@ local transition = false
|
|||
local matrixto = {}
|
||||
local scalevec = Vector(1, 1, 1)
|
||||
local matrixfrompos = Vector()
|
||||
|
||||
armbones = {
|
||||
["ValveBiped.Bip01_L_Finger0"] = true,
|
||||
["ValveBiped.Bip01_L_Finger02"] = true,
|
||||
|
@ -269,6 +230,7 @@ function CacheLerpBodyAnim()
|
|||
|
||||
local bonematrix = self:GetBoneMatrix(bone)
|
||||
bonematrix:SetTranslation(bonematrix:GetTranslation() - pos)
|
||||
|
||||
to[bone] = bonematrix:FastToTable(to[bone])
|
||||
|
||||
for i = 1, 3 do
|
||||
|
@ -288,8 +250,8 @@ function CacheLerpBodyAnim()
|
|||
local bt1 = bt[1]
|
||||
local bt2 = bt[2]
|
||||
local bt3 = bt[3]
|
||||
|
||||
slot15 = bt[4]
|
||||
|
||||
self.m:SetUnpacked(bt1[1], bt1[2], bt1[3], bt1[4], bt2[1], bt2[2], bt2[3], bt2[4], bt3[1], bt3[2], bt3[3], bt3[4], 0, 0, 0, 1)
|
||||
end
|
||||
|
||||
|
@ -309,10 +271,12 @@ function StartBodyAnim(animtable)
|
|||
local prestart = hook.Run("BodyAnimPreStart", animtable)
|
||||
|
||||
if prestart then return end
|
||||
|
||||
if IsValid(BodyAnim) and not justremoved then return end
|
||||
|
||||
justremoved = false
|
||||
local ply = LocalPlayer()
|
||||
|
||||
if ply:InVehicle() then return end
|
||||
|
||||
animmodelstring = animtable.animmodelstring
|
||||
|
@ -361,6 +325,7 @@ function StartBodyAnim(animtable)
|
|||
BodyAnim:SetAngles(Angle(0, ply:EyeAngles().y, 0))
|
||||
BodyAnim:SetPos(ply:GetPos())
|
||||
BodyAnim:SetNoDraw(false)
|
||||
|
||||
BodyAnimStartPos:Set(BodyAnim:GetPos())
|
||||
|
||||
if not IsValid(ply:GetHands()) then return end
|
||||
|
@ -529,7 +494,6 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
|||
if BodyAnimPosEaseLerp < 1 then
|
||||
local easedpos = LerpVector(BodyAnimPosEaseLerp, BodyAnimPosEase, pos)
|
||||
BodyAnimPosEaseLerp = math.Approach(BodyAnimPosEaseLerp, 1, FrameTime() * 5)
|
||||
|
||||
BodyAnim:SetPos(easedpos)
|
||||
BodyAnim:SetRenderOrigin(easedpos)
|
||||
else
|
||||
|
@ -634,6 +598,7 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
|||
lasteyeang:Set(ply:EyeAngles())
|
||||
|
||||
local vm = ply:GetViewModel()
|
||||
|
||||
BodyAnimEyeAng = attach.Ang
|
||||
BodyAnimPos = attach.Pos
|
||||
lastattachpos = attach.Pos
|
||||
|
@ -668,13 +633,16 @@ function BodyAnimCalcView2(ply, pos, angles, fov)
|
|||
|
||||
local MEAng = math.Truncate(ang.y, 2)
|
||||
local target = not lockang and MEAng or ply.OrigEyeAng.y
|
||||
|
||||
viewtiltlerp.y = math.ApproachAngle(viewtiltlerp.y, target, FT * (1 + math.abs(math.AngleDifference(viewtiltlerp.y, target)) * 5))
|
||||
|
||||
local MEAngDiff = math.AngleDifference(viewtiltlerp.y, not lockang and lastangy or ply.OrigEyeAng.y) * 0.15
|
||||
ViewTiltAngle = Angle(0, 0, MEAngDiff + viewtiltlerp.z)
|
||||
|
||||
ViewTiltAngle = Angle(0, 0, MEAngDiff + viewtiltlerp.z)
|
||||
view.angles:Add(ViewTiltAngle)
|
||||
|
||||
ply:SetNoDraw(false)
|
||||
|
||||
view.angles:Add(ply:GetViewPunchAngles() + ply:GetCLViewPunchAngles())
|
||||
|
||||
hook.Run("BodyAnimCalcView", view)
|
||||
|
@ -754,6 +722,7 @@ hook.Add("CreateMove", "BodyAnim_Mouse", function(cmd)
|
|||
local oang = ply.OrigEyeAng
|
||||
local limitx = BodyLimitX or 30
|
||||
local limity = BodyLimitY or 50
|
||||
|
||||
pastlimitx = limitx < math.AngleDifference(nang.x, oang.x)
|
||||
pastlimity = limity < math.abs(math.AngleDifference(nang.y, oang.y))
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ hook.Add("Tick", "BreathingLogic", function()
|
|||
|
||||
if nextbreath < CT then
|
||||
ply:FaithVO("Faith.Breath." .. breathstring .. breathstringdur .. breathtype)
|
||||
|
||||
nextbreath = CT + (vel > 200 and 0.5 or 1.25 + math.random(0, 0.1)) + extradur
|
||||
breathin = not breathin
|
||||
end
|
||||
|
|
|
@ -1,40 +1,48 @@
|
|||
local rtcache = {}
|
||||
local rtmatcache = {}
|
||||
|
||||
local propspanel = {
|
||||
w = 384,
|
||||
h = 400
|
||||
}
|
||||
|
||||
propspanel.x = 1632 - propspanel.w * 0.5
|
||||
propspanel.y = 702 - propspanel.h * 0.5
|
||||
propspanel.bgcolor = Color(32, 32, 32)
|
||||
propspanel.outlinecolor = Color(55, 55, 55)
|
||||
propspanel.alpha = 0.9
|
||||
propspanel.elements = {}
|
||||
|
||||
local elementstogglepanel = {
|
||||
w = 384,
|
||||
h = 40
|
||||
}
|
||||
|
||||
elementstogglepanel.x = 1632 - elementstogglepanel.w * 0.5
|
||||
elementstogglepanel.y = 459
|
||||
elementstogglepanel.bgcolor = Color(32, 32, 32)
|
||||
elementstogglepanel.outlinecolor = Color(55, 55, 55)
|
||||
elementstogglepanel.alpha = 0.9
|
||||
elementstogglepanel.elements = {}
|
||||
|
||||
local bmbuttons = {
|
||||
w = 190,
|
||||
h = 100,
|
||||
x = 1632 - propspanel.w * 0.5
|
||||
}
|
||||
|
||||
bmbuttons.y = 972 - bmbuttons.h * 0.5
|
||||
bmbuttons.bgcolor = Color(32, 32, 32)
|
||||
bmbuttons.outlinecolor = Color(55, 55, 55)
|
||||
bmbuttons.alpha = 0.45
|
||||
bmbuttons.elements = {}
|
||||
|
||||
local bminfo = {
|
||||
w = 190,
|
||||
h = 100,
|
||||
x = 1634
|
||||
}
|
||||
|
||||
bminfo.y = 972 - bminfo.h * 0.5
|
||||
bminfo.bgcolor = Color(32, 32, 32)
|
||||
bminfo.outlinecolor = Color(55, 55, 55)
|
||||
|
|
|
@ -19,26 +19,15 @@ surface.CreateFont("BeatrunDebug", {
|
|||
local color_red = Color(220, 20, 20)
|
||||
local startx = 0.2
|
||||
local starty = 0.75
|
||||
local debugdata = {
|
||||
"BodyAnim",
|
||||
"BodyAnimCycle",
|
||||
"BodyAnimString",
|
||||
"campos",
|
||||
"camang"
|
||||
}
|
||||
local debugdata2 = {
|
||||
"BodyAnimArmCopy",
|
||||
"TraceCount"
|
||||
}
|
||||
local debugoffset = {
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
local debuglist = {
|
||||
debugdata,
|
||||
debugdata2
|
||||
}
|
||||
|
||||
local debugdata = {"BodyAnim", "BodyAnimCycle", "BodyAnimString", "campos", "camang"}
|
||||
|
||||
local debugdata2 = {"BodyAnimArmCopy", "TraceCount"}
|
||||
|
||||
local debugoffset = {0, 0, 0}
|
||||
|
||||
local debuglist = {debugdata, debugdata2}
|
||||
|
||||
TraceLine_o = TraceLine_o or util.TraceLine
|
||||
local TraceLine_o = TraceLine_o
|
||||
local traces = {}
|
||||
|
|
|
@ -1,80 +1,5 @@
|
|||
valvebiped = {
|
||||
"ValveBiped.Bip01_Pelvis",
|
||||
"ValveBiped.Bip01_Spine",
|
||||
"ValveBiped.Bip01_Spine1",
|
||||
"ValveBiped.Bip01_Spine2",
|
||||
"ValveBiped.Bip01_Spine4",
|
||||
"ValveBiped.Bip01_Neck1",
|
||||
"ValveBiped.Bip01_Head1",
|
||||
"ValveBiped.forward",
|
||||
"ValveBiped.Bip01_R_Clavicle",
|
||||
"ValveBiped.Bip01_R_UpperArm",
|
||||
"ValveBiped.Bip01_R_Forearm",
|
||||
"ValveBiped.Bip01_R_Hand",
|
||||
"ValveBiped.Anim_Attachment_RH",
|
||||
"ValveBiped.Bip01_R_Finger4",
|
||||
"ValveBiped.Bip01_R_Finger41",
|
||||
"ValveBiped.Bip01_R_Finger42",
|
||||
"ValveBiped.Bip01_R_Finger3",
|
||||
"ValveBiped.Bip01_R_Finger31",
|
||||
"ValveBiped.Bip01_R_Finger32",
|
||||
"ValveBiped.Bip01_R_Finger2",
|
||||
"ValveBiped.Bip01_R_Finger21",
|
||||
"ValveBiped.Bip01_R_Finger22",
|
||||
"ValveBiped.Bip01_R_Finger1",
|
||||
"ValveBiped.Bip01_R_Finger11",
|
||||
"ValveBiped.Bip01_R_Finger12",
|
||||
"ValveBiped.Bip01_R_Finger0",
|
||||
"ValveBiped.Bip01_R_Finger01",
|
||||
"ValveBiped.Bip01_R_Finger02",
|
||||
"ValveBiped.Bip01_R_Ulna",
|
||||
"ValveBiped.Bip01_R_Wrist",
|
||||
"ValveBiped.Bip01_R_Elbow",
|
||||
"ValveBiped.Bip01_R_Bicep",
|
||||
"ValveBiped.Bip01_R_Shoulder",
|
||||
"ValveBiped.Bip01_R_Trapezius",
|
||||
"ValveBiped.Bip01_L_Clavicle",
|
||||
"ValveBiped.Bip01_L_UpperArm",
|
||||
"ValveBiped.Bip01_L_Forearm",
|
||||
"ValveBiped.Bip01_L_Hand",
|
||||
"ValveBiped.Anim_Attachment_LH",
|
||||
"ValveBiped.Bip01_L_Finger4",
|
||||
"ValveBiped.Bip01_L_Finger41",
|
||||
"ValveBiped.Bip01_L_Finger42",
|
||||
"ValveBiped.Bip01_L_Finger3",
|
||||
"ValveBiped.Bip01_L_Finger31",
|
||||
"ValveBiped.Bip01_L_Finger32",
|
||||
"ValveBiped.Bip01_L_Finger2",
|
||||
"ValveBiped.Bip01_L_Finger21",
|
||||
"ValveBiped.Bip01_L_Finger22",
|
||||
"ValveBiped.Bip01_L_Finger1",
|
||||
"ValveBiped.Bip01_L_Finger11",
|
||||
"ValveBiped.Bip01_L_Finger12",
|
||||
"ValveBiped.Bip01_L_Finger0",
|
||||
"ValveBiped.Bip01_L_Finger01",
|
||||
"ValveBiped.Bip01_L_Finger02",
|
||||
"ValveBiped.Bip01_L_Ulna",
|
||||
"ValveBiped.Bip01_L_Wrist",
|
||||
"ValveBiped.Bip01_L_Elbow",
|
||||
"ValveBiped.Bip01_L_Bicep",
|
||||
"ValveBiped.Bip01_L_Shoulder",
|
||||
"ValveBiped.Bip01_L_Trapezius",
|
||||
"ValveBiped.Bip01_R_Thigh",
|
||||
"ValveBiped.Bip01_R_Calf",
|
||||
"ValveBiped.Bip01_R_Foot",
|
||||
"ValveBiped.Bip01_R_Toe0",
|
||||
"ValveBiped.Bip01_L_Thigh",
|
||||
"ValveBiped.Bip01_L_Calf",
|
||||
"ValveBiped.Bip01_L_Foot",
|
||||
"ValveBiped.Bip01_L_Toe0",
|
||||
"ValveBiped.Bip01_L_Pectoral",
|
||||
"ValveBiped.Bip01_R_Pectoral",
|
||||
"ValveBiped.Cod",
|
||||
"j_ringpalm_L",
|
||||
"j_pinkypalm_L",
|
||||
"j_ringpalm_ri",
|
||||
"j_pinkypalm_ri"
|
||||
}
|
||||
valvebiped = {"ValveBiped.Bip01_Pelvis", "ValveBiped.Bip01_Spine", "ValveBiped.Bip01_Spine1", "ValveBiped.Bip01_Spine2", "ValveBiped.Bip01_Spine4", "ValveBiped.Bip01_Neck1", "ValveBiped.Bip01_Head1", "ValveBiped.forward", "ValveBiped.Bip01_R_Clavicle", "ValveBiped.Bip01_R_UpperArm", "ValveBiped.Bip01_R_Forearm", "ValveBiped.Bip01_R_Hand", "ValveBiped.Anim_Attachment_RH", "ValveBiped.Bip01_R_Finger4", "ValveBiped.Bip01_R_Finger41", "ValveBiped.Bip01_R_Finger42", "ValveBiped.Bip01_R_Finger3", "ValveBiped.Bip01_R_Finger31", "ValveBiped.Bip01_R_Finger32", "ValveBiped.Bip01_R_Finger2", "ValveBiped.Bip01_R_Finger21", "ValveBiped.Bip01_R_Finger22", "ValveBiped.Bip01_R_Finger1", "ValveBiped.Bip01_R_Finger11", "ValveBiped.Bip01_R_Finger12", "ValveBiped.Bip01_R_Finger0", "ValveBiped.Bip01_R_Finger01", "ValveBiped.Bip01_R_Finger02", "ValveBiped.Bip01_R_Ulna", "ValveBiped.Bip01_R_Wrist", "ValveBiped.Bip01_R_Elbow", "ValveBiped.Bip01_R_Bicep", "ValveBiped.Bip01_R_Shoulder", "ValveBiped.Bip01_R_Trapezius", "ValveBiped.Bip01_L_Clavicle", "ValveBiped.Bip01_L_UpperArm", "ValveBiped.Bip01_L_Forearm", "ValveBiped.Bip01_L_Hand", "ValveBiped.Anim_Attachment_LH", "ValveBiped.Bip01_L_Finger4", "ValveBiped.Bip01_L_Finger41", "ValveBiped.Bip01_L_Finger42", "ValveBiped.Bip01_L_Finger3", "ValveBiped.Bip01_L_Finger31", "ValveBiped.Bip01_L_Finger32", "ValveBiped.Bip01_L_Finger2", "ValveBiped.Bip01_L_Finger21", "ValveBiped.Bip01_L_Finger22", "ValveBiped.Bip01_L_Finger1", "ValveBiped.Bip01_L_Finger11", "ValveBiped.Bip01_L_Finger12", "ValveBiped.Bip01_L_Finger0", "ValveBiped.Bip01_L_Finger01", "ValveBiped.Bip01_L_Finger02", "ValveBiped.Bip01_L_Ulna", "ValveBiped.Bip01_L_Wrist", "ValveBiped.Bip01_L_Elbow", "ValveBiped.Bip01_L_Bicep", "ValveBiped.Bip01_L_Shoulder", "ValveBiped.Bip01_L_Trapezius", "ValveBiped.Bip01_R_Thigh", "ValveBiped.Bip01_R_Calf", "ValveBiped.Bip01_R_Foot", "ValveBiped.Bip01_R_Toe0", "ValveBiped.Bip01_L_Thigh", "ValveBiped.Bip01_L_Calf", "ValveBiped.Bip01_L_Foot", "ValveBiped.Bip01_L_Toe0", "ValveBiped.Bip01_L_Pectoral", "ValveBiped.Bip01_R_Pectoral", "ValveBiped.Cod", "j_ringpalm_L", "j_pinkypalm_L", "j_ringpalm_ri", "j_pinkypalm_ri"}
|
||||
|
||||
local scalevec = Vector(1, 1, 1)
|
||||
|
||||
local function Disarm_Render(self)
|
||||
|
|
|
@ -8,7 +8,6 @@ sound.Add({
|
|||
})
|
||||
|
||||
local zoom = Material("vgui/zoom.vtf")
|
||||
|
||||
local nextbeat = 0
|
||||
local beatvol = 0.3
|
||||
local blurpass = 0
|
||||
|
|
|
@ -6,17 +6,17 @@ local reticle = CreateClientConVar("Beatrun_HUDReticle", "1", true, false, "Disp
|
|||
local packetloss = Material("vgui/packetloss.png")
|
||||
local lastloss = 0
|
||||
local MELogo = Material("vgui/MELogo.png", "mips smooth")
|
||||
|
||||
local hide = {
|
||||
CHudBattery = true,
|
||||
CHudHealth = true,
|
||||
CHudDamageIndicator = true
|
||||
}
|
||||
|
||||
local inf = math.huge
|
||||
|
||||
hook.Add("HUDShouldDraw", "BeatrunHUDHide", function (name)
|
||||
if hide[name] then
|
||||
return false
|
||||
end
|
||||
hook.Add("HUDShouldDraw", "BeatrunHUDHide", function(name)
|
||||
if hide[name] then return false end
|
||||
end)
|
||||
|
||||
local color = 1
|
||||
|
@ -291,15 +291,13 @@ local function sortleaderboard(a, b)
|
|||
end
|
||||
|
||||
function BeatrunLeaderboard(forced)
|
||||
if not forced and Course_Name == "" and not GetGlobalBool(GM_INFECTION) and not GetGlobalBool(GM_DATATHEFT) then
|
||||
return
|
||||
end
|
||||
if not forced and Course_Name == "" and not GetGlobalBool(GM_INFECTION) and not GetGlobalBool(GM_DATATHEFT) then return end
|
||||
|
||||
local isinfection = GetGlobalBool(GM_INFECTION)
|
||||
local isdatatheft = GetGlobalBool(GM_DATATHEFT)
|
||||
local ply = LocalPlayer()
|
||||
local vp = ply:GetViewPunchAngles()
|
||||
local scrw = ScrW()
|
||||
-- local scrw = ScrW()
|
||||
local scrh = ScrH()
|
||||
|
||||
if not sway:GetBool() then
|
||||
|
@ -312,7 +310,6 @@ function BeatrunLeaderboard(forced)
|
|||
if allplytimer < CurTime() then
|
||||
allply = player.GetAll()
|
||||
allplytimer = CurTime() + 5
|
||||
|
||||
table.sort(allply, sortleaderboard)
|
||||
end
|
||||
|
||||
|
@ -320,7 +317,9 @@ function BeatrunLeaderboard(forced)
|
|||
|
||||
surface.SetDrawColor(20, 20, 20, math.max(150 - hidealpha, 50))
|
||||
surface.DrawRect(-20 + vp.z, scrh * 0.2 + vp.x, 40, SScaleY(30 * allplycount))
|
||||
|
||||
DrawBlurRect(20 + vp.z, scrh * 0.2 + vp.x, SScaleX(400), SScaleY(30 * allplycount), math.max(255 - hidealpha, 2))
|
||||
|
||||
surface.SetDrawColor(20, 20, 20, math.max(100 - hidealpha, 50))
|
||||
surface.DrawOutlinedRect(20 + vp.z, scrh * 0.2 + vp.x, SScaleX(400), SScaleY(30 * allplycount))
|
||||
surface.SetFont("BeatrunHUD")
|
||||
|
@ -331,13 +330,13 @@ function BeatrunLeaderboard(forced)
|
|||
for k, v in ipairs(allply) do
|
||||
if IsValid(v) then
|
||||
i = i + 1
|
||||
|
||||
local pbtimenum = v:GetNW2Float("PBTime")
|
||||
local pbtime = niltime
|
||||
|
||||
if isdatatheft then
|
||||
pbtimenum = v:GetNW2Int("DataBanked", 0)
|
||||
pbtime = pbtimenum
|
||||
|
||||
surface.SetTextColor(pbtimenum ~= 0 and placecolors[k] or color_white)
|
||||
else
|
||||
surface.SetTextColor(pbtimenum ~= 0 and placecolors[k] or color_white)
|
||||
|
@ -371,10 +370,9 @@ hook.Add("HUDPaint", "BeatrunLeaderboard", BeatrunLeaderboard)
|
|||
|
||||
local lastchatply = nil
|
||||
|
||||
hook.Add("OnPlayerChat", "BeatrunChatSound", function (ply, text, teamChat, isDead)
|
||||
hook.Add("OnPlayerChat", "BeatrunChatSound", function(ply, text, teamChat, isDead)
|
||||
if lastchatply ~= ply then
|
||||
LocalPlayer():EmitSound("friends/message.wav")
|
||||
|
||||
lastchatply = ply
|
||||
end
|
||||
end)
|
||||
|
@ -391,10 +389,8 @@ local pp = {
|
|||
["$pp_colour_mulr"] = 0
|
||||
}
|
||||
|
||||
hook.Add("RenderScreenspaceEffects", "FilterPP", function ()
|
||||
if render.GetDXLevel() < 90 then
|
||||
return
|
||||
end
|
||||
hook.Add("RenderScreenspaceEffects", "FilterPP", function()
|
||||
if render.GetDXLevel() < 90 then return end
|
||||
|
||||
if not blinded or not blindinverted then
|
||||
DrawColorModify(pp)
|
||||
|
@ -403,15 +399,13 @@ end)
|
|||
|
||||
local maxentries = SScaleX(375)
|
||||
speedrecord = {}
|
||||
local lastx = 0
|
||||
local lasty = 0
|
||||
-- local lastx = 0
|
||||
-- local lasty = 0
|
||||
local sgoffsetx = 0.75
|
||||
local sgoffsety = 0.75
|
||||
|
||||
local function DrawSpeedGraph()
|
||||
if not speedrecord or not LocalPlayer().InReplay then
|
||||
return
|
||||
end
|
||||
if not speedrecord or not LocalPlayer().InReplay then return end
|
||||
|
||||
local offsetx = ScrW() * sgoffsetx
|
||||
local offsety = ScrH() * sgoffsety
|
||||
|
@ -419,9 +413,11 @@ local function DrawSpeedGraph()
|
|||
local boxscaledy = SScaleY(200)
|
||||
|
||||
render.SetScissorRect(offsetx, offsety, offsetx + boxscaledx, offsety + boxscaledy, true)
|
||||
|
||||
surface.SetDrawColor(25, 25, 25, 100)
|
||||
surface.DrawRect(offsetx, offsety, boxscaledx, boxscaledy)
|
||||
surface.SetFont("DebugFixedSmall")
|
||||
|
||||
render.PushFilterMag(TEXFILTER.POINT)
|
||||
render.PushFilterMin(TEXFILTER.POINT)
|
||||
|
||||
|
@ -457,9 +453,7 @@ local smoothvel = true
|
|||
local lastvel = 0
|
||||
|
||||
local function RecordSpeedGraph()
|
||||
if not LocalPlayer().InReplay then
|
||||
return
|
||||
end
|
||||
if not LocalPlayer().InReplay then return end
|
||||
|
||||
local lenrecord = #speedrecord
|
||||
local vel = LocalPlayer():GetVelocity()
|
||||
|
@ -495,19 +489,15 @@ hook.Add("Tick", "SpeedGraph", RecordSpeedGraph)
|
|||
|
||||
local crosshair_unarmed = Material("vgui/hud/crosshair_unarmed")
|
||||
local crosshair_standard = Material("vgui/hud/crosshair_standard")
|
||||
local crosshair_weapon = Material("vgui/hud/crosshair_weapon")
|
||||
local crosshair_reaction = Material("vgui/hud/crosshair_reaction")
|
||||
-- local crosshair_weapon = Material("vgui/hud/crosshair_weapon")
|
||||
-- local crosshair_reaction = Material("vgui/hud/crosshair_reaction")
|
||||
|
||||
local function BeatrunReticle()
|
||||
if not reticle:GetBool() then
|
||||
return
|
||||
end
|
||||
if not reticle:GetBool() then return end
|
||||
|
||||
local wep = LocalPlayer():GetActiveWeapon()
|
||||
|
||||
if not IsValid(wep) or wep:GetClass() ~= "runnerhands" then
|
||||
return
|
||||
end
|
||||
if not IsValid(wep) or wep:GetClass() ~= "runnerhands" then return end
|
||||
|
||||
surface.SetDrawColor(255, 255, 255)
|
||||
surface.SetMaterial(crosshair_standard)
|
||||
|
|
|
@ -12,6 +12,7 @@ local animtable = {
|
|||
BodyLimitY = 180,
|
||||
usefullbody = 2
|
||||
}
|
||||
|
||||
fbanims = {
|
||||
ladderexittoplefthand = true,
|
||||
runfwdstart = true,
|
||||
|
@ -111,6 +112,7 @@ fbanims = {
|
|||
swingjumpoff = true,
|
||||
snatchscar = true
|
||||
}
|
||||
|
||||
local jumpanims = {
|
||||
jumpwrleft = true,
|
||||
jumpfast = true,
|
||||
|
@ -122,11 +124,13 @@ local jumpanims = {
|
|||
jumpcoil = true,
|
||||
jumpzipline = true
|
||||
}
|
||||
|
||||
local jumpanims2 = {
|
||||
jumpfast = true,
|
||||
jumpslow = true,
|
||||
jumpstill = true
|
||||
}
|
||||
|
||||
local runanims = {
|
||||
crouchfwd = true,
|
||||
crouchbwd = true,
|
||||
|
@ -138,6 +142,7 @@ local runanims = {
|
|||
sprintfwd = true,
|
||||
runbwd = true
|
||||
}
|
||||
|
||||
local events = {
|
||||
ladderenter = true,
|
||||
divestart = true,
|
||||
|
@ -199,6 +204,7 @@ local events = {
|
|||
meleeairstill = true,
|
||||
vaultontohigh = true
|
||||
}
|
||||
|
||||
local eventslut = {
|
||||
ladderenter = "ladderenterbottom",
|
||||
divestart = "divestart",
|
||||
|
@ -261,6 +267,7 @@ local eventslut = {
|
|||
meleeairstill = "meleeairstill",
|
||||
vaultontohigh = "vaultontohigh"
|
||||
}
|
||||
|
||||
local armfollowanims = {
|
||||
stand = true,
|
||||
diveslideidle = true,
|
||||
|
@ -270,6 +277,7 @@ local armfollowanims = {
|
|||
vaultoverhigh = true,
|
||||
walkfwd = true
|
||||
}
|
||||
|
||||
local armlock = {
|
||||
meleeairhit = true,
|
||||
bargein = true,
|
||||
|
@ -289,6 +297,7 @@ local armlock = {
|
|||
vaultontohigh = true,
|
||||
snatchscar = true
|
||||
}
|
||||
|
||||
local stillanims = {
|
||||
jumpturnlandstandgun = true,
|
||||
meslideloop = true,
|
||||
|
@ -305,12 +314,14 @@ local stillanims = {
|
|||
meleeslide = true,
|
||||
snatchscar = true
|
||||
}
|
||||
|
||||
local arminterrupts = {
|
||||
punchright = true,
|
||||
doorbash = true,
|
||||
punchmid = true,
|
||||
punchleft = true
|
||||
}
|
||||
|
||||
local transitionanims = {
|
||||
hanghardstart = "hang",
|
||||
divestart = "diveidle",
|
||||
|
@ -364,6 +375,7 @@ local transitionanims = {
|
|||
vaultontohigh = "runfwd",
|
||||
snatchscar = "stand"
|
||||
}
|
||||
|
||||
local nospinebend = {
|
||||
ladderclimbuplefthand = true,
|
||||
divestart = true,
|
||||
|
@ -397,6 +409,7 @@ local nospinebend = {
|
|||
vaultontohigh = true,
|
||||
snatchscar = true
|
||||
}
|
||||
|
||||
local worldarm = {
|
||||
ladderclimbuplefthand = true,
|
||||
ladderclimbuplefthandstill = true,
|
||||
|
@ -425,6 +438,7 @@ local worldarm = {
|
|||
ladderclimbhangstart = true,
|
||||
snatchscar = true
|
||||
}
|
||||
|
||||
local ignorezarm = {
|
||||
wallrunvertical = true,
|
||||
hangfoldedstart = true,
|
||||
|
@ -434,19 +448,23 @@ local ignorezarm = {
|
|||
diestandlong = true,
|
||||
vaultontohigh = true
|
||||
}
|
||||
|
||||
local nocyclereset = {
|
||||
jumpwrright = true,
|
||||
jumpwrleft = true,
|
||||
meslidestart = true
|
||||
}
|
||||
|
||||
local ignorebac = {
|
||||
evaderoll = true,
|
||||
meroll = true
|
||||
}
|
||||
|
||||
local customspeed = {
|
||||
vaultonto = 1.15,
|
||||
vaultontohigh = 1
|
||||
}
|
||||
|
||||
local vaultoverhighcam1 = Vector(0, 0, -7.5)
|
||||
local vaultoverhighcam2 = Vector(0, 0, 0)
|
||||
local vaultoverhigharm1 = Vector(4, -4, 13.5)
|
||||
|
@ -457,6 +475,7 @@ local vaultontohigharm1 = Vector(5, -10, 3.5)
|
|||
local vaultontohigharm2 = Vector(10, 0, 0)
|
||||
local snatchscarcam1 = Vector(0, 0, 0)
|
||||
local snatchscarcam2 = Vector(10, 0, 5)
|
||||
|
||||
local customarmoffset = {
|
||||
meslidestart = Vector(2, 5, 9.5),
|
||||
meslideloop = Vector(2, 5, 9.5),
|
||||
|
@ -490,6 +509,7 @@ local customarmoffset = {
|
|||
stand = Vector(10, 0, -10),
|
||||
walktostandleft = Vector(10, 0, -10)
|
||||
}
|
||||
|
||||
local customcamoffset = {
|
||||
jumpturnfly = Vector(0, 0, 7.5),
|
||||
jumpturnflyidle = Vector(0, 0, 7.5),
|
||||
|
@ -510,25 +530,22 @@ local customcamoffset = {
|
|||
crouchfwd = Vector(10, 0, -17.5),
|
||||
crouchbwd = Vector(20, 0, -10)
|
||||
}
|
||||
|
||||
local transitionchecks = {
|
||||
meleeairstill = function (ply)
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() then
|
||||
return true
|
||||
end
|
||||
meleeairstill = function(ply)
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() then return true end
|
||||
end,
|
||||
swingjumpoff = function (ply)
|
||||
swingjumpoff = function(ply)
|
||||
if BodyAnimCycle >= 0.15 or ply:OnGround() then
|
||||
BodyAnimCycle = 0
|
||||
|
||||
return true
|
||||
end
|
||||
end,
|
||||
jumpcoilend = function (ply)
|
||||
if ply:GetVelocity():Length() < 10 and BodyAnimCycle > 0.5 or BodyAnimCycle > 0.9 then
|
||||
return true
|
||||
end
|
||||
jumpcoilend = function(ply)
|
||||
if ply:GetVelocity():Length() < 10 and BodyAnimCycle > 0.5 or BodyAnimCycle > 0.9 then return true end
|
||||
end,
|
||||
vaultover = function (ply)
|
||||
vaultover = function(ply)
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() and ply:GetMantle() == 0 then
|
||||
BodyLimitX = 90
|
||||
BodyLimitY = 180
|
||||
|
@ -536,7 +553,7 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
vaultkong = function (ply)
|
||||
vaultkong = function(ply)
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() and ply:GetMantle() == 0 then
|
||||
BodyLimitX = 90
|
||||
BodyLimitY = 180
|
||||
|
@ -544,7 +561,7 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
vaultoverhigh = function (ply)
|
||||
vaultoverhigh = function(ply)
|
||||
if BodyAnimCycle < 0.45 then
|
||||
customarmoffset.vaultoverhigh = vaultoverhigharm1
|
||||
customcamoffset.vaultoverhigh = vaultoverhighcam1
|
||||
|
@ -563,7 +580,7 @@ local transitionchecks = {
|
|||
BodyLimitY = 40
|
||||
end
|
||||
end,
|
||||
vaultontohigh = function (ply)
|
||||
vaultontohigh = function(ply)
|
||||
if BodyAnimCycle < 0.45 then
|
||||
customarmoffset.vaultontohigh = vaultontohigharm1
|
||||
else
|
||||
|
@ -596,29 +613,25 @@ local transitionchecks = {
|
|||
BodyAnim:SetAngles(eyeang)
|
||||
end
|
||||
end,
|
||||
zipline = function (ply)
|
||||
zipline = function(ply)
|
||||
if not IsValid(ply:GetZipline()) then
|
||||
BodyAnimCycle = 0
|
||||
|
||||
return true
|
||||
end
|
||||
end,
|
||||
jumpzipline = function (ply)
|
||||
jumpzipline = function(ply)
|
||||
lockang = false
|
||||
BodyLimitX = 90
|
||||
BodyLimitY = 180
|
||||
end,
|
||||
stepuprightleg = function (ply)
|
||||
if BodyAnimCycle >= 1 then
|
||||
return true
|
||||
end
|
||||
stepuprightleg = function(ply)
|
||||
if BodyAnimCycle >= 1 then return true end
|
||||
end,
|
||||
springboardleftleg = function (ply)
|
||||
if BodyAnimCycle >= 0.75 or ply:OnGround() then
|
||||
return true
|
||||
end
|
||||
springboardleftleg = function(ply)
|
||||
if BodyAnimCycle >= 0.75 or ply:OnGround() then return true end
|
||||
end,
|
||||
jumpturnlandstand = function (ply)
|
||||
jumpturnlandstand = function(ply)
|
||||
if BodyAnimCycle >= 0.85 then
|
||||
BodyLimitX = 90
|
||||
BodyLimitY = 180
|
||||
|
@ -626,7 +639,7 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
jumpturnlandstandgun = function (ply)
|
||||
jumpturnlandstandgun = function(ply)
|
||||
if BodyAnimCycle >= 0.85 then
|
||||
BodyLimitX = 90
|
||||
BodyLimitY = 180
|
||||
|
@ -634,73 +647,57 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
fallinguncontrolled = function (ply)
|
||||
if not ply.FallStatic then
|
||||
return true
|
||||
end
|
||||
fallinguncontrolled = function(ply)
|
||||
if not ply.FallStatic then return true end
|
||||
end,
|
||||
ladderclimbuplefthand = function (ply)
|
||||
if BodyAnimCycle >= 0.75 then
|
||||
return true
|
||||
end
|
||||
ladderclimbuplefthand = function(ply)
|
||||
if BodyAnimCycle >= 0.75 then return true end
|
||||
end,
|
||||
ladderclimbuprighthand = function (ply)
|
||||
if BodyAnimCycle >= 0.75 then
|
||||
return true
|
||||
end
|
||||
ladderclimbuprighthand = function(ply)
|
||||
if BodyAnimCycle >= 0.75 then return true end
|
||||
end,
|
||||
ladderenterbottom = function (ply)
|
||||
if BodyAnimCycle >= 0.35 then
|
||||
return true
|
||||
end
|
||||
ladderenterbottom = function(ply)
|
||||
if BodyAnimCycle >= 0.35 then return true end
|
||||
end,
|
||||
ladderexittoplefthand = function (ply)
|
||||
ladderexittoplefthand = function(ply)
|
||||
if BodyAnimCycle < 0.25 then
|
||||
customarmoffset.ladderexittoplefthand = ladderexitarm1
|
||||
else
|
||||
customarmoffset.ladderexittoplefthand = ladderexitarm2
|
||||
end
|
||||
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() then
|
||||
return true
|
||||
end
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() then return true end
|
||||
end,
|
||||
ladderexittoprighthand = function (ply)
|
||||
ladderexittoprighthand = function(ply)
|
||||
if BodyAnimCycle < 0.25 then
|
||||
customarmoffset.ladderexittoprighthand = ladderexitarm1
|
||||
else
|
||||
customarmoffset.ladderexittoprighthand = ladderexitarm2
|
||||
end
|
||||
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() then
|
||||
return true
|
||||
end
|
||||
if BodyAnimCycle >= 1 or ply:OnGround() then return true end
|
||||
end,
|
||||
wallrunverticalturn = function (ply)
|
||||
if ply:GetWallrun() ~= 4 then
|
||||
return true
|
||||
end
|
||||
wallrunverticalturn = function(ply)
|
||||
if ply:GetWallrun() ~= 4 then return true end
|
||||
end,
|
||||
hangfoldedheaveup = function (ply)
|
||||
if BodyAnimCycle >= 0.65 then
|
||||
return true
|
||||
end
|
||||
hangfoldedheaveup = function(ply)
|
||||
if BodyAnimCycle >= 0.65 then return true end
|
||||
end,
|
||||
hanghardstart = function (ply)
|
||||
hanghardstart = function(ply)
|
||||
if BodyAnimCycle >= 1 then
|
||||
ply.hangyaw = 0
|
||||
|
||||
return true
|
||||
end
|
||||
end,
|
||||
hanghardstart2 = function (ply)
|
||||
hanghardstart2 = function(ply)
|
||||
if BodyAnimCycle >= 0.75 then
|
||||
ply.hangyaw = 0
|
||||
|
||||
return true
|
||||
end
|
||||
end,
|
||||
snatchscar = function (ply)
|
||||
snatchscar = function(ply)
|
||||
lockang = true
|
||||
|
||||
if BodyAnimCycle < 0.35 or BodyAnimCycle > 0.8 then
|
||||
|
@ -715,7 +712,7 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
snatchsniper = function (ply)
|
||||
snatchsniper = function(ply)
|
||||
lockang = true
|
||||
|
||||
if BodyAnimCycle >= 1 then
|
||||
|
@ -724,12 +721,10 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
ziplinestart = function (ply)
|
||||
if BodyAnimCycle >= 0.75 then
|
||||
return true
|
||||
end
|
||||
ziplinestart = function(ply)
|
||||
if BodyAnimCycle >= 0.75 then return true end
|
||||
end,
|
||||
walkbalancefalloffleft = function (ply)
|
||||
walkbalancefalloffleft = function(ply)
|
||||
lockang = true
|
||||
|
||||
if BodyAnimCycle >= 1 then
|
||||
|
@ -738,7 +733,7 @@ local transitionchecks = {
|
|||
return true
|
||||
end
|
||||
end,
|
||||
walkbalancefalloffright = function (ply)
|
||||
walkbalancefalloffright = function(ply)
|
||||
lockang = true
|
||||
|
||||
if BodyAnimCycle >= 1 then
|
||||
|
@ -748,14 +743,13 @@ local transitionchecks = {
|
|||
end
|
||||
end
|
||||
}
|
||||
|
||||
fbfunctions = {
|
||||
vaultontohigh = function (ply)
|
||||
return true
|
||||
end,
|
||||
swingstraight = function (ply)
|
||||
vaultontohigh = function(ply) return true end,
|
||||
swingstraight = function(ply)
|
||||
BodyAnim:SetPoseParameter("swing", (ply:GetSBOffset() / 45 - 1) * 100)
|
||||
end,
|
||||
ziplinestart = function (ply)
|
||||
ziplinestart = function(ply)
|
||||
if IsValid(ply:GetZipline()) then
|
||||
lockang = true
|
||||
CamIgnoreAng = false
|
||||
|
@ -768,7 +762,7 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
zipline = function (ply)
|
||||
zipline = function(ply)
|
||||
lockang = true
|
||||
CamIgnoreAng = false
|
||||
BodyLimitX = 30
|
||||
|
@ -779,7 +773,7 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
hang = function (ply)
|
||||
hang = function(ply)
|
||||
CamIgnoreAng = false
|
||||
local ang = ply.OrigEyeAng
|
||||
local eyeang = ply:EyeAngles()
|
||||
|
@ -792,6 +786,7 @@ fbfunctions = {
|
|||
mul = math.Clamp(mul, 0.4, 1)
|
||||
BodyLimitX = 80 * mul
|
||||
BodyLimitY = 175
|
||||
|
||||
local a = math.Clamp(math.AngleDifference(ang.y, eyeang.y), -179, 179)
|
||||
|
||||
if not ply.hangyaw then
|
||||
|
@ -817,23 +812,22 @@ fbfunctions = {
|
|||
|
||||
if BodyLimitX <= eyeangx then
|
||||
eyeang.x = BodyLimitX - 0.1
|
||||
|
||||
ply:SetEyeAngles(eyeang)
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
hangstrafeleft = function (ply)
|
||||
hangstrafeleft = function(ply)
|
||||
BodyLimitY = 40
|
||||
|
||||
return true
|
||||
end,
|
||||
hangstraferight = function (ply)
|
||||
hangstraferight = function(ply)
|
||||
BodyLimitY = 40
|
||||
|
||||
return true
|
||||
end,
|
||||
hanghardstartvertical = function (ply)
|
||||
hanghardstartvertical = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 120
|
||||
local ang = ply.OrigEyeAng
|
||||
|
@ -842,7 +836,7 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
hanghardstart = function (ply)
|
||||
hanghardstart = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 120
|
||||
local ang = ply.OrigEyeAng
|
||||
|
@ -851,7 +845,7 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
hanghardstart2 = function (ply)
|
||||
hanghardstart2 = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 120
|
||||
local ang = ply.OrigEyeAng
|
||||
|
@ -860,7 +854,7 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
hangheaveup = function (ply)
|
||||
hangheaveup = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 90
|
||||
local ang = ply.OrigEyeAng
|
||||
|
@ -869,7 +863,7 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
hangfoldedstart = function (ply)
|
||||
hangfoldedstart = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 90
|
||||
local ang = ply.OrigEyeAng
|
||||
|
@ -878,18 +872,17 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
hangfoldedendhang = function (ply)
|
||||
hangfoldedendhang = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 90
|
||||
local ang = ply.OrigEyeAng
|
||||
|
||||
BodyAnim:SetAngles(ang)
|
||||
|
||||
ply.hangyaw = 0
|
||||
|
||||
return true
|
||||
end,
|
||||
hangfoldedheaveup = function (ply)
|
||||
hangfoldedheaveup = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 90
|
||||
local ang = ply.OrigEyeAng
|
||||
|
@ -898,41 +891,25 @@ fbfunctions = {
|
|||
|
||||
return true
|
||||
end,
|
||||
dodgejumpleft = function (ply)
|
||||
dodgejumpleft = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 180
|
||||
end,
|
||||
dodgejumpright = function (ply)
|
||||
dodgejumpright = function(ply)
|
||||
BodyLimitX = 30
|
||||
BodyLimitY = 180
|
||||
end,
|
||||
ladderclimbdownfast = function (ply)
|
||||
ladderclimbdownfast = function(ply)
|
||||
lockang = true
|
||||
end
|
||||
}
|
||||
|
||||
local defaultcamoffset = Vector()
|
||||
local playermodelbones = {
|
||||
"ValveBiped.Bip01_L_UpperArm",
|
||||
"ValveBiped.Bip01_R_UpperArm"
|
||||
}
|
||||
local fingers = {
|
||||
"ValveBiped.Bip01_L_Finger4",
|
||||
"ValveBiped.Bip01_L_Finger41",
|
||||
"ValveBiped.Bip01_L_Finger3",
|
||||
"ValveBiped.Bip01_L_Finger31",
|
||||
"ValveBiped.Bip01_L_Finger2",
|
||||
"ValveBiped.Bip01_L_Finger21",
|
||||
"ValveBiped.Bip01_L_Finger1",
|
||||
"ValveBiped.Bip01_L_Finger11",
|
||||
"ValveBiped.Bip01_R_Finger4",
|
||||
"ValveBiped.Bip01_R_Finger41",
|
||||
"ValveBiped.Bip01_R_Finger3",
|
||||
"ValveBiped.Bip01_R_Finger31",
|
||||
"ValveBiped.Bip01_R_Finger2",
|
||||
"ValveBiped.Bip01_R_Finger21",
|
||||
"ValveBiped.Bip01_R_Finger1",
|
||||
"ValveBiped.Bip01_R_Finger11"
|
||||
}
|
||||
|
||||
local playermodelbones = {"ValveBiped.Bip01_L_UpperArm", "ValveBiped.Bip01_R_UpperArm"}
|
||||
|
||||
local fingers = {"ValveBiped.Bip01_L_Finger4", "ValveBiped.Bip01_L_Finger41", "ValveBiped.Bip01_L_Finger3", "ValveBiped.Bip01_L_Finger31", "ValveBiped.Bip01_L_Finger2", "ValveBiped.Bip01_L_Finger21", "ValveBiped.Bip01_L_Finger1", "ValveBiped.Bip01_L_Finger11", "ValveBiped.Bip01_R_Finger4", "ValveBiped.Bip01_R_Finger41", "ValveBiped.Bip01_R_Finger3", "ValveBiped.Bip01_R_Finger31", "ValveBiped.Bip01_R_Finger2", "ValveBiped.Bip01_R_Finger21", "ValveBiped.Bip01_R_Finger1", "ValveBiped.Bip01_R_Finger11"}
|
||||
|
||||
local fingerscustom = {
|
||||
["ValveBiped.Bip01_L_Finger4"] = Angle(-10, 10, 0),
|
||||
["ValveBiped.Bip01_L_Finger3"] = Angle(-10, 20, 0),
|
||||
|
@ -942,6 +919,7 @@ local fingerscustom = {
|
|||
["ValveBiped.Bip01_R_Finger3"] = Angle(20, 20, 0),
|
||||
["ValveBiped.Bip01_R_Finger2"] = Angle(10, 20, 0)
|
||||
}
|
||||
|
||||
eventsounds = {
|
||||
hangfoldedendhang = {
|
||||
[0.42] = "Handsteps.ConcreteHard",
|
||||
|
@ -1024,6 +1002,7 @@ eventsounds = {
|
|||
[0.3] = "me_body_roll.wav"
|
||||
}
|
||||
}
|
||||
|
||||
local CharaName = "Faith"
|
||||
local CharaLen = #CharaName
|
||||
|
||||
|
@ -1042,7 +1021,7 @@ local function BodyEventSounds(anim)
|
|||
func = ply.EmitSound
|
||||
end
|
||||
|
||||
timer.Simple(k, function ()
|
||||
timer.Simple(k, function()
|
||||
func(ply, v)
|
||||
end)
|
||||
end
|
||||
|
@ -1052,9 +1031,9 @@ end
|
|||
camint = 1
|
||||
campos = Vector()
|
||||
camang = Angle()
|
||||
local customoffset = Vector()
|
||||
-- local customoffset = Vector()
|
||||
-- local movedback = false
|
||||
local customoffsetlerp = Vector()
|
||||
local movedback = false
|
||||
|
||||
local function JumpCalcView(view)
|
||||
if not fbanims[BodyAnimString] then
|
||||
|
@ -1067,13 +1046,13 @@ local function JumpCalcView(view)
|
|||
end
|
||||
end
|
||||
|
||||
local eyepos = LocalPlayer():EyePos()
|
||||
local vieworigin = view.origin
|
||||
-- local eyepos = LocalPlayer():EyePos()
|
||||
-- local vieworigin = view.origin
|
||||
|
||||
BodyAnim:SetupBones()
|
||||
|
||||
local m = BodyAnim:GetBoneMatrix(68)
|
||||
local pos, ang = nil
|
||||
local ang = nil -- local pos, ang = nil
|
||||
|
||||
if m then
|
||||
ang = m:GetAngles()
|
||||
|
@ -1134,7 +1113,7 @@ local function CreateBodyAnimArmCopy()
|
|||
return BodyAnimArmCopy
|
||||
end
|
||||
|
||||
hook.Add("BodyAnimRemove", "BodyAnimArmRemove", function ()
|
||||
hook.Add("BodyAnimRemove", "BodyAnimArmRemove", function()
|
||||
if IsValid(BodyAnimArmCopy) then
|
||||
BodyAnimArmCopy:Remove()
|
||||
end
|
||||
|
@ -1143,9 +1122,7 @@ end)
|
|||
local function JumpArmThink()
|
||||
local bac = CreateBodyAnimArmCopy()
|
||||
|
||||
if IsValid(bac) then
|
||||
return true
|
||||
end
|
||||
if IsValid(bac) then return true end
|
||||
end
|
||||
|
||||
function ArmInterrupting(bac)
|
||||
|
@ -1155,7 +1132,7 @@ end
|
|||
local defaultarmoffset = Vector()
|
||||
local armoffset = Vector()
|
||||
local armoffsetlerp = Vector()
|
||||
local drawnorigin = false
|
||||
-- local drawnorigin = false
|
||||
local drawnskytime = 0
|
||||
|
||||
local function JumpArmDraw(a, b, c)
|
||||
|
@ -1174,26 +1151,22 @@ local function JumpArmDraw(a, b, c)
|
|||
|
||||
cam.IgnoreZ(true)
|
||||
|
||||
local camposoff = campos - ply:EyePos()
|
||||
-- local camposoff = campos - ply:EyePos()
|
||||
local attachId = bac:LookupAttachment("eyes")
|
||||
local offset = bac:GetAttachment(attachId)
|
||||
|
||||
if not offset then
|
||||
return
|
||||
end
|
||||
if not offset then return end
|
||||
|
||||
local arminterrupting = ArmInterrupting(bac)
|
||||
local arminterruptboost = arminterrupting and 4 or 1
|
||||
armoffsetlerp = LerpVector(math.min(10 * FrameTime() * arminterruptboost, 1), armoffsetlerp, not arminterrupting and customarmoffset[BodyAnimString] or defaultarmoffset)
|
||||
|
||||
armoffsetlerp = LerpVector(math.min(10 * FrameTime() * arminterruptboost, 1), armoffsetlerp, not arminterrupting and customarmoffset[BodyAnimString] or defaultarmoffset)
|
||||
armoffset:Set(armoffsetlerp)
|
||||
|
||||
local pos = offset.Pos
|
||||
local ang = offset.Ang
|
||||
|
||||
if not IsValid(BodyAnimMDLarm) then
|
||||
return
|
||||
end
|
||||
if not IsValid(BodyAnimMDLarm) then return end
|
||||
|
||||
BodyAnimMDLarm:SetNoDraw(true)
|
||||
bac:SetParent(nil)
|
||||
|
@ -1236,9 +1209,11 @@ local function JumpArmDraw(a, b, c)
|
|||
if not worldarm[BodyAnimString] then
|
||||
cam.Start3D(pos, ang)
|
||||
cam.IgnoreZ(ignorezarm[BodyAnimString] or false)
|
||||
|
||||
BodyAnimMDLarm:SetPos(pos)
|
||||
bac:SetupBones()
|
||||
BodyAnimMDLarm:DrawModel()
|
||||
|
||||
cam.End3D()
|
||||
else
|
||||
local armoff = LocalToWorld(armoffset, angle_zero, vector_origin, BodyAnim:GetAngles())
|
||||
|
@ -1247,6 +1222,7 @@ local function JumpArmDraw(a, b, c)
|
|||
bac:SetAngles(BodyAnim:GetAngles())
|
||||
bac:SetPos(BodyAnim:GetPos() + armoff)
|
||||
bac:SetRenderOrigin(nil)
|
||||
|
||||
BodyAnimMDLarm:SetPos(BodyAnim:GetPos() + armoff)
|
||||
bac:SetupBones()
|
||||
BodyAnimMDLarm:DrawModel()
|
||||
|
@ -1295,15 +1271,17 @@ local function JumpArmDraw(a, b, c)
|
|||
end
|
||||
end
|
||||
|
||||
hook.Add("PreRender", "JumpArmOriginVar", function ()
|
||||
hook.Add("PreRender", "JumpArmOriginVar", function()
|
||||
drawnorigin = false
|
||||
end)
|
||||
hook.Add("PostDrawSkyBox", "JumpArm3DSky", function ()
|
||||
|
||||
hook.Add("PostDrawSkyBox", "JumpArm3DSky", function()
|
||||
skybox3d = true
|
||||
|
||||
hook.Remove("PostDrawSkyBox", "JumpArm3DSky")
|
||||
end)
|
||||
hook.Add("CalcViewModelView", "lol", function (wep, vm, oldpos, oldang, pos, ang)
|
||||
|
||||
hook.Add("CalcViewModelView", "lol", function(wep, vm, oldpos, oldang, pos, ang)
|
||||
pos:Sub(oldpos)
|
||||
pos:Add(campos)
|
||||
ang:Sub(oldang)
|
||||
|
@ -1317,6 +1295,7 @@ hook.Add("CalcViewModelView", "lol", function (wep, vm, oldpos, oldang, pos, ang
|
|||
|
||||
pos:Add(cpos)
|
||||
ang:Add(cang)
|
||||
|
||||
wep.m_ViewModel:SetRenderOrigin(pos)
|
||||
wep.m_ViewModel:SetAngles(ang)
|
||||
end
|
||||
|
@ -1357,9 +1336,7 @@ local function JumpAnim(event, ply)
|
|||
if not wasjumpanim then
|
||||
StartBodyAnim(animtable)
|
||||
|
||||
if not IsValid(BodyAnim) then
|
||||
return
|
||||
end
|
||||
if not IsValid(BodyAnim) then return end
|
||||
|
||||
CreateBodyAnimArmCopy()
|
||||
|
||||
|
@ -1413,7 +1390,7 @@ end
|
|||
|
||||
local lastwr = 0
|
||||
|
||||
hook.Add("Think", "FBAnimHandler", function ()
|
||||
hook.Add("Think", "FBAnimHandler", function()
|
||||
local ply = LocalPlayer()
|
||||
|
||||
if not IsValid(BodyAnim) and ply:Alive() then
|
||||
|
@ -1456,13 +1433,14 @@ local function JumpThink()
|
|||
|
||||
if jumpanims[BodyAnimString] and (ply:OnGround() or ply:GetWallrun() ~= 0 or ply:GetMantle() ~= 0) then
|
||||
BodyAnim:SetSequence(BodyAnim:LookupSequence("runfwd"))
|
||||
|
||||
BodyAnimCycle = 0
|
||||
end
|
||||
|
||||
local ang = ply:EyeAngles()
|
||||
ang[1] = 0
|
||||
|
||||
animtr.start = ply:GetPos()
|
||||
|
||||
local angold = ang
|
||||
local lerpspeed = 10
|
||||
local vel = LocalPlayer():GetVelocity()
|
||||
|
@ -1692,9 +1670,7 @@ local function JumpThink()
|
|||
local func = fbfunctions[BodyAnimString]
|
||||
func = func and func(ply)
|
||||
|
||||
if func == true then
|
||||
return
|
||||
end
|
||||
if func == true then return end
|
||||
|
||||
if ply:GetMantle() == 4 then
|
||||
BodyAnim:SetSequence("vaultoverhigh")
|
||||
|
@ -1734,7 +1710,8 @@ local function JumpThink()
|
|||
|
||||
BodyAnim:SetSequence(BodyAnim:LookupSequence("walktostandleft"))
|
||||
ply:EmitSound("Release." .. stepmat)
|
||||
timer.Simple(0.15, function ()
|
||||
|
||||
timer.Simple(0.15, function()
|
||||
ply:EmitSound("Footsteps." .. stepmat)
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -2,6 +2,7 @@ local coursepanel = {
|
|||
w = 1200,
|
||||
h = 650
|
||||
}
|
||||
|
||||
coursepanel.x = 960 - coursepanel.w * 0.5
|
||||
coursepanel.y = 540 - coursepanel.h * 0.5
|
||||
coursepanel.bgcolor = Color(32, 32, 32)
|
||||
|
@ -27,6 +28,7 @@ AEUI:AddButton(coursepanel, " X ", closebutton, "AEUILarge", coursepanel.w - 4
|
|||
|
||||
local stopbutton = AEUI:AddButton(coursepanel, "Return to Freeplay", stopbutton, "AEUILarge", coursepanel.w - 295, coursepanel.h - 50)
|
||||
stopbutton.greyed = sacheck
|
||||
|
||||
local courselist = {
|
||||
w = 800,
|
||||
h = 450,
|
||||
|
@ -68,8 +70,9 @@ function OpenCourseMenu(ply)
|
|||
end
|
||||
end
|
||||
|
||||
hook.Add("InitPostEntity", "CourseMenuCommand", function ()
|
||||
hook.Add("InitPostEntity", "CourseMenuCommand", function()
|
||||
concommand.Add("Beatrun_CourseMenu", OpenCourseMenu)
|
||||
hook.Remove("InitPostEntity", "CourseMenuCommand")
|
||||
end)
|
||||
|
||||
concommand.Add("Beatrun_CourseMenu", OpenCourseMenu)
|
|
@ -1,13 +1,8 @@
|
|||
local enemy = Color(255, 0, 0)
|
||||
|
||||
local function HideNearby(ply)
|
||||
if ply == LocalPlayer() then
|
||||
return
|
||||
end
|
||||
|
||||
if GetGlobalBool(GM_DATATHEFT) then
|
||||
return
|
||||
end
|
||||
if ply == LocalPlayer() then return end
|
||||
if GetGlobalBool(GM_DATATHEFT) then return end
|
||||
|
||||
ply.distfromlocal = LocalPlayer():GetPos():Distance(ply:GetPos())
|
||||
local Distance = ply.distfromlocal or 40000
|
||||
|
@ -59,6 +54,7 @@ local function HideNearby(ply)
|
|||
|
||||
ang:RotateAroundAxis(ang:Forward(), 90)
|
||||
ang:RotateAroundAxis(ang:Right(), 90)
|
||||
|
||||
cam.Start3D2D(pos, Angle(0, ang.y, 90), math.max(2.5 * Distance / 2000, 0.5))
|
||||
cam.IgnoreZ(true)
|
||||
draw.DrawText(ply:Nick(), "BeatrunHUD", 2, 2, color, TEXT_ALIGN_CENTER)
|
||||
|
|
|
@ -1,28 +1,25 @@
|
|||
local apikey = CreateConVar("beatrun_apikey", "0", true, {
|
||||
FCVAR_ARCHIVE,
|
||||
FCVAR_UNLOGGED
|
||||
})
|
||||
local apikey = CreateConVar("beatrun_apikey", "0", true, {FCVAR_ARCHIVE, FCVAR_UNLOGGED})
|
||||
|
||||
function UploadCourse()
|
||||
if Course_Name == "" or Course_ID == "" then
|
||||
print("Can't upload in Freeplay")
|
||||
|
||||
return
|
||||
end
|
||||
if Course_Name == "" or Course_ID == "" then return print("Can't upload in Freeplay") end
|
||||
|
||||
local file = file.Open("beatrun/courses/" .. game.GetMap() .. "/" .. Course_ID .. ".txt", "rb", "DATA")
|
||||
local filedata = util.Decompress(file:Read(file:Size()))
|
||||
|
||||
local function h_success(code, body, headers)
|
||||
print("YOUR SHARE CODE: ", code)
|
||||
print("Successfully uploaded course: ", body)
|
||||
end
|
||||
|
||||
local function h_failed(reason)
|
||||
print("HTTP failed: ", reason)
|
||||
end
|
||||
|
||||
local function h_success(code, body, headers)
|
||||
print(body)
|
||||
end
|
||||
|
||||
local h_method = "POST"
|
||||
local h_url = "https://datae.org/beatrun/upload.php"
|
||||
local h_url = "https://example.org/beatrun/upload.php"
|
||||
local h_type = "text/plain"
|
||||
local h_body = filedata
|
||||
|
||||
local h_headers = {
|
||||
["Content-Type"] = "text/plain",
|
||||
["Content-Length"] = filedata:len(),
|
||||
|
@ -31,8 +28,6 @@ function UploadCourse()
|
|||
Authorization = apikey:GetString(),
|
||||
["Game-Map"] = game.GetMap()
|
||||
}
|
||||
local h_type = "text/plain"
|
||||
local h_body = filedata
|
||||
|
||||
HTTP({
|
||||
failed = h_failed,
|
||||
|
@ -49,13 +44,13 @@ concommand.Add("Beatrun_UploadCourse", UploadCourse)
|
|||
|
||||
local GetCourse_Errors = {
|
||||
["Bad map"] = "Error: You are not playing on the map this course was intended for.",
|
||||
["Not member"] = "Membership error. For more info, login at datae.org/beatrun",
|
||||
["Invalid API Key"] = "Plese message me for a key.",
|
||||
["Bad code"] = "Error: The share code provided is invalid.",
|
||||
["Not valid key"] = "Error: The API key used is not valid."
|
||||
}
|
||||
|
||||
function GetCourse(sharecode)
|
||||
http.Fetch("https://datae.org/beatrun/getcourse.php?sharecode=" .. sharecode .. "&map=" .. game.GetMap() .. "&key=" .. apikey:GetString(), function (body, length, headers, code)
|
||||
http.Fetch("https://example/beatrun/getcourse.php?sharecode=" .. sharecode .. "&map=" .. game.GetMap() .. "&key=" .. apikey:GetString(), function(body, length, headers, code)
|
||||
local errorcode = GetCourse_Errors[body]
|
||||
|
||||
if not errorcode then
|
||||
|
@ -69,15 +64,17 @@ function GetCourse(sharecode)
|
|||
|
||||
return false
|
||||
end
|
||||
end, function (message)
|
||||
end,
|
||||
function(message)
|
||||
print("An error occurred.", message)
|
||||
|
||||
return false
|
||||
end, {
|
||||
end,
|
||||
{
|
||||
["accept-encoding"] = "gzip, deflate"
|
||||
})
|
||||
end
|
||||
|
||||
concommand.Add("Beatrun_LoadCode", function (ply, cmd, args, argstr)
|
||||
concommand.Add("Beatrun_LoadCode", function(ply, cmd, args, argstr)
|
||||
GetCourse(args[1])
|
||||
end)
|
|
@ -1,8 +1,10 @@
|
|||
local checktimer = 0
|
||||
-- local checktimer = 0
|
||||
local errorc = Color(255, 25, 25)
|
||||
|
||||
local whitelist = {
|
||||
c_ladderanim = true
|
||||
}
|
||||
|
||||
local whitelistanims = fbanims
|
||||
|
||||
local function BodyAnimAntiStuck()
|
||||
|
|
|
@ -1,26 +1,15 @@
|
|||
if not system.IsWindows() or not file.Exists("lua/bin/gmcl_steamfriends_win64.dll", "GAME") then
|
||||
return
|
||||
end
|
||||
|
||||
if not system.IsWindows() or not file.Exists("lua/bin/gmcl_steamfriends_win64.dll", "GAME") then return end
|
||||
local richtext = ""
|
||||
local nextupdate = 0
|
||||
|
||||
local function UpdateRichPresence()
|
||||
if CurTime() < nextupdate then
|
||||
return
|
||||
end
|
||||
if CurTime() < nextupdate then return end
|
||||
|
||||
local rp = steamworks.SetRichPresence
|
||||
|
||||
if not rp then
|
||||
return
|
||||
end
|
||||
if not rp then return end
|
||||
|
||||
local ply = LocalPlayer()
|
||||
|
||||
if not ply.GetLevel then
|
||||
return
|
||||
end
|
||||
if not ply.GetLevel then return end
|
||||
|
||||
local map = game.GetMap()
|
||||
local level = LocalPlayer():GetLevel()
|
||||
|
@ -48,7 +37,7 @@ local function LoadRichPresenceDLL()
|
|||
require("steamfriends")
|
||||
end
|
||||
|
||||
hook.Add("OnGamemodeLoaded", "LoadDLL", function ()
|
||||
hook.Add("OnGamemodeLoaded", "LoadDLL", function()
|
||||
local dllfound = pcall(LoadRichPresenceDLL)
|
||||
LoadRichPresenceDLL = nil
|
||||
|
||||
|
|
|
@ -31,9 +31,10 @@ end
|
|||
|
||||
function syn:Play(file, events)
|
||||
self:Reset()
|
||||
sound.PlayFile(file, "noblock", function (a)
|
||||
|
||||
sound.PlayFile(file, "noblock", function(a)
|
||||
if IsValid(a) then
|
||||
timer.Simple(0, function ()
|
||||
timer.Simple(0, function()
|
||||
a:EnableLooping(true)
|
||||
end)
|
||||
|
||||
|
@ -116,6 +117,7 @@ local testcolor = Color(151, 166, 182)
|
|||
|
||||
local function test_beat()
|
||||
testfov = testfovconvar:GetFloat()
|
||||
|
||||
BlindGetColor().r = colbeatr
|
||||
BlindGetColor().g = colbeatg
|
||||
BlindGetColor().b = colbeatb
|
||||
|
@ -194,6 +196,7 @@ local function test_think()
|
|||
BlindGetColor().r = math.Approach(BlindGetColor().r, colr, FrameTime() * 100)
|
||||
BlindGetColor().g = math.Approach(BlindGetColor().g, colg, FrameTime() * 100)
|
||||
BlindGetColor().b = math.Approach(BlindGetColor().b, colb, FrameTime() * 100)
|
||||
|
||||
vanishrandx = math.Approach(vanishrandx, 0.5, FrameTime() * 50)
|
||||
vanishrandy = math.Approach(vanishrandy, 0.5, FrameTime() * 50)
|
||||
vanishrandz = math.Approach(vanishrandz, 0.5, FrameTime() * 50)
|
||||
|
@ -207,11 +210,13 @@ local function test_think()
|
|||
|
||||
if testbuildup then
|
||||
GlitchIntensity = math.Approach(GlitchIntensity, 0.65, FrameTime() * 0.1)
|
||||
|
||||
blindrandx = math.Approach(blindrandx, 1.5, FrameTime() * 0.1)
|
||||
blindrandy = math.Approach(blindrandy, 1.5, FrameTime() * 0.1)
|
||||
blindrandz = math.Approach(blindrandz, 1.5, FrameTime() * 0.1)
|
||||
else
|
||||
GlitchIntensity = math.Approach(GlitchIntensity, 0.1, FrameTime() * 4)
|
||||
|
||||
blindrandx = math.Approach(blindrandx, 0.5, FrameTime() * 10)
|
||||
blindrandy = math.Approach(blindrandy, 0.5, FrameTime() * 10)
|
||||
blindrandz = math.Approach(blindrandz, 0.5, FrameTime() * 10)
|
||||
|
@ -219,190 +224,52 @@ local function test_think()
|
|||
end
|
||||
|
||||
local testevents = {
|
||||
{
|
||||
0,
|
||||
test_color1
|
||||
},
|
||||
{
|
||||
0,
|
||||
test_endbuildup
|
||||
},
|
||||
{
|
||||
0,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
0.75,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
1.1,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
1.9,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
3.25,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
6.75,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
7.6,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
8,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
8.85,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
9,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
9.02,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
10.25,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
13.675,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
14.5,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
15,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
15,
|
||||
test_startbuildup
|
||||
},
|
||||
{
|
||||
15.8,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
15.9,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
16,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
17.065,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
20.5,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
21.3,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
21.7,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
22.5,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
22.8,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
22.82,
|
||||
test_pullback
|
||||
},
|
||||
{
|
||||
24,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
27.375,
|
||||
test_beathard
|
||||
},
|
||||
{
|
||||
27.375,
|
||||
test_color2
|
||||
},
|
||||
{
|
||||
30.75,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
34.25,
|
||||
test_beathard
|
||||
},
|
||||
{
|
||||
37.65,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
41,
|
||||
test_endbuildup
|
||||
},
|
||||
{
|
||||
41.1,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
44,
|
||||
test_startbuildup
|
||||
},
|
||||
{
|
||||
44.5,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
48,
|
||||
test_beathard
|
||||
},
|
||||
{
|
||||
51.4,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
54.8,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
54.8,
|
||||
test_endbuildup
|
||||
},
|
||||
{
|
||||
58.25,
|
||||
test_beat
|
||||
},
|
||||
{
|
||||
59,
|
||||
test_startbuildup
|
||||
},
|
||||
{
|
||||
61.65,
|
||||
test_beathard
|
||||
},
|
||||
{
|
||||
65,
|
||||
test_beat
|
||||
}
|
||||
{0, test_color1},
|
||||
{0, test_endbuildup},
|
||||
{0, test_beat},
|
||||
{0.75, test_pullback},
|
||||
{1.1, test_pullback},
|
||||
{1.9, test_pullback},
|
||||
{3.25, test_beat},
|
||||
{6.75, test_beat},
|
||||
{7.6, test_pullback},
|
||||
{8, test_pullback},
|
||||
{8.85, test_pullback},
|
||||
{9, test_pullback},
|
||||
{9.02, test_pullback},
|
||||
{10.25, test_beat},
|
||||
{13.675, test_beat},
|
||||
{14.5, test_pullback},
|
||||
{15, test_pullback},
|
||||
{15, test_startbuildup},
|
||||
{15.8, test_pullback},
|
||||
{15.9, test_pullback},
|
||||
{16, test_pullback},
|
||||
{17.065, test_beat},
|
||||
{20.5, test_beat},
|
||||
{21.3, test_pullback},
|
||||
{21.7, test_pullback},
|
||||
{22.5, test_pullback},
|
||||
{22.8, test_pullback},
|
||||
{22.82, test_pullback},
|
||||
{24, test_beat},
|
||||
{27.375, test_beathard},
|
||||
{27.375, test_color2},
|
||||
{30.75, test_beat},
|
||||
{34.25, test_beathard},
|
||||
{37.65, test_beat},
|
||||
{41, test_endbuildup},
|
||||
{41.1, test_beat},
|
||||
{44, test_startbuildup},
|
||||
{44.5, test_beat},
|
||||
{48, test_beathard},
|
||||
{51.4, test_beat},
|
||||
{54.8, test_beat},
|
||||
{54.8, test_endbuildup},
|
||||
{58.25, test_beat},
|
||||
{59, test_startbuildup},
|
||||
{61.65, test_beathard},
|
||||
{65, test_beat}
|
||||
}
|
||||
|
||||
function test_syn(a)
|
||||
|
|
|
@ -6,7 +6,7 @@ local viewbob_intensity = CreateClientConVar("Beatrun_ViewbobIntensity", "20", t
|
|||
local viewbob_stabilized = CreateClientConVar("Beatrun_ViewbobStabilized", "0", true, true, "Turn on to reduce motion sickness by making viewbobbing keep the player's look position centered", 0, 1)
|
||||
|
||||
local function lensqr(ang)
|
||||
return ang[1]^2 + ang[2]^2 + ang[3]^2
|
||||
return ang[1] ^ 2 + ang[2] ^ 2 + ang[3] ^ 2
|
||||
end
|
||||
|
||||
function metavec:Approach(x, y, z, speed)
|
||||
|
@ -111,7 +111,9 @@ local function CLViewPunchCalc(ply, pos, ang)
|
|||
punchlocal.z = math.max(math.abs(PunchPos.y) * math.abs(runfwd - 1) * 2, -0.5) * crouchmul
|
||||
|
||||
punchlocal:Mul(0.66)
|
||||
|
||||
pos:Add(punchlocal)
|
||||
|
||||
punchlocal:Mul(1.5151515151515151)
|
||||
|
||||
runangmul = math.Approach(runangmul, grounded and 0.5 or 0, FrameTime() * (grounded and 5 or 15))
|
||||
|
@ -131,6 +133,7 @@ function meta:CLViewPunch(angle)
|
|||
ang[1] = math.Clamp(ang[1], -180, 180)
|
||||
ang[2] = math.Clamp(ang[2], -180, 180)
|
||||
ang[3] = math.Clamp(ang[3], -180, 180)
|
||||
|
||||
self.ViewPunchDone = false
|
||||
end
|
||||
|
||||
|
|
|
@ -1,24 +1,27 @@
|
|||
--[[
|
||||
local wmx, wmy = 0, 0
|
||||
local wmtime = 0
|
||||
|
||||
hook.Add("PostRender", "Watermark", function()
|
||||
-- surface.SetFont("DebugFixed")
|
||||
-- surface.SetTextColor(255,255,255, 75)
|
||||
-- local steamid = LocalPlayer():SteamID()
|
||||
-- local tw, th = surface.GetTextSize(steamid)
|
||||
surface.SetFont("DebugFixed")
|
||||
surface.SetTextColor(255, 255, 255, 75)
|
||||
local steamid = LocalPlayer():SteamID()
|
||||
local _, th = surface.GetTextSize(steamid)
|
||||
|
||||
-- if SysTime() > wmtime then
|
||||
-- wmx, wmy = math.random(0, ScrW()-100), math.random(0, ScrH()-100)
|
||||
-- wmtime = SysTime() + 2
|
||||
-- end
|
||||
if SysTime() > wmtime then
|
||||
wmx, wmy = math.random(0, ScrW() - 100), math.random(0, ScrH() - 100)
|
||||
wmtime = SysTime() + 2
|
||||
end
|
||||
|
||||
-- cam.Start2D()
|
||||
-- surface.SetTextPos(wmx,wmy)
|
||||
-- surface.DrawText("Beta")
|
||||
-- surface.SetTextPos(wmx,wmy+th)
|
||||
-- surface.DrawText(steamid)
|
||||
-- surface.SetTextPos(wmx,wmy+(th*2))
|
||||
-- surface.DrawText(system.SteamTime())
|
||||
-- surface.SetTextPos(wmx,wmy+(th*3))
|
||||
-- surface.DrawText(LocalPlayer():Nick())
|
||||
-- cam.End2D()
|
||||
cam.Start2D()
|
||||
surface.SetTextPos(wmx, wmy)
|
||||
surface.DrawText("Beta")
|
||||
surface.SetTextPos(wmx, wmy + th)
|
||||
surface.DrawText(steamid)
|
||||
surface.SetTextPos(wmx, wmy + (th * 2))
|
||||
surface.DrawText(system.SteamTime())
|
||||
surface.SetTextPos(wmx, wmy + (th * 3))
|
||||
surface.DrawText(LocalPlayer():Nick())
|
||||
cam.End2D()
|
||||
end)
|
||||
]]
|
|
@ -1,6 +1,5 @@
|
|||
local worldmats
|
||||
local editedmats
|
||||
|
||||
local worldmats_texture = {}
|
||||
local worldmats_color = {}
|
||||
local whitescale = false
|
||||
|
@ -11,43 +10,57 @@ local function World_Whitescale()
|
|||
|
||||
local propmats = ents.FindByClass("prop_dynamic")
|
||||
local dupeprops = {}
|
||||
for k,v in pairs(propmats) do
|
||||
|
||||
for k, v in pairs(propmats) do
|
||||
if dupeprops[v:GetModel()] then continue end
|
||||
for k,v in pairs(v:GetMaterials()) do
|
||||
|
||||
for k, v in pairs(v:GetMaterials()) do
|
||||
table.insert(worldmats, v)
|
||||
end
|
||||
|
||||
dupeprops[v:GetModel()] = true
|
||||
end
|
||||
|
||||
for k,v in pairs(worldmats) do
|
||||
for k, v in pairs(worldmats) do
|
||||
if v:find("water/") then continue end
|
||||
|
||||
local newmat = Material(v)
|
||||
|
||||
table.insert(editedmats, newmat)
|
||||
table.insert(worldmats_color, newmat:GetVector("$color"))
|
||||
table.insert(worldmats_texture, newmat:GetString("$basetexture") or 0)
|
||||
|
||||
newmat:SetTexture("$basetexture", "models/debug/debugwhite")
|
||||
-- if math.random()>0.5 then
|
||||
|
||||
local noise = util.SharedRandom(k, -0.25, 0)
|
||||
newmat:SetVector("$color",Vector(0.65+noise,0.65+noise,0.65+noise))
|
||||
newmat:SetVector("$color", Vector(0.65 + noise, 0.65 + noise, 0.65 + noise))
|
||||
|
||||
-- else
|
||||
-- newmat:SetVector("$color",Vector(0.95,0.05,0.05))
|
||||
-- end
|
||||
end
|
||||
|
||||
whitescale = true
|
||||
|
||||
net.Start("ToggleWhitescale")
|
||||
net.WriteBool(whitescale)
|
||||
net.SendToServer()
|
||||
end
|
||||
|
||||
local function World_WhitescaleOff()
|
||||
if !editedmats then return end
|
||||
for k,v in pairs(editedmats) do
|
||||
if not editedmats then return end
|
||||
|
||||
for k, v in pairs(editedmats) do
|
||||
local oldtexture = worldmats_texture[k]
|
||||
if oldtexture != 0 then
|
||||
v:SetTexture("$basetexture",worldmats_texture[k])
|
||||
|
||||
if oldtexture ~= 0 then
|
||||
v:SetTexture("$basetexture", worldmats_texture[k])
|
||||
end
|
||||
v:SetVector("$color",worldmats_color[k])
|
||||
|
||||
v:SetVector("$color", worldmats_color[k])
|
||||
end
|
||||
|
||||
whitescale = false
|
||||
end
|
||||
|
||||
|
@ -58,4 +71,5 @@ local function ToggleWhitescale()
|
|||
World_Whitescale()
|
||||
end
|
||||
end
|
||||
concommand.Add("ToggleWhitescale",ToggleWhitescale)
|
||||
|
||||
concommand.Add("ToggleWhitescale", ToggleWhitescale)
|
|
@ -1,10 +1,10 @@
|
|||
local meta = FindMetaTable("Player")
|
||||
local XP_max = 2000000
|
||||
-- local XP_max = 2000000
|
||||
local XP_ratiocache = nil
|
||||
local parkourevent_lastpos = Vector()
|
||||
|
||||
function XP_nextlevel(level)
|
||||
return math.Round(0.25 * level^3 + 0.8 * level^2 + 2 * level)
|
||||
return math.Round(0.25 * level ^ 3 + 0.8 * level ^ 2 + 2 * level)
|
||||
end
|
||||
|
||||
local ParkourXP = {
|
||||
|
@ -20,23 +20,24 @@ local ParkourXP = {
|
|||
swingbar = 4,
|
||||
step = 1
|
||||
}
|
||||
|
||||
local ParkourXP_RNG = {
|
||||
sidestep = 0.1
|
||||
}
|
||||
|
||||
local ParkourXP_PosCheck = {
|
||||
climb = true,
|
||||
vault = true,
|
||||
wallrunh = true,
|
||||
wallrunv = true
|
||||
}
|
||||
|
||||
XP_floatingxp = {}
|
||||
|
||||
hook.Add("OnParkour", "ParkourXP", function (event)
|
||||
hook.Add("OnParkour", "ParkourXP", function(event)
|
||||
local ply = LocalPlayer()
|
||||
|
||||
if ply.InReplay then
|
||||
return
|
||||
end
|
||||
if ply.InReplay then return end
|
||||
|
||||
local pos = ply:GetPos()
|
||||
|
||||
|
@ -74,10 +75,7 @@ function meta:LevelUp()
|
|||
self:SetLevel(self:GetLevel() + 1)
|
||||
|
||||
i = i + 1
|
||||
|
||||
if i > 1000 then
|
||||
break
|
||||
end
|
||||
if i > 1000 then break end
|
||||
end
|
||||
|
||||
if i > 0 then
|
||||
|
@ -91,6 +89,7 @@ end
|
|||
|
||||
function meta:SetXP(xp)
|
||||
self.XP = math.Round(xp)
|
||||
|
||||
XP_ratiocache = nil
|
||||
|
||||
self:LevelUp()
|
||||
|
@ -98,6 +97,7 @@ end
|
|||
|
||||
function meta:AddXP(xp)
|
||||
self.XP = math.Round((self.XP or 0) + xp)
|
||||
|
||||
XP_ratiocache = nil
|
||||
|
||||
self:LevelUp()
|
||||
|
@ -110,18 +110,13 @@ function meta:AddXP(xp)
|
|||
end
|
||||
|
||||
local function SaveXP()
|
||||
local xp = util.TableToJSON({
|
||||
LocalPlayer().XP or 0,
|
||||
LocalPlayer().Level or 1
|
||||
})
|
||||
local xp = util.TableToJSON({LocalPlayer().XP or 0, LocalPlayer().Level or 1})
|
||||
|
||||
local xpold = file.Read("beatrun/local/xp.txt", "DATA")
|
||||
|
||||
if xpold then
|
||||
xpold = util.Decompress(xpold)
|
||||
|
||||
if LocalPlayer().XP < util.JSONToTable(xpold)[1] then
|
||||
return
|
||||
end
|
||||
if LocalPlayer().XP < util.JSONToTable(xpold)[1] then return end
|
||||
end
|
||||
|
||||
local xp = util.Compress(xp)
|
||||
|
|
|
@ -5,8 +5,8 @@ local SScaleY_cached = {}
|
|||
|
||||
function SScaleX(sizex)
|
||||
-- local iswide = AEUI.ScrW / AEUI.ScrH > 1.6
|
||||
|
||||
if SScaleX_cached[sizex] then return SScaleX_cached[sizex] end
|
||||
|
||||
SScaleX_cached[sizex] = math.ceil(sizex / (1920 / AEUI.ScrW))
|
||||
|
||||
return SScaleX_cached[sizex]
|
||||
|
@ -42,6 +42,7 @@ function AEUIFonts()
|
|||
weight = 500,
|
||||
size = ScreenScale(7)
|
||||
})
|
||||
|
||||
surface.CreateFont("AEUILarge", {
|
||||
shadow = false,
|
||||
blursize = 0,
|
||||
|
@ -59,6 +60,7 @@ function AEUIFonts()
|
|||
weight = 500,
|
||||
size = ScreenScale(12)
|
||||
})
|
||||
|
||||
surface.CreateFont("AEUIVeryLarge", {
|
||||
shadow = false,
|
||||
blursize = 0,
|
||||
|
@ -231,6 +233,7 @@ local function AEUIDraw()
|
|||
if e.hover then
|
||||
local mx = AEUI.MX + SScaleX(20)
|
||||
local my = AEUI.MY + SScaleY(20)
|
||||
|
||||
surface.SetTextColor(255, 255, 255)
|
||||
surface.SetFont("AEUIDefault")
|
||||
|
||||
|
@ -251,6 +254,7 @@ local function AEUIDraw()
|
|||
end
|
||||
|
||||
hook.Add("HUDPaint", "AEUIDraw", AEUIDraw)
|
||||
|
||||
hook.Add("StartCommand", "AEUI_StartCommand", function(ply, cmd)
|
||||
local mx = gui.MouseX()
|
||||
local my = gui.MouseY()
|
||||
|
@ -266,7 +270,6 @@ hook.Add("StartCommand", "AEUI_StartCommand", function(ply, cmd)
|
|||
|
||||
if x < mx and mx < x + w and y < my and my < y + h then
|
||||
AEUI.HoveredPanel = panel
|
||||
|
||||
break
|
||||
else
|
||||
AEUI.HoveredPanel = nil
|
||||
|
@ -319,7 +322,6 @@ end)
|
|||
hook.Add("OnScreenSizeChanged", "AEUI_ScreenSize", function()
|
||||
AEUI.ScrH = ScrH()
|
||||
AEUI.ScrW = ScrW()
|
||||
|
||||
table.Empty(SScaleX_cached)
|
||||
table.Empty(SScaleY_cached)
|
||||
AEUIFonts()
|
||||
|
@ -338,7 +340,6 @@ function AEUI.Elements.Text(panel, data)
|
|||
|
||||
if isgreyed then
|
||||
local colr, colg, colb = data.color:Unpack()
|
||||
|
||||
surface.SetDrawColor(colr, colg, colb, 50)
|
||||
surface.SetTextColor(colr, colg, colb, 50)
|
||||
else
|
||||
|
|
|
@ -145,6 +145,7 @@ local white = Color(210, 159, 110, 255)
|
|||
local green = Color(0, 255, 0)
|
||||
local circle = Material("circle.png", "nocull")
|
||||
whiteg = white
|
||||
|
||||
customcolors = {
|
||||
Color(210, 159, 110, 255),
|
||||
Color(203, 145, 65, 255),
|
||||
|
@ -155,6 +156,7 @@ customcolors = {
|
|||
Color(250, 20, 40, 255),
|
||||
Color(10, 255, 20, 255)
|
||||
}
|
||||
|
||||
local forcelines = false
|
||||
|
||||
function BlindSetColor(newcol)
|
||||
|
@ -174,11 +176,9 @@ local camvector = Vector()
|
|||
local camang = Angle()
|
||||
local camlerp = 0
|
||||
local lerp, sound, bgm = nil
|
||||
blindcolor = {
|
||||
0,
|
||||
0,
|
||||
0
|
||||
}
|
||||
|
||||
blindcolor = {0, 0, 0}
|
||||
|
||||
local colors = {
|
||||
[MAT_DEFAULT] = blue,
|
||||
[MAT_GLASS] = glass,
|
||||
|
@ -187,12 +187,9 @@ local colors = {
|
|||
[MAT_GRASS] = grass,
|
||||
[MAT_FLESH] = red
|
||||
}
|
||||
local colorslist = {
|
||||
green,
|
||||
grass,
|
||||
sand,
|
||||
glass
|
||||
}
|
||||
|
||||
local colorslist = {green, grass, sand, glass}
|
||||
|
||||
blindrandrendermin = 0.9
|
||||
blindinverted = false
|
||||
blindpopulate = false
|
||||
|
@ -200,12 +197,12 @@ blindpopulatespeed = 1000
|
|||
blindfakepopulate = false
|
||||
customglitch = false
|
||||
blindcustomlerp = 0
|
||||
blindcustompoints = {
|
||||
Vector()
|
||||
}
|
||||
local blindcustompoints = blindcustompoints
|
||||
-- local sizemult = 1
|
||||
|
||||
blindcustompoints = {Vector()}
|
||||
|
||||
local blindcustompoints = blindcustompoints
|
||||
|
||||
-- local sizemult = 1
|
||||
function InvertColors()
|
||||
for k, v in ipairs(colorslist) do
|
||||
v.r = 255 - v.r
|
||||
|
@ -244,6 +241,7 @@ local colorsclass = {
|
|||
func_door_rotating = green,
|
||||
func_door = green
|
||||
}
|
||||
|
||||
local blindedsounds = {
|
||||
["bad.wav"] = true,
|
||||
["music/locloop_unk.wav"] = true,
|
||||
|
@ -262,9 +260,11 @@ local blindedsounds = {
|
|||
["lidar/burst3.wav"] = true,
|
||||
["lidar/scanstop.wav"] = true
|
||||
}
|
||||
|
||||
local trw = {
|
||||
collisiongroup = COLLISION_GROUP_WORLD
|
||||
}
|
||||
|
||||
local trwr = {}
|
||||
|
||||
local function IsInWorld(pos)
|
||||
|
@ -329,9 +329,8 @@ LOCEntities = LOCEntities or {}
|
|||
meshtbl = meshtbl or new()
|
||||
local meshtbl = meshtbl
|
||||
pausescan = false
|
||||
local mathrandom = math.random
|
||||
|
||||
/*
|
||||
--[[
|
||||
local function OptimizeMeshes()
|
||||
local i = 0
|
||||
-- local vertexcount = 0
|
||||
|
@ -343,7 +342,7 @@ local function OptimizeMeshes()
|
|||
i = i + 1
|
||||
end
|
||||
end
|
||||
*/
|
||||
]]
|
||||
|
||||
glob_blindangles = Angle()
|
||||
glob_blindorigin = Vector()
|
||||
|
@ -357,8 +356,10 @@ local function Blindness(origin, angles)
|
|||
local eyeang = angles
|
||||
local FT = FrameTime()
|
||||
local quality = quality:GetBool()
|
||||
|
||||
glob_blindorigin:Set(origin)
|
||||
glob_blindangles:Set(angles)
|
||||
|
||||
local hitpointscount = nil
|
||||
-- local vel_l = ply:GetVelocity():Length()
|
||||
-- local vel = 2.5
|
||||
|
@ -371,6 +372,7 @@ local function Blindness(origin, angles)
|
|||
end
|
||||
|
||||
local randrender = math.Rand(blindrandrendermin, 1)
|
||||
|
||||
render.Clear(blindcolor[1] * randrender, blindcolor[2] * randrender, blindcolor[3] * randrender, 0)
|
||||
render.ClearDepth()
|
||||
render.ClearStencil()
|
||||
|
@ -382,15 +384,18 @@ local function Blindness(origin, angles)
|
|||
|
||||
if trace.Hit then
|
||||
hitpoints:push_right(trace.HitPos)
|
||||
local invert = mathrandom()
|
||||
|
||||
local invert = math.random()
|
||||
|
||||
if invert < 0.05 then
|
||||
trace.HitNormal:Mul(-1)
|
||||
end
|
||||
|
||||
hitnormal:push_right(trace.HitNormal)
|
||||
|
||||
local hcol = colors[trace.MatType]
|
||||
local hcolclass = colorsclass[trace.Entity:GetClass()]
|
||||
|
||||
hitcolor:push_right(hcol or hcolclass or white)
|
||||
|
||||
if limit < hitpoints:length() then
|
||||
|
@ -432,11 +437,11 @@ local function Blindness(origin, angles)
|
|||
end
|
||||
end
|
||||
|
||||
-- local lastpos = hitpoints[hitpoints.tail]
|
||||
local f = eyeang:Forward()
|
||||
local eyediff = Vector()
|
||||
local k = limit
|
||||
local k2 = 0
|
||||
-- local lastpos = hitpoints[hitpoints.tail]
|
||||
-- local vanishlimit = vanishlimit
|
||||
-- local vanishrandx = vanishrandx
|
||||
-- local vanishrandy = vanishrandy
|
||||
|
@ -460,6 +465,7 @@ local function Blindness(origin, angles)
|
|||
local ed = eyedot
|
||||
local anggg = ply:EyeAngles()
|
||||
anggg.x = 0
|
||||
|
||||
local eyep = ply:EyePos() + anggg:Forward() * 200
|
||||
local hitindex = 1
|
||||
local drawcount = #blindcustompoints
|
||||
|
@ -569,8 +575,9 @@ local function BlindnessPreUI()
|
|||
end
|
||||
end
|
||||
|
||||
-- local te = "te/metamorphosis/"
|
||||
/*
|
||||
--[[
|
||||
local te = "te/metamorphosis/"
|
||||
|
||||
local jingles = {
|
||||
land = te .. "3-linedrop",
|
||||
jump = te .. "1-linemove",
|
||||
|
@ -593,7 +600,7 @@ local function BlindnessJingles(event)
|
|||
LocalPlayer():EmitSound(jingles[event] .. math.random(1, jinglescount[event]) .. ".wav")
|
||||
end
|
||||
end
|
||||
*/
|
||||
]]
|
||||
|
||||
function ToggleBlindness(toggle)
|
||||
blinded = toggle
|
||||
|
@ -616,6 +623,7 @@ function ToggleBlindness(toggle)
|
|||
|
||||
local milestone = ply:GetLevel() >= 100
|
||||
local bgmstring = milestone and "music/locloop.wav" or "music/locloop_unk.wav"
|
||||
|
||||
forcelines = not milestone
|
||||
|
||||
BlindSetColor(milestone and customcolors[1] or customcolors[3])
|
||||
|
@ -666,6 +674,7 @@ function cool()
|
|||
|
||||
for v in hitpoints:iter_right() do
|
||||
mesh.QuadEasy(v, hitnormal[hitnormal.tail - k2], 2, 2, hitcolor[hitcolor.tail - k2] or white)
|
||||
|
||||
k = k - 1
|
||||
k2 = k2 + 1
|
||||
end
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
|
||||
AddCSLuaFile()
|
||||
DEFINE_BASECLASS( "player_default" )
|
||||
|
||||
if ( CLIENT ) then
|
||||
|
||||
CreateConVar( "cl_playercolor", "0.24 0.34 0.41", { FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD }, "The value is a Vector - so between 0-1 - not between 0-255" )
|
||||
CreateConVar( "cl_weaponcolor", "0.30 1.80 2.10", { FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD }, "The value is a Vector - so between 0-1 - not between 0-255" )
|
||||
CreateConVar( "cl_playerskin", "0", { FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD }, "The skin to use, if the model has any" )
|
||||
CreateConVar( "cl_playerbodygroups", "0", { FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD }, "The bodygroups to use, if the model has any" )
|
||||
DEFINE_BASECLASS("player_default")
|
||||
|
||||
if CLIENT then
|
||||
CreateConVar("cl_playercolor", "0.24 0.34 0.41", {FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD}, "The value is a Vector - so between 0-1 - not between 0-255")
|
||||
CreateConVar("cl_weaponcolor", "0.30 1.80 2.10", {FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD}, "The value is a Vector - so between 0-1 - not between 0-255")
|
||||
CreateConVar("cl_playerskin", "0", {FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD}, "The skin to use, if the model has any")
|
||||
CreateConVar("cl_playerbodygroups", "0", {FCVAR_ARCHIVE, FCVAR_USERINFO, FCVAR_DONTRECORD}, "The bodygroups to use, if the model has any")
|
||||
end
|
||||
|
||||
local PLAYER = {}
|
||||
|
@ -31,151 +29,148 @@ PLAYER.RunSpeed = 400
|
|||
-- Set up the network table accessors
|
||||
--
|
||||
function PLAYER:SetupDataTables()
|
||||
BaseClass.SetupDataTables(self)
|
||||
self.Player:NetworkVar("Float", 0, "MEMoveLimit")
|
||||
self.Player:NetworkVar("Float", 1, "MESprintDelay")
|
||||
self.Player:NetworkVar("Float", 2, "MEAng")
|
||||
|
||||
BaseClass.SetupDataTables( self )
|
||||
self.Player:NetworkVar( "Float", 0, "MEMoveLimit" )
|
||||
self.Player:NetworkVar( "Float", 1, "MESprintDelay" )
|
||||
self.Player:NetworkVar( "Float", 2, "MEAng" )
|
||||
self.Player:NetworkVar("Int", 0, "Climbing")
|
||||
self.Player:NetworkVar("Float", 3, "ClimbingTime")
|
||||
self.Player:NetworkVar("Vector", 0, "ClimbingStart")
|
||||
self.Player:NetworkVar("Vector", 1, "ClimbingEnd")
|
||||
self.Player:NetworkVar("Vector", 7, "ClimbingEndOld")
|
||||
self.Player:NetworkVar("Float", 24, "ClimbingDelay")
|
||||
self.Player:NetworkVar("Angle", 3, "ClimbingAngle")
|
||||
|
||||
self.Player:NetworkVar( "Int", 0, "Climbing" )
|
||||
self.Player:NetworkVar( "Float", 3, "ClimbingTime" )
|
||||
self.Player:NetworkVar( "Vector", 0, "ClimbingStart" )
|
||||
self.Player:NetworkVar( "Vector", 1, "ClimbingEnd" )
|
||||
self.Player:NetworkVar( "Vector", 7, "ClimbingEndOld" )
|
||||
self.Player:NetworkVar( "Float", 24, "ClimbingDelay" )
|
||||
self.Player:NetworkVar( "Angle", 3, "ClimbingAngle" )
|
||||
self.Player:NetworkVar("Int", 1, "Wallrun")
|
||||
self.Player:NetworkVar("Float", 4, "WallrunTime")
|
||||
self.Player:NetworkVar("Float", 5, "WallrunSoundTime")
|
||||
self.Player:NetworkVar("Vector", 2, "WallrunDir")
|
||||
self.Player:NetworkVar("Vector", 8, "WallrunOrigVel")
|
||||
self.Player:NetworkVar("Int", 4, "WallrunCount")
|
||||
|
||||
self.Player:NetworkVar( "Int", 1, "Wallrun")
|
||||
self.Player:NetworkVar( "Float", 4, "WallrunTime")
|
||||
self.Player:NetworkVar( "Float", 5, "WallrunSoundTime")
|
||||
self.Player:NetworkVar( "Vector", 2, "WallrunDir")
|
||||
self.Player:NetworkVar( "Vector", 8, "WallrunOrigVel")
|
||||
self.Player:NetworkVar( "Int", 4, "WallrunCount")
|
||||
self.Player:NetworkVar("Bool", 0, "Sliding")
|
||||
self.Player:NetworkVar("Float", 6, "SlidingTime")
|
||||
self.Player:NetworkVar("Float", 7, "SlidingDelay")
|
||||
self.Player:NetworkVar("Vector", 4, "SlidingLastPos")
|
||||
self.Player:NetworkVar("Float", 18, "SlidingVel")
|
||||
self.Player:NetworkVar("Float", 19, "SlidingStrafe")
|
||||
self.Player:NetworkVar("Bool", 9, "SlidingSlippery")
|
||||
self.Player:NetworkVar("Float", 20, "SlidingSlipperyUpdate")
|
||||
self.Player:NetworkVar("Angle", 2, "SlidingAngle")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 0, "Sliding" )
|
||||
self.Player:NetworkVar( "Float", 6, "SlidingTime" )
|
||||
self.Player:NetworkVar( "Float", 7, "SlidingDelay" )
|
||||
self.Player:NetworkVar( "Vector", 4, "SlidingLastPos" )
|
||||
self.Player:NetworkVar( "Float", 18, "SlidingVel" )
|
||||
self.Player:NetworkVar( "Float", 19, "SlidingStrafe" )
|
||||
self.Player:NetworkVar( "Bool", 9, "SlidingSlippery" )
|
||||
self.Player:NetworkVar( "Float", 20, "SlidingSlipperyUpdate" )
|
||||
self.Player:NetworkVar( "Angle", 2, "SlidingAngle" )
|
||||
self.Player:NetworkVar("Bool", 1, "StepRight")
|
||||
self.Player:NetworkVar("Float", 8, "StepRelease")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 1, "StepRight" )
|
||||
self.Player:NetworkVar( "Float", 8, "StepRelease" )
|
||||
self.Player:NetworkVar("Bool", 2, "Grappling")
|
||||
self.Player:NetworkVar("Vector", 3, "GrapplePos")
|
||||
self.Player:NetworkVar("Float", 29, "GrappleLength")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 2, "Grappling" )
|
||||
self.Player:NetworkVar( "Vector", 3, "GrapplePos" )
|
||||
self.Player:NetworkVar( "Float", 29, "GrappleLength")
|
||||
self.Player:NetworkVar("Entity", 0, "Swingbar")
|
||||
|
||||
self.Player:NetworkVar( "Entity", 0, "Swingbar" )
|
||||
self.Player:NetworkVar("Bool", 3, "CrouchJump")
|
||||
self.Player:NetworkVar("Float", 9, "CrouchJumpTime")
|
||||
self.Player:NetworkVar("Bool", 12, "CrouchJumpBlocked")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 3, "CrouchJump" )
|
||||
self.Player:NetworkVar( "Float", 9, "CrouchJumpTime" )
|
||||
self.Player:NetworkVar( "Bool", 12, "CrouchJumpBlocked" )
|
||||
self.Player:NetworkVar("Float", 9, "SafetyRollKeyTime")
|
||||
self.Player:NetworkVar("Float", 10, "SafetyRollTime")
|
||||
self.Player:NetworkVar("Angle", 0, "SafetyRollAng")
|
||||
|
||||
self.Player:NetworkVar( "Float", 9, "SafetyRollKeyTime" )
|
||||
self.Player:NetworkVar( "Float", 10, "SafetyRollTime" )
|
||||
self.Player:NetworkVar( "Angle", 0, "SafetyRollAng" )
|
||||
|
||||
self.Player:NetworkVar( "Bool", 4, "Quickturn" )
|
||||
self.Player:NetworkVar( "Float", 10, "QuickturnTime" )
|
||||
self.Player:NetworkVar( "Angle", 1, "QuickturnAng" )
|
||||
|
||||
self.Player:NetworkVar( "Bool", 5, "WallrunElevated" )
|
||||
self.Player:NetworkVar("Bool", 4, "Quickturn")
|
||||
self.Player:NetworkVar("Float", 10, "QuickturnTime")
|
||||
self.Player:NetworkVar("Angle", 1, "QuickturnAng")
|
||||
|
||||
self.Player:NetworkVar("Bool", 5, "WallrunElevated")
|
||||
|
||||
--We have to store this info on the player as multiple people can use one swingbar
|
||||
self.Player:NetworkVar( "Float", 11, "SBOffset" )
|
||||
self.Player:NetworkVar( "Float", 12, "SBOffsetSpeed" )
|
||||
self.Player:NetworkVar( "Float", 13, "SBStartLerp" )
|
||||
self.Player:NetworkVar( "Float", 14, "SBDelay" )
|
||||
self.Player:NetworkVar( "Int", 2, "SBPeak" )
|
||||
self.Player:NetworkVar( "Bool",6, "SBDir" )
|
||||
self.Player:NetworkVar( "Entity",1, "SwingbarLast" )
|
||||
self.Player:NetworkVar("Float", 11, "SBOffset")
|
||||
self.Player:NetworkVar("Float", 12, "SBOffsetSpeed")
|
||||
self.Player:NetworkVar("Float", 13, "SBStartLerp")
|
||||
self.Player:NetworkVar("Float", 14, "SBDelay")
|
||||
self.Player:NetworkVar("Int", 2, "SBPeak")
|
||||
self.Player:NetworkVar("Bool", 6, "SBDir")
|
||||
self.Player:NetworkVar("Entity", 1, "SwingbarLast")
|
||||
|
||||
self.Player:NetworkVar( "Entity", 2, "Swingpipe" )
|
||||
self.Player:NetworkVar( "Entity", 3, "Rabbit" )
|
||||
self.Player:NetworkVar( "Int", 3, "RabbitSeat" )
|
||||
self.Player:NetworkVar("Entity", 2, "Swingpipe")
|
||||
self.Player:NetworkVar("Entity", 3, "Rabbit")
|
||||
self.Player:NetworkVar("Int", 3, "RabbitSeat")
|
||||
|
||||
self.Player:NetworkVar("Float", 15, "OverdriveCharge")
|
||||
self.Player:NetworkVar("Float", 16, "OverdriveMult")
|
||||
|
||||
self.Player:NetworkVar( "Float", 15, "OverdriveCharge" )
|
||||
self.Player:NetworkVar( "Float", 16, "OverdriveMult" )
|
||||
self.Player:NetworkVar("Bool", 7, "JumpTurn")
|
||||
self.Player:NetworkVar("Float", 17, "JumpTurnRecovery")
|
||||
|
||||
self.Player:NetworkVar("Bool", 8, "WasOnGround")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 7, "JumpTurn" )
|
||||
self.Player:NetworkVar( "Float", 17, "JumpTurnRecovery" )
|
||||
self.Player:NetworkVar("Entity", 4, "Ladder")
|
||||
self.Player:NetworkVar("Float", 21, "LadderDelay")
|
||||
self.Player:NetworkVar("Float", 22, "LadderHeight")
|
||||
self.Player:NetworkVar("Bool", 10, "LadderEntering")
|
||||
self.Player:NetworkVar("Bool", 11, "LadderHand")
|
||||
self.Player:NetworkVar("Vector", 5, "LadderStartPos")
|
||||
self.Player:NetworkVar("Vector", 6, "LadderEndPos")
|
||||
self.Player:NetworkVar("Float", 23, "LadderLerp")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 8, "WasOnGround" )
|
||||
self.Player:NetworkVar("Entity", 5, "Zipline")
|
||||
self.Player:NetworkVar("Float", 21, "ZiplineStart")
|
||||
self.Player:NetworkVar("Float", 22, "ZiplineFraction")
|
||||
self.Player:NetworkVar("Float", 23, "ZiplineSpeed")
|
||||
self.Player:NetworkVar("Float", 25, "ZiplineDelay")
|
||||
|
||||
self.Player:NetworkVar( "Entity", 4, "Ladder" )
|
||||
self.Player:NetworkVar( "Float", 21, "LadderDelay" )
|
||||
self.Player:NetworkVar( "Float", 22, "LadderHeight" )
|
||||
self.Player:NetworkVar( "Bool", 10, "LadderEntering" )
|
||||
self.Player:NetworkVar( "Bool", 11, "LadderHand" )
|
||||
self.Player:NetworkVar( "Vector", 5, "LadderStartPos" )
|
||||
self.Player:NetworkVar( "Vector", 6, "LadderEndPos" )
|
||||
self.Player:NetworkVar( "Float", 23, "LadderLerp" )
|
||||
self.Player:NetworkVar("Int", 5, "MeleeDamage")
|
||||
self.Player:NetworkVar("Float", 26, "MeleeTime")
|
||||
self.Player:NetworkVar("Float", 27, "MeleeDelay")
|
||||
self.Player:NetworkVar("Int", 6, "Melee")
|
||||
|
||||
self.Player:NetworkVar( "Entity", 5, "Zipline" )
|
||||
self.Player:NetworkVar( "Float", 21, "ZiplineStart" )
|
||||
self.Player:NetworkVar( "Float", 22, "ZiplineFraction" )
|
||||
self.Player:NetworkVar( "Float", 23, "ZiplineSpeed" )
|
||||
self.Player:NetworkVar( "Float", 25, "ZiplineDelay" )
|
||||
|
||||
self.Player:NetworkVar( "Int", 5, "MeleeDamage")
|
||||
self.Player:NetworkVar( "Float", 26, "MeleeTime")
|
||||
self.Player:NetworkVar( "Float", 27, "MeleeDelay")
|
||||
self.Player:NetworkVar( "Int", 6, "Melee")
|
||||
|
||||
self.Player:NetworkVar( "Float", 28, "Balance")
|
||||
self.Player:NetworkVar( "Entity", 6, "BalanceEntity")
|
||||
|
||||
self.Player:NetworkVar( "Bool", 13, "Dive" )
|
||||
self.Player:NetworkVar("Float", 28, "Balance")
|
||||
self.Player:NetworkVar("Entity", 6, "BalanceEntity")
|
||||
|
||||
self.Player:NetworkVar("Bool", 13, "Dive")
|
||||
end
|
||||
|
||||
|
||||
function PLAYER:Loadout()
|
||||
|
||||
if GetGlobalBool(GM_DATATHEFT) then
|
||||
for k,v in ipairs(DATATHEFT_LOADOUTS[ math.random( #DATATHEFT_LOADOUTS ) ]) do
|
||||
for k, v in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do
|
||||
local wep = self.Player:Give(v)
|
||||
self.Player:GiveAmmo(300, wep:GetPrimaryAmmoType())
|
||||
end
|
||||
else
|
||||
self.Player:RemoveAllAmmo()
|
||||
end
|
||||
self.Player:Give( "runnerhands" )
|
||||
|
||||
self.Player:Give("runnerhands")
|
||||
self.Player:SelectWeapon("runnerhands")
|
||||
self.Player:SetJumpPower(230)
|
||||
self.Player:SetCrouchedWalkSpeed( 0.5 )
|
||||
self.Player:SetCrouchedWalkSpeed(0.5)
|
||||
self.Player:SetFOV(self.Player:GetInfoNum("Beatrun_FOV", 120))
|
||||
self.Player:SetCanZoom(false)
|
||||
|
||||
end
|
||||
|
||||
hook.Add("PlayerSwitchWeapon", "ResetFOV", function(ply)
|
||||
local fovmult = (ply:InOverdrive() and 1.1) or 1
|
||||
ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 120)*fovmult)
|
||||
|
||||
ply:SetFOV(ply:GetInfoNum("Beatrun_FOV", 120) * fovmult)
|
||||
end)
|
||||
|
||||
function PLAYER:SetModel()
|
||||
BaseClass.SetModel(self)
|
||||
|
||||
BaseClass.SetModel( self )
|
||||
local skin = self.Player:GetInfoNum("cl_playerskin", 0)
|
||||
|
||||
local skin = self.Player:GetInfoNum( "cl_playerskin", 0 )
|
||||
self.Player:SetSkin( skin )
|
||||
self.Player:SetSkin(skin)
|
||||
|
||||
local groups = self.Player:GetInfo( "cl_playerbodygroups" )
|
||||
if ( groups == nil ) then groups = "" end
|
||||
local groups = string.Explode( " ", groups )
|
||||
for k = 0, self.Player:GetNumBodyGroups() - 1 do
|
||||
self.Player:SetBodygroup( k, tonumber( groups[ k + 1 ] ) or 0 )
|
||||
local groups = self.Player:GetInfo("cl_playerbodygroups")
|
||||
|
||||
if groups == nil then
|
||||
groups = ""
|
||||
end
|
||||
|
||||
local groups = string.Explode(" ", groups)
|
||||
|
||||
for k = 0, self.Player:GetNumBodyGroups() - 1 do
|
||||
self.Player:SetBodygroup(k, tonumber(groups[k + 1]) or 0)
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
|
@ -186,55 +181,68 @@ if SERVER then
|
|||
end
|
||||
|
||||
function PLAYER:Spawn()
|
||||
|
||||
BaseClass.Spawn( self )
|
||||
BaseClass.Spawn(self)
|
||||
|
||||
local ply = self.Player
|
||||
local col = ply:GetInfo( "cl_playercolor" )
|
||||
ply:SetPlayerColor( Vector( col ) )
|
||||
local faststartmult = (ply:GetInfoNum("Beatrun_FastStart", 0) > 0 and 0.5) or 1
|
||||
local col = ply:GetInfo("cl_playercolor")
|
||||
|
||||
local col = Vector( ply:GetInfo( "cl_weaponcolor" ) )
|
||||
if ( col:Length() < 0.001 ) then
|
||||
col = Vector( 0.001, 0.001, 0.001 )
|
||||
ply:SetPlayerColor(Vector(col))
|
||||
|
||||
local faststartmult = (ply:GetInfoNum("Beatrun_FastStart", 0) > 0 and 0.5) or 1
|
||||
local col = Vector(ply:GetInfo("cl_weaponcolor"))
|
||||
|
||||
if col:Length() < 0.001 then
|
||||
col = Vector(0.001, 0.001, 0.001)
|
||||
end
|
||||
ply:SetWeaponColor( col )
|
||||
|
||||
ply:SetWeaponColor(col)
|
||||
|
||||
local CPSave = false
|
||||
if Course_Name != "" and Course_StartPos != vector_origin then
|
||||
if ply:GetInfoNum("Beatrun_CPSave", 0) >= 1 and ply:GetNW2Float("CPNum", 1) > 1 and ply.CPSavePos and ply.LastSpawnTime+0.6 < CurTime() then
|
||||
|
||||
if Course_Name ~= "" and Course_StartPos ~= vector_origin then
|
||||
if ply:GetInfoNum("Beatrun_CPSave", 0) >= 1 and ply:GetNW2Float("CPNum", 1) > 1 and ply.CPSavePos and ply.LastSpawnTime + 0.6 < CurTime() then
|
||||
ply:SetPos(ply.CPSavePos)
|
||||
ply:SetEyeAngles(ply.CPSaveAng)
|
||||
ply:SetLocalVelocity(ply.CPSaveVel)
|
||||
ply:LoadParkourState()
|
||||
|
||||
CPSave = true
|
||||
else
|
||||
ply.CPSavePos = nil
|
||||
ply.CPsaveAng = nil
|
||||
ply.CPsaveVel = nil
|
||||
|
||||
ply:SetPos(Course_StartPos)
|
||||
ply:SetEyeAngles(Angle(0,Course_StartAng,0))
|
||||
ply:SetEyeAngles(Angle(0, Course_StartAng, 0))
|
||||
ply:SetLocalVelocity(vector_origin)
|
||||
timer.Simple(0.1, function() ply:SetLocalVelocity(vector_origin) ply:SetPos(Course_StartPos) end) --Failsafe
|
||||
|
||||
--Failsafe
|
||||
timer.Simple(0.1, function()
|
||||
ply:SetLocalVelocity(vector_origin)
|
||||
ply:SetPos(Course_StartPos)
|
||||
end)
|
||||
|
||||
ReplayStop(ply)
|
||||
ReplayStart(ply)
|
||||
end
|
||||
end
|
||||
|
||||
if !ply.InReplay and !CPSave then
|
||||
if not ply.InReplay and not CPSave then
|
||||
ply:SetNW2Float("CPNum", 1)
|
||||
end
|
||||
if !CPSave then
|
||||
ply.Course_StartTime = CurTime() + (2*faststartmult)
|
||||
|
||||
if not CPSave then
|
||||
ply.Course_StartTime = CurTime() + (2 * faststartmult)
|
||||
|
||||
net.Start("BeatrunSpawn")
|
||||
net.WriteFloat(CurTime())
|
||||
net.WriteBool(ply.InReplay)
|
||||
net.Send(ply)
|
||||
|
||||
ply.SpawnFreezeTime = CurTime() + (1.75*faststartmult)
|
||||
ply.SpawnFreezeTime = CurTime() + (1.75 * faststartmult)
|
||||
end
|
||||
|
||||
if !GetGlobalBool(GM_DATATHEFT) then
|
||||
if not GetGlobalBool(GM_DATATHEFT) then
|
||||
ply:SetCollisionGroup(COLLISION_GROUP_WEAPON)
|
||||
ply:SetCustomCollisionCheck(true)
|
||||
else
|
||||
|
@ -242,59 +250,61 @@ function PLAYER:Spawn()
|
|||
ply:SetCustomCollisionCheck(false)
|
||||
ply:DataTheft_Bank()
|
||||
end
|
||||
ply:SetAvoidPlayers(false)
|
||||
|
||||
ply:SetLaggedMovementValue( 0 ) --otherwise they drift off
|
||||
timer.Simple(0.1, function() ply:SetLaggedMovementValue( 1 ) end)
|
||||
ply:SetAvoidPlayers(false)
|
||||
ply:SetLaggedMovementValue(0) --otherwise they drift off
|
||||
|
||||
timer.Simple(0.1, function()
|
||||
ply:SetLaggedMovementValue(1)
|
||||
end)
|
||||
|
||||
if ply.SlideLoopSound and ply.SlideLoopSound.Stop then
|
||||
ply.SlideLoopSound:Stop()
|
||||
end
|
||||
|
||||
ply:ResetParkourState()
|
||||
|
||||
ply:SetOverdriveCharge(0)
|
||||
ply:SetOverdriveMult(1)
|
||||
|
||||
ply.LastSpawnTime = CurTime()
|
||||
end
|
||||
|
||||
hook.Add( "IsSpawnpointSuitable", "CheckSpawnPoint", function( ply, spawnpointent, bMakeSuitable )
|
||||
if !GetGlobalBool(GM_DATATHEFT) then return end
|
||||
hook.Add("IsSpawnpointSuitable", "CheckSpawnPoint", function(ply, spawnpointent, bMakeSuitable)
|
||||
if not GetGlobalBool(GM_DATATHEFT) then return end
|
||||
|
||||
local pos = spawnpointent:GetPos()
|
||||
|
||||
-- Note that we're searching the default hull size here for a player in the way of our spawning.
|
||||
-- This seems pretty rough, seeing as our player's hull could be different.. but it should do the job.
|
||||
-- (HL2DM kills everything within a 128 unit radius)
|
||||
local ents = ents.FindInBox( pos + Vector( -16, -16, 0 ), pos + Vector( 16, 16, 72 ) )
|
||||
|
||||
local ents = ents.FindInBox(pos + Vector(-16, -16, 0), pos + Vector(16, 16, 72))
|
||||
local Blockers = 0
|
||||
|
||||
for _, v in ipairs( ents ) do
|
||||
if ( v:IsPlayer() and v:Alive() ) then
|
||||
for _, v in ipairs(ents) do
|
||||
if v:IsPlayer() and v:Alive() then
|
||||
Blockers = Blockers + 1
|
||||
|
||||
if ( bMakeSuitable ) then
|
||||
if bMakeSuitable then
|
||||
v:Kill()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ( bMakeSuitable ) then return true end
|
||||
if ( Blockers > 0 ) then return false end
|
||||
if bMakeSuitable then return true end
|
||||
if Blockers > 0 then return false end
|
||||
|
||||
return true
|
||||
end)
|
||||
|
||||
hook.Add("SetupMove", "SpawnFreeze", function(ply, mv, cmd)
|
||||
if ply.SpawnFreezeTime and Course_Name != "" and Course_StartPos != vector_origin then
|
||||
if ply.SpawnFreezeTime and Course_Name ~= "" and Course_StartPos ~= vector_origin then
|
||||
if Course_StartPos and ply.SpawnFreezeTime > CurTime() then
|
||||
mv:SetOrigin(Course_StartPos)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
hook.Add( "ShouldCollide", "NoPlayerCollisions", function( ent1, ent2 )
|
||||
if ( ent1:IsPlayer() and (ent2:IsPlayer() or ent2.NoPlayerCollisions) ) then
|
||||
hook.Add("ShouldCollide", "NoPlayerCollisions", function(ent1, ent2)
|
||||
if ent1:IsPlayer() and (ent2:IsPlayer() or ent2.NoPlayerCollisions) then
|
||||
if ent2.BRCollisionFunc then
|
||||
return ent2:BRCollisionFunc(ent1)
|
||||
else
|
||||
|
@ -302,59 +312,47 @@ hook.Add( "ShouldCollide", "NoPlayerCollisions", function( ent1, ent2 )
|
|||
end
|
||||
end
|
||||
|
||||
if ( ent2:IsPlayer() and ent1:IsNPC() ) then
|
||||
return true
|
||||
end
|
||||
if ent2:IsPlayer() and ent1:IsNPC() then return true end
|
||||
end)
|
||||
|
||||
end )
|
||||
|
||||
hook.Add( "PhysgunPickup", "AllowPlayerPickup", function( ply, ent )
|
||||
if ( ply:IsSuperAdmin() and ent:IsPlayer() ) then
|
||||
return true
|
||||
end
|
||||
end )
|
||||
hook.Add("PhysgunPickup", "AllowPlayerPickup", function(ply, ent)
|
||||
if ply:IsSuperAdmin() and ent:IsPlayer() then return true end
|
||||
end)
|
||||
|
||||
function PLAYER:ShouldDrawLocal()
|
||||
|
||||
if ( self.TauntCam:ShouldDrawLocalPlayer( self.Player, self.Player:IsPlayingTaunt() ) ) then return true end
|
||||
|
||||
if self.TauntCam:ShouldDrawLocalPlayer(self.Player, self.Player:IsPlayingTaunt()) then return true end
|
||||
end
|
||||
|
||||
function PLAYER:CreateMove( cmd )
|
||||
|
||||
if ( self.TauntCam:CreateMove( cmd, self.Player, self.Player:IsPlayingTaunt() ) ) then return true end
|
||||
|
||||
function PLAYER:CreateMove(cmd)
|
||||
if self.TauntCam:CreateMove(cmd, self.Player, self.Player:IsPlayingTaunt()) then return true end
|
||||
end
|
||||
|
||||
function PLAYER:CalcView( view )
|
||||
|
||||
if ( self.TauntCam:CalcView( view, self.Player, self.Player:IsPlayingTaunt() ) ) then return true end
|
||||
|
||||
function PLAYER:CalcView(view)
|
||||
if self.TauntCam:CalcView(view, self.Player, self.Player:IsPlayingTaunt()) then return true end
|
||||
end
|
||||
|
||||
function PLAYER:GetHandsModel()
|
||||
local cl_playermodel = self.Player:GetInfo("cl_playermodel")
|
||||
|
||||
local cl_playermodel = self.Player:GetInfo( "cl_playermodel" )
|
||||
return player_manager.TranslatePlayerHands( cl_playermodel )
|
||||
|
||||
return player_manager.TranslatePlayerHands(cl_playermodel)
|
||||
end
|
||||
|
||||
function PLAYER:StartMove( move )
|
||||
|
||||
function PLAYER:StartMove(move)
|
||||
end
|
||||
|
||||
function PLAYER:FinishMove( move )
|
||||
|
||||
function PLAYER:FinishMove(move)
|
||||
end
|
||||
|
||||
hook.Add("FinishMove", "BeatrunRHVelocity", function(ply, mv)
|
||||
local activewep = ply:GetActiveWeapon()
|
||||
if IsValid(activewep) and activewep:GetClass()=="runnerhands" and activewep.SetOwnerVelocity then
|
||||
|
||||
if IsValid(activewep) and activewep:GetClass() == "runnerhands" and activewep.SetOwnerVelocity then
|
||||
activewep:SetOwnerVelocity(math.Round(mv:GetVelocity():Length()))
|
||||
end
|
||||
end)
|
||||
|
||||
local meta = FindMetaTable("Player")
|
||||
|
||||
function meta:ResetParkourState()
|
||||
self:SetSliding(false)
|
||||
self:SetCrouchJump(false)
|
||||
|
@ -382,7 +380,7 @@ function meta:ResetParkourState()
|
|||
self:SetMeleeDelay(0)
|
||||
self:SetJumpTurn(false)
|
||||
self:SetDive(false)
|
||||
self:SetViewOffsetDucked(Vector(0,0,32))
|
||||
self:SetViewOffsetDucked(Vector(0, 0, 32))
|
||||
|
||||
self.Swingrope = nil
|
||||
self.DiveSliding = false
|
||||
|
@ -423,7 +421,7 @@ end
|
|||
|
||||
function meta:LoadParkourState()
|
||||
local save = self.ParkourSave
|
||||
if !save then return end
|
||||
if not save then return end
|
||||
|
||||
self:SetSliding(save[1])
|
||||
self:SetCrouchJump(save[2])
|
||||
|
@ -464,8 +462,9 @@ function meta:ResetParkourTimes()
|
|||
end
|
||||
|
||||
function meta:InOverdrive()
|
||||
if !self.GetOverdriveMult then return false end
|
||||
return self:GetOverdriveMult() != 1
|
||||
if not self.GetOverdriveMult then return false end
|
||||
|
||||
return self:GetOverdriveMult() ~= 1
|
||||
end
|
||||
|
||||
function meta:GetRolling()
|
||||
|
@ -484,4 +483,4 @@ hook.Add("PlayerSpawn", "ResetStateTransition", function(ply, transition)
|
|||
end)
|
||||
end)
|
||||
|
||||
player_manager.RegisterClass( "player_beatrun", PLAYER, "player_default" )
|
||||
player_manager.RegisterClass("player_beatrun", PLAYER, "player_default")
|
Loading…
Reference in a new issue