Enhance log file handling
This commit is contained in:
parent
c11fdadfad
commit
c3866b5008
|
@ -21,9 +21,11 @@ blacklistObjects = {}
|
|||
-- blacklistObjects[7323] = true
|
||||
tempObj = false
|
||||
|
||||
logpath = "log.txt"
|
||||
if fileExists(logpath) then fileDelete(logpath) end
|
||||
logfile = fileCreate(logpath)
|
||||
if debugToggle then
|
||||
logpath = "log.txt"
|
||||
logfile = fileCreate(logpath)
|
||||
end
|
||||
|
||||
function registerCollisionArchive(path)
|
||||
cols = engineGetCOLsFromLibrary(path)
|
||||
|
@ -153,5 +155,8 @@ addEventHandler("onClientResourceStop",root,function(res)
|
|||
for key,_ in pairs(objectRegister) do
|
||||
engineFreeModel(objectRegister[key]["realID"])
|
||||
end
|
||||
if debugToggle then
|
||||
fileClose(logpath)
|
||||
end
|
||||
end
|
||||
end)
|
Loading…
Reference in New Issue