mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
remove unnecessary shit
This commit is contained in:
parent
7dc92c5100
commit
11615053a9
6 changed files with 20 additions and 28 deletions
|
@ -53,16 +53,16 @@ function OpenCourseMenu()
|
||||||
|
|
||||||
for k, v in pairs(files) do
|
for k, v in pairs(files) do
|
||||||
local data = file.Read(dir .. v, "DATA")
|
local data = file.Read(dir .. v, "DATA")
|
||||||
course = util.Decompress(data) or data
|
local course = util.Decompress(data) or data
|
||||||
|
|
||||||
if course then
|
if course then
|
||||||
course = util.JSONToTable(course)
|
course = util.JSONToTable(course)
|
||||||
local courseentry = AEUI:AddText(courselist, course[5] or "ERROR", "AEUILarge", 10, 40 * #courselist.elements)
|
local courseentry = AEUI:AddText(courselist, course[5] or "ERROR", "AEUILarge", 10, 40 * #courselist.elements)
|
||||||
courseentry.courseid = v:Split(".txt")[1]
|
local courseid = v:Split(".txt")[1]
|
||||||
|
|
||||||
function courseentry:onclick()
|
function courseentry:onclick()
|
||||||
LocalPlayer():EmitSound("A_TT_CP_Positive.wav")
|
LocalPlayer():EmitSound("buttonclick.wav")
|
||||||
LoadCourse(self.courseid)
|
LoadCourse(courseid)
|
||||||
end
|
end
|
||||||
|
|
||||||
courseentry.greyed = sacheck
|
courseentry.greyed = sacheck
|
||||||
|
|
|
@ -222,8 +222,8 @@ function PLAYER:Spawn()
|
||||||
ply:SetPos(Course_StartPos)
|
ply:SetPos(Course_StartPos)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ReplayStop(ply)
|
-- ReplayStop(ply)
|
||||||
ReplayStart(ply)
|
-- ReplayStart(ply)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -301,23 +301,23 @@ function LoadCheckpointTime()
|
||||||
return times or nil
|
return times or nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function SaveReplayData()
|
-- function SaveReplayData()
|
||||||
local replay = util.Compress(util.TableToJSON(LocalPlayer().ReplayTicks))
|
-- local replay = util.Compress(util.TableToJSON(LocalPlayer().ReplayTicks))
|
||||||
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
-- local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||||
|
|
||||||
if not replay then return end
|
-- if not replay then return end
|
||||||
|
|
||||||
file.CreateDir(dir)
|
-- file.CreateDir(dir)
|
||||||
file.Write(dir .. Course_ID .. ".txt", replay)
|
-- file.Write(dir .. Course_ID .. ".txt", replay)
|
||||||
end
|
-- end
|
||||||
|
|
||||||
function LoadReplayData()
|
-- function LoadReplayData()
|
||||||
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
-- local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||||
local replay = file.Read(dir .. Course_ID .. ".txt")
|
-- local replay = file.Read(dir .. Course_ID .. ".txt")
|
||||||
replay = replay and util.JSONToTable(util.Decompress(replay))
|
-- replay = replay and util.JSONToTable(util.Decompress(replay))
|
||||||
|
|
||||||
return replay or nil
|
-- return replay or nil
|
||||||
end
|
-- end
|
||||||
|
|
||||||
function StartCourse(spawntime)
|
function StartCourse(spawntime)
|
||||||
local faststartmult = LocalPlayer():GetInfoNum("Beatrun_FastStart", 0) > 0 and 0.5 or 1
|
local faststartmult = LocalPlayer():GetInfoNum("Beatrun_FastStart", 0) > 0 and 0.5 or 1
|
||||||
|
|
|
@ -513,7 +513,7 @@ if SERVER then
|
||||||
|
|
||||||
for k, v in pairs(props) do
|
for k, v in pairs(props) do
|
||||||
local a = ents.Create("prop_physics")
|
local a = ents.Create("prop_physics")
|
||||||
print(buildmode_props[v.model], v.model)
|
|
||||||
a:SetModel(buildmode_props[v.model])
|
a:SetModel(buildmode_props[v.model])
|
||||||
|
|
||||||
CustomPropMat(a)
|
CustomPropMat(a)
|
||||||
|
@ -540,8 +540,6 @@ if SERVER then
|
||||||
|
|
||||||
LoadCheckpoints()
|
LoadCheckpoints()
|
||||||
|
|
||||||
PrintTable(Checkpoints)
|
|
||||||
|
|
||||||
local a = ents.Create("tt_cp")
|
local a = ents.Create("tt_cp")
|
||||||
a:SetPos(Vector(x, y, z))
|
a:SetPos(Vector(x, y, z))
|
||||||
a:SetCPNum(table.Count(Checkpoints) + 1)
|
a:SetCPNum(table.Count(Checkpoints) + 1)
|
||||||
|
@ -606,8 +604,6 @@ if SERVER then
|
||||||
local crc = util.CRC(a)
|
local crc = util.CRC(a)
|
||||||
local data = util.JSONToTable(a)
|
local data = util.JSONToTable(a)
|
||||||
|
|
||||||
PrintTable(data)
|
|
||||||
|
|
||||||
local props = data[1]
|
local props = data[1]
|
||||||
local cp = data[2]
|
local cp = data[2]
|
||||||
local pos = data[3]
|
local pos = data[3]
|
||||||
|
@ -642,8 +638,6 @@ if SERVER then
|
||||||
a:Spawn()
|
a:Spawn()
|
||||||
|
|
||||||
LoadCheckpoints()
|
LoadCheckpoints()
|
||||||
|
|
||||||
print(k, v, a)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if entities then
|
if entities then
|
||||||
|
@ -984,8 +978,6 @@ if CLIENT then
|
||||||
net.SendToServer()
|
net.SendToServer()
|
||||||
|
|
||||||
LoadCheckpoints()
|
LoadCheckpoints()
|
||||||
|
|
||||||
Course_ID = id
|
|
||||||
end
|
end
|
||||||
|
|
||||||
concommand.Add("Beatrun_LoadCourse", function(ply, cmd, args, argstr)
|
concommand.Add("Beatrun_LoadCourse", function(ply, cmd, args, argstr)
|
||||||
|
|
Loading…
Reference in a new issue