Make the surrounding spheres glow when moving, too.

This commit is contained in:
Andrzej Kapolka 2013-08-22 14:00:50 -07:00
parent e67aee4b74
commit 3dfefefeae

View file

@ -486,6 +486,10 @@ void Avatar::render(bool lookingInMirror, bool renderAvatarBalls) {
// render a simple round on the ground projected down from the avatar's position
renderDiskShadow(_position, glm::vec3(0.0f, 1.0f, 0.0f), _scale * 0.1f, 0.2f);
{
// glow when moving
Glower glower(_moving ? 1.0f : 0.0f);
// render body
renderBody(lookingInMirror, renderAvatarBalls);
@ -503,6 +507,7 @@ void Avatar::render(bool lookingInMirror, bool renderAvatarBalls) {
glutSolidSphere(1.2f + _head.getAverageLoudness() * .0005f, 20, 20);
glPopMatrix();
}
}
// Render the balls
if (_balls) {
@ -697,9 +702,6 @@ float Avatar::getBallRenderAlpha(int ball, bool lookingInMirror) const {
void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
// glow when moving
Glower glower(_moving ? 1.0f : 0.0f);
if (_head.getFace().isFullFrame()) {
// Render the full-frame video
float alpha = getBallRenderAlpha(BODY_BALL_HEAD_BASE, lookingInMirror);