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