From ec16abdb544be55d6c3a3fcb9c9a3d04902cc6e5 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Mon, 12 Oct 2020 12:31:43 +0200 Subject: [PATCH] Fix skin load --- src/game/client/components/skins.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/skins.cpp b/src/game/client/components/skins.cpp index 03ce42626..b5e76ee90 100644 --- a/src/game/client/components/skins.cpp +++ b/src/game/client/components/skins.cpp @@ -138,7 +138,7 @@ int CSkins::LoadSkin(const char *pName, const char *pPath, int DirType, int *pGe for(int x = 0; x < BodySize; x++) { int v = d[y * Pitch + x * 4]; - if(OrgWeight == 0) + if(v <= OrgWeight && OrgWeight == 0) v = 0; else if(v <= OrgWeight) v = (int)(((v / (float)OrgWeight) * NewWeight));