Fix skin load

This commit is contained in:
Jupeyy 2020-10-12 12:31:43 +02:00
parent 1d961a262f
commit ec16abdb54

View file

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