Preventing render bug with mis-scaled mouth (part of screen all black)

This commit is contained in:
Philip Rosedale 2013-05-15 10:00:30 -07:00
parent 124f04820e
commit 72d657b51d

View file

@ -297,9 +297,10 @@ void Head::render(bool lookingInMirror, float bodyYaw) {
glColor3f(0,0,0);
glRotatef(mouthPitch, 1, 0, 0);
glRotatef(mouthYaw, 0, 0, 1);
if (averageLoudness > 1.f) {
glScalef(mouthWidth * (.7f + sqrt(averageLoudness) /60.f),
mouthHeight * (1.f + sqrt(averageLoudness) /30.f), 1);
if ((averageLoudness > 1.f) && (averageLoudness < 10000.f)) {
glScalef(mouthWidth * (.7f + sqrt(averageLoudness) / 60.f),
mouthHeight * (1.f + sqrt(averageLoudness) / 30.f), 1);
} else {
glScalef(mouthWidth, mouthHeight, 1);
}