diff --git a/media/lua/client/TOC/Controllers/ItemsController.lua b/media/lua/client/TOC/Controllers/ItemsController.lua index 7b81d88..f539e6c 100644 --- a/media/lua/client/TOC/Controllers/ItemsController.lua +++ b/media/lua/client/TOC/Controllers/ItemsController.lua @@ -21,7 +21,8 @@ function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatriz local textureString = playerObj:getHumanVisual():getSkinTexture() local isHairy = textureString:sub(-1) == "a" - local matchedIndex = tonumber(textureString:match("%d$")) or 0 + local matchedIndex = tonumber(textureString:match("%d%d")) -- it must always be at least 1 + TOC_DEBUG.print("Texture string: " .. tostring(textureString)) if isHairy then matchedIndex = matchedIndex + 5 @@ -31,7 +32,7 @@ function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatriz matchedIndex = matchedIndex + (isHairy and 5 or 10) -- We add 5 is it's the texture, else 10 end - TOC_DEBUG.print("isCicatrized= " .. tostring(isCicatrized)) + TOC_DEBUG.print("isCicatrized = " .. tostring(isCicatrized)) TOC_DEBUG.print("Amputation Texture Index: " .. tostring(matchedIndex)) return matchedIndex - 1 end