From 6af0c7342a249436205ec2542d4cda380557c4e9 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 17 Oct 2020 22:46:41 +1100 Subject: [PATCH] Don't try to calculate uScale/vScale in Model_SetupState, because this is done in Model_ApplyTexture --- src/Model.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Model.c b/src/Model.c index ebaa5bd16..2e9a2571e 100644 --- a/src/Model.c +++ b/src/Model.c @@ -111,20 +111,19 @@ void Model_Render(struct Model* model, struct Entity* e) { void Model_SetupState(struct Model* model, struct Entity* e) { PackedCol col; - cc_bool _64x64; float yawDelta; model->index = 0; col = e->VTABLE->GetCol(e); + Models.Cols[0] = col; - _64x64 = e->SkinType != SKIN_64x32; - /* only apply when using humanoid skins */ - _64x64 &= model->usesHumanSkin || e->MobTextureId; - - Models.uScale = e->uScale * 0.015625f; - Models.vScale = e->vScale * (_64x64 ? 0.015625f : 0.03125f); + /* If a model forgets to call Model_ApplyTexture but still tries to draw, + /* then it is not using the model API properly. */ + /* So set uScale/vScale to ridiculous defaults to make it obvious */ + /* TODO: Remove setting this eventually */ + Models.uScale = 100.0f; + Models.vScale = 100.0f; - Models.Cols[0] = col; if (!e->NoShade) { Models.Cols[1] = PackedCol_Scale(col, PACKEDCOL_SHADE_YMIN); Models.Cols[2] = PackedCol_Scale(col, PACKEDCOL_SHADE_Z);