From 11d3cc5e24eeb193ea061597d9faedc64a93798c Mon Sep 17 00:00:00 2001 From: Fernando-A-Rocha Date: Wed, 31 Jul 2024 14:20:01 +0100 Subject: [PATCH] . --- newmodels_reborn/core/server.lua | 2 +- .../models/ped/7/{ => Mafioso 1}/-2.dff | Bin .../models/ped/7/{ => Mafioso 1}/-2.txd | Bin newmodels_reborn/optional/c_testing.lua | 13 ++++--------- 4 files changed, 5 insertions(+), 10 deletions(-) rename newmodels_reborn/models/ped/7/{ => Mafioso 1}/-2.dff (100%) rename newmodels_reborn/models/ped/7/{ => Mafioso 1}/-2.txd (100%) diff --git a/newmodels_reborn/core/server.lua b/newmodels_reborn/core/server.lua index 3f03027..0328fa9 100644 --- a/newmodels_reborn/core/server.lua +++ b/newmodels_reborn/core/server.lua @@ -79,7 +79,7 @@ local function loadModels() dff = info.dff, txd = info.txd, col = info.col, - name = info.name or getVehicleNameFromModel(baseModel) + name = info.name or "Unnamed" } end end diff --git a/newmodels_reborn/models/ped/7/-2.dff b/newmodels_reborn/models/ped/7/Mafioso 1/-2.dff similarity index 100% rename from newmodels_reborn/models/ped/7/-2.dff rename to newmodels_reborn/models/ped/7/Mafioso 1/-2.dff diff --git a/newmodels_reborn/models/ped/7/-2.txd b/newmodels_reborn/models/ped/7/Mafioso 1/-2.txd similarity index 100% rename from newmodels_reborn/models/ped/7/-2.txd rename to newmodels_reborn/models/ped/7/Mafioso 1/-2.txd diff --git a/newmodels_reborn/optional/c_testing.lua b/newmodels_reborn/optional/c_testing.lua index c363285..d88d28c 100644 --- a/newmodels_reborn/optional/c_testing.lua +++ b/newmodels_reborn/optional/c_testing.lua @@ -43,14 +43,10 @@ local function pairsByKeys(t) end local function getElementCustomModelString(element) - local customModel = tonumber(getElementData(element, getCustomModelDataKey("vehicle"))) + local customModel = tonumber(getElementData(element, getCustomModelDataKey(element))) if customModel and customModels[customModel] then local name, baseModel = customModels[customModel].name, customModels[customModel].baseModel - if name then - return ("%d \"%s\" (%d)"):format(customModel, name, baseModel) - else - return ("%d (%d)"):format(customModel, baseModel) - end + return ("%d \"%s\" (%d)"):format(customModel, name, baseModel) else return ("%d"):format(getElementModel(element)) end @@ -59,9 +55,7 @@ end local function updateDebugViewInfo() local loadedModelsStr = "" for customModel, v in pairsByKeys(loadedModels) do - local str - if v.name then str = ("%d \"%s\" (%d)"):format(customModel, v.name, v.baseModel) - else str = ("%d (%d)"):format(customModel, v.baseModel) end + local str = ("%d \"%s\" (%d)"):format(customModel, v.name, v.baseModel) if loadedModelsStr == "" then loadedModelsStr = str else @@ -106,6 +100,7 @@ local function toggleDebugView(cmd) addEventHandler("onClientRender", root, drawDebug, false) else if debugTimer and isTimer(debugTimer) then killTimer(debugTimer); debugTimer = nil end + streamedElements = {} removeEventHandler("onClientRender", root, drawDebug) end enabled = not enabled