You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test2= ( isElementStreamedIn(foundElement) and ((notgetElementData(foundElement, dataName)) orgetElementData(foundElement, dataName) ~=id) )
283
-
end
284
-
285
-
286
-
if (notisElement(foundElement)) ortest1ortest2then
284
+
ifnotoneStreamedInthen
287
285
288
286
localworked=engineFreeModel(allocated_id)
289
287
@@ -292,32 +290,26 @@ function freeElementCustomMod(id)
292
290
r,g,b=252, 44, 3
293
291
end
294
292
295
-
iftest1then
296
-
outputDebugString("["..(eventnameor"?").."] Freed allocated ID "..allocated_id.." for mod ID "..id..": element not streamed in", 0, r,g,b)
297
-
elseiftest2then
298
-
outputDebugString("["..(eventnameor"?").."] Freed allocated ID "..allocated_id.." for mod ID "..id..": element streamed in with different custom model or default model", r,g,b)
299
-
else
300
-
outputDebugString("["..(eventnameor"?").."] Freed allocated ID "..allocated_id.." for mod ID "..id..": no element found", 0,r,g,b)
301
-
end
293
+
outputDebugString("["..(enor"?").."] Freed allocated ID "..allocated_id.." for mod ID "..id..": none streamed in", 0,r,g,b)
302
294
303
295
-- local count = 0
304
296
fork, elementinpairs(model_elements[allocated_id] or {}) do
305
297
ifisElement(element) then
306
-
ifdestroyElement(element) then
298
+
destroyElement(element)
299
+
-- if destroyElement(element) then
307
300
-- count = count + 1
308
-
end
301
+
--end
309
302
end
310
303
end
311
304
model_elements[allocated_id] =nil
312
-
-- outputDebugString("["..(eventname or "?").."] Destroyed "..count.." dff/txd/col elements of allocated ID "..allocated_id, 0,227, 255, 117)
313
-
314
305
allocated_ids[id] =nil
315
306
else
316
-
-- outputDebugString("["..(eventname or "?").."] Not freeing allocated ID "..allocated_id.." for mod ID "..id, 0,227, 255, 117)
307
+
-- outputDebugString("["..(en or "?").."] Not freeing allocated ID "..allocated_id.." for mod ID "..id, 0,227, 255, 117)
317
308
end
318
309
319
310
atimers[id] =nil
320
-
end, adelay, 1)
311
+
312
+
end, adelay, 1, id2, et2, eventName)
321
313
end
322
314
323
315
functionhasOtherElementsWithModel(element, id)
@@ -602,7 +594,7 @@ end
602
594
functionreceiveModList(modList)
603
595
received_modlist=modList
604
596
605
-
outputDebugString("Client received mod list", 0, 115, 236, 255)
597
+
outputDebugString("Received mod list on client", 0, 115, 236, 255)
606
598
triggerEvent(resName..":onMapListReceived", localPlayer) -- for other resources to handle
0 commit comments