From 11615053a91bc4afe36f91a8b108ecb22660c1d2 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Fri, 16 Jun 2023 18:49:23 +0500 Subject: [PATCH] remove unnecessary shit --- .../beatrun/gamemode/cl/Menu_Course.lua | 8 +++--- .../gamemode/player_class/player_beatrun.lua | 4 +-- .../beatrun/gamemode/sh/Checkpoints.lua | 26 +++++++++---------- .../beatrun/gamemode/sh/{ => off}/Replay.lua | 0 .../beatrun/gamemode/sh/sh_buildmode.lua | 10 +------ .../beatrun/gamemode/sv/{ => off}/Replay.lua | 0 6 files changed, 20 insertions(+), 28 deletions(-) rename beatrun/gamemodes/beatrun/gamemode/sh/{ => off}/Replay.lua (100%) rename beatrun/gamemodes/beatrun/gamemode/sv/{ => off}/Replay.lua (100%) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/Menu_Course.lua b/beatrun/gamemodes/beatrun/gamemode/cl/Menu_Course.lua index 9517379..919a1a9 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/Menu_Course.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/Menu_Course.lua @@ -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 diff --git a/beatrun/gamemodes/beatrun/gamemode/player_class/player_beatrun.lua b/beatrun/gamemodes/beatrun/gamemode/player_class/player_beatrun.lua index ee47f1b..3e933f2 100644 --- a/beatrun/gamemodes/beatrun/gamemode/player_class/player_beatrun.lua +++ b/beatrun/gamemodes/beatrun/gamemode/player_class/player_beatrun.lua @@ -222,8 +222,8 @@ function PLAYER:Spawn() ply:SetPos(Course_StartPos) end) - ReplayStop(ply) - ReplayStart(ply) + -- ReplayStop(ply) + -- ReplayStart(ply) end end diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua index 855f370..141f09f 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/Checkpoints.lua @@ -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 diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/Replay.lua b/beatrun/gamemodes/beatrun/gamemode/sh/off/Replay.lua similarity index 100% rename from beatrun/gamemodes/beatrun/gamemode/sh/Replay.lua rename to beatrun/gamemodes/beatrun/gamemode/sh/off/Replay.lua diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua b/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua index 8ef94c2..1ab5b8e 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/sh_buildmode.lua @@ -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) diff --git a/beatrun/gamemodes/beatrun/gamemode/sv/Replay.lua b/beatrun/gamemodes/beatrun/gamemode/sv/off/Replay.lua similarity index 100% rename from beatrun/gamemodes/beatrun/gamemode/sv/Replay.lua rename to beatrun/gamemodes/beatrun/gamemode/sv/off/Replay.lua