Fixed wrong skin color for amputations

This commit is contained in:
ZioPao
2024-05-15 11:47:28 +02:00
parent a1336c8d2e
commit 696edc1f1d

View File

@@ -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