mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
fix local big courses not loading
This commit is contained in:
parent
3b639323ef
commit
71526af34d
1 changed files with 5 additions and 3 deletions
|
@ -570,7 +570,9 @@ if SERVER then
|
||||||
function Beatrun_ReadCourseNet(len, ply)
|
function Beatrun_ReadCourseNet(len, ply)
|
||||||
if not ply:IsSuperAdmin() then return end
|
if not ply:IsSuperAdmin() then return end
|
||||||
|
|
||||||
Beatrun_ReadCourse(net.ReadData(len))
|
local data = util.Decompress(net.ReadData(len))
|
||||||
|
|
||||||
|
Beatrun_ReadCourse(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Beatrun_ReadCourseLocal(id)
|
function Beatrun_ReadCourseLocal(id)
|
||||||
|
@ -963,8 +965,8 @@ if CLIENT then
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function LoadCourse(id)
|
function LoadCourse(id)
|
||||||
local dir = "beatrun/courses/" .. game.GetMap() .. "/"
|
local dir = "beatrun/courses/" .. string.Replace(game.GetMap(), " ", "-") .. "/"
|
||||||
local save = file.Read(dir .. id .. ".txt", "DATA")
|
local save = util.Compress(file.Read(dir .. id .. ".txt", "DATA"))
|
||||||
|
|
||||||
if not save then
|
if not save then
|
||||||
print("NON-EXISTENT SAVE: ", id)
|
print("NON-EXISTENT SAVE: ", id)
|
||||||
|
|
Loading…
Reference in a new issue