mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-28 12:53: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
|
||||
local data = file.Read(dir .. v, "DATA")
|
||||
course = util.Decompress(data) or data
|
||||
local course = util.Decompress(data) or data
|
||||
|
||||
if course then
|
||||
course = util.JSONToTable(course)
|
||||
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()
|
||||
LocalPlayer():EmitSound("A_TT_CP_Positive.wav")
|
||||
LoadCourse(self.courseid)
|
||||
LocalPlayer():EmitSound("buttonclick.wav")
|
||||
LoadCourse(courseid)
|
||||
end
|
||||
|
||||
courseentry.greyed = sacheck
|
||||
|
|
|
@ -222,8 +222,8 @@ function PLAYER:Spawn()
|
|||
ply:SetPos(Course_StartPos)
|
||||
end)
|
||||
|
||||
ReplayStop(ply)
|
||||
ReplayStart(ply)
|
||||
-- ReplayStop(ply)
|
||||
-- ReplayStart(ply)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -301,23 +301,23 @@ function LoadCheckpointTime()
|
|||
return times or nil
|
||||
end
|
||||
|
||||
function SaveReplayData()
|
||||
local replay = util.Compress(util.TableToJSON(LocalPlayer().ReplayTicks))
|
||||
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||
-- function SaveReplayData()
|
||||
-- local replay = util.Compress(util.TableToJSON(LocalPlayer().ReplayTicks))
|
||||
-- local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||
|
||||
if not replay then return end
|
||||
-- if not replay then return end
|
||||
|
||||
file.CreateDir(dir)
|
||||
file.Write(dir .. Course_ID .. ".txt", replay)
|
||||
end
|
||||
-- file.CreateDir(dir)
|
||||
-- file.Write(dir .. Course_ID .. ".txt", replay)
|
||||
-- end
|
||||
|
||||
function LoadReplayData()
|
||||
local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||
local replay = file.Read(dir .. Course_ID .. ".txt")
|
||||
replay = replay and util.JSONToTable(util.Decompress(replay))
|
||||
-- function LoadReplayData()
|
||||
-- local dir = "beatrun/replays/" .. game.GetMap() .. "/"
|
||||
-- local replay = file.Read(dir .. Course_ID .. ".txt")
|
||||
-- replay = replay and util.JSONToTable(util.Decompress(replay))
|
||||
|
||||
return replay or nil
|
||||
end
|
||||
-- return replay or nil
|
||||
-- end
|
||||
|
||||
function StartCourse(spawntime)
|
||||
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
|
||||
local a = ents.Create("prop_physics")
|
||||
print(buildmode_props[v.model], v.model)
|
||||
|
||||
a:SetModel(buildmode_props[v.model])
|
||||
|
||||
CustomPropMat(a)
|
||||
|
@ -540,8 +540,6 @@ if SERVER then
|
|||
|
||||
LoadCheckpoints()
|
||||
|
||||
PrintTable(Checkpoints)
|
||||
|
||||
local a = ents.Create("tt_cp")
|
||||
a:SetPos(Vector(x, y, z))
|
||||
a:SetCPNum(table.Count(Checkpoints) + 1)
|
||||
|
@ -606,8 +604,6 @@ if SERVER then
|
|||
local crc = util.CRC(a)
|
||||
local data = util.JSONToTable(a)
|
||||
|
||||
PrintTable(data)
|
||||
|
||||
local props = data[1]
|
||||
local cp = data[2]
|
||||
local pos = data[3]
|
||||
|
@ -642,8 +638,6 @@ if SERVER then
|
|||
a:Spawn()
|
||||
|
||||
LoadCheckpoints()
|
||||
|
||||
print(k, v, a)
|
||||
end
|
||||
|
||||
if entities then
|
||||
|
@ -984,8 +978,6 @@ if CLIENT then
|
|||
net.SendToServer()
|
||||
|
||||
LoadCheckpoints()
|
||||
|
||||
Course_ID = id
|
||||
end
|
||||
|
||||
concommand.Add("Beatrun_LoadCourse", function(ply, cmd, args, argstr)
|
||||
|
|
Loading…
Reference in a new issue