Final update

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-01-06 16:20:55 +07:00
parent 869135a10c
commit 766b32b1b4
8 changed files with 24 additions and 14 deletions

View File

@@ -787,9 +787,11 @@ function draw.norm(P,repMode)
gc_scale(P.size)
-- Draw username
setFont(30)
gc_setColor(GROUP_COLORS[P.group])
GC.mStr(P.username or USERS.getUsername(P.uid),300,-60)
if usingMod() and P.frameRun>480 then
setFont(30)
gc_setColor(GROUP_COLORS[P.group])
GC.mStr(P.username or USERS.getUsername(P.uid),300,-60)
end
-- Draw HUD
if ENV.nextCount>0 then _drawNext(P,repMode) end

View File

@@ -182,7 +182,7 @@ local function _executeMod(P)
if not GAME.modCodeList[P.id] then GAME.modCodeList[P.id]={} end
if not GAME.applyModTask then
function GAME.ApplyModsTask()
function GAME.applyModsTask()
while GAME.playing do
for _,p in pairs(GAME.modCodeList) do
for _,c in pairs(p) do pcall(c) end
@@ -190,12 +190,12 @@ local function _executeMod(P)
coroutine.yield()
end
-- Kill mod patching function when game stopped
TASK.removeTask_code(GAME.ApplyModsTask)
TABLE.cut(GAME.modCodeList)
TABLE.clear(GAME.modCodeList)
TASK.removeTask_code(GAME.applyModsTask)
GAME.modCodeList=nil
GAME.ApplyModsTask=nil
GAME.applyModsTask=nil
end
TASK.new(GAME.ApplyModsTask)
TASK.new(GAME.applyModsTask)
end
end

View File

@@ -2786,7 +2786,7 @@ function Player:_die()
end
end
end
if GAME.ApplyModsTask then
if GAME.applyModsTask then
TABLE.cut(GAME.modCodeList[self.id])
end
end