Fix non power of two skins not rendering properly with humanoid models

This commit is contained in:
UnknownShadow200 2025-05-15 21:23:07 +10:00
parent 12ec05879e
commit 0c08ad12e6

View File

@ -941,8 +941,8 @@ static void HumanModel_DrawCore(struct Entity* e, struct ModelSet* model, cc_boo
int type, num; int type, num;
Model_ApplyTexture(e); Model_ApplyTexture(e);
type = Models.skinType; type = Models.skinType & 0x3;
set = &model->limbs[type & 0x3]; set = &model->limbs[type];
num = HUMAN_BASE_VERTICES + (type == SKIN_64x32 ? HUMAN_HAT32_VERTICES : HUMAN_HAT64_VERTICES); num = HUMAN_BASE_VERTICES + (type == SKIN_64x32 ? HUMAN_HAT32_VERTICES : HUMAN_HAT64_VERTICES);
Model_LockVB(e, num); Model_LockVB(e, num);