mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix NaN in LoadSkin
This commit is contained in:
parent
b93896b37c
commit
331249ed89
|
@ -97,8 +97,10 @@ int CSkins::LoadSkin(const char *pName, const char *pPath, int DirType, int *pGe
|
|||
aColors[2] += d[y * Pitch + x * 4 + 2];
|
||||
}
|
||||
}
|
||||
|
||||
if(aColors[0] != 0 && aColors[1] != 0 && aColors[2] != 0)
|
||||
Skin.m_BloodColor = ColorRGBA(normalize(vec3(aColors[0], aColors[1], aColors[2])));
|
||||
else
|
||||
Skin.m_BloodColor = ColorRGBA(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
// create colorless version
|
||||
|
|
Loading…
Reference in a new issue