Fixed huge mistake with hairy bodies

This commit is contained in:
Pao
2023-01-31 23:00:15 +01:00
parent e13eee5aa5
commit 86a74915d5
6 changed files with 21 additions and 1 deletions

View File

@@ -1,3 +1,16 @@
0.9.7
- Now amputations should spawn in every case, damn hairs. Thanks Dev for the tip!
0.9.6
- Fixed a bug when handling zombie hitting amputated limbs
- Fixed sound looping incessantly after amputating a limb
- Changed how phantom pain occurs
- Fixes to new hook models
0.9.5
- No more Right Click menu. You'll have to use the TOC Menu from the Medical Check, except for Cheats
- Fixes to how amputations are handled

View File

@@ -1,6 +1,13 @@
function TocSetCorrectTextureForAmputation(item, player)
local human_visual = player:getHumanVisual()
local texture_string = human_visual:getSkinTexture()
-- Hairy bodies
if string.find(texture_string, "a$") then
texture_string = texture_string:sub(1, -2) -- Removes b at the end to make it compatible
end
local matched_index = string.match(texture_string, "%d$")
print("TOC: Setting texture " .. matched_index)
item:getVisual():setTextureChoice(tonumber(matched_index - 1)) -- TODO why is it correct with -1?

View File

@@ -5,5 +5,5 @@ description=Bitten? Not a problem!
id=Amputation2
icon=icon.png
url=https://github.com/ZioPao/The-Only-Cure-But-Better
modversion=0.9.5
modversion=0.9.7
pzversion=41.65

Binary file not shown.