mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge pull request #2648 from Atlante45/glow_when_talking
Modified max glow + don't glow you own avatar
This commit is contained in:
commit
fbb0e01f2c
1 changed files with 7 additions and 3 deletions
|
@ -211,9 +211,13 @@ void Avatar::render(const glm::vec3& cameraPosition, RenderMode renderMode) {
|
|||
// glow when moving far away
|
||||
const float GLOW_DISTANCE = 20.0f;
|
||||
const float GLOW_MAX_LOUDNESS = 2500.0f;
|
||||
const float MAX_GLOW = 0.7f;
|
||||
const float GLOW_FROM_AVERAGE_LOUDNESS = MAX_GLOW * getHeadData()->getAudioLoudness() / GLOW_MAX_LOUDNESS;
|
||||
Glower glower(_moving && distanceToTarget > GLOW_DISTANCE && renderMode == NORMAL_RENDER_MODE ? 1.0f : GLOW_FROM_AVERAGE_LOUDNESS);
|
||||
const float MAX_GLOW = 0.5f;
|
||||
const float GLOW_FROM_AVERAGE_LOUDNESS = ((this == Application::getInstance()->getAvatar())
|
||||
? 0.0f
|
||||
: MAX_GLOW * getHeadData()->getAudioLoudness() / GLOW_MAX_LOUDNESS);
|
||||
Glower glower(_moving && distanceToTarget > GLOW_DISTANCE && renderMode == NORMAL_RENDER_MODE
|
||||
? 1.0f
|
||||
: GLOW_FROM_AVERAGE_LOUDNESS);
|
||||
|
||||
// render body
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::Avatars)) {
|
||||
|
|
Loading…
Reference in a new issue