mirror of
https://github.com/lubosz/overte.git
synced 2025-04-17 17:26:11 +02:00
Only render the Perlin face for the local user.
This commit is contained in:
parent
a4f79390f4
commit
262365f15f
4 changed files with 7 additions and 7 deletions
|
@ -723,7 +723,7 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
|||
// Always render other people, and render myself when beyond threshold distance
|
||||
if (b == BODY_BALL_HEAD_BASE) { // the head is rendered as a special
|
||||
if (alpha > 0.0f) {
|
||||
_head.render(alpha);
|
||||
_head.render(alpha, false);
|
||||
}
|
||||
} else if (alpha > 0.0f) {
|
||||
// Render the body ball sphere
|
||||
|
@ -767,7 +767,7 @@ void Avatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
|||
float alpha = getBallRenderAlpha(BODY_BALL_HEAD_BASE, lookingInMirror);
|
||||
if (alpha > 0.0f) {
|
||||
_voxels.render(false);
|
||||
_head.render(alpha);
|
||||
_head.render(alpha, false);
|
||||
}
|
||||
}
|
||||
_hand.render(lookingInMirror);
|
||||
|
|
|
@ -322,7 +322,7 @@ void Head::calculateGeometry() {
|
|||
+ up * _scale * NOSE_UPTURN;
|
||||
}
|
||||
|
||||
void Head::render(float alpha) {
|
||||
void Head::render(float alpha, bool isMine) {
|
||||
_renderAlpha = alpha;
|
||||
|
||||
if (!_face.render(alpha)) {
|
||||
|
@ -331,7 +331,7 @@ void Head::render(float alpha) {
|
|||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::UsePerlinFace)) {
|
||||
if (Menu::getInstance()->isOptionChecked(MenuOption::UsePerlinFace) && isMine) {
|
||||
_perlinFace.render();
|
||||
} else {
|
||||
renderMohawk();
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
void init();
|
||||
void reset();
|
||||
void simulate(float deltaTime, bool isMine, float gyroCameraSensitivity);
|
||||
void render(float alpha);
|
||||
void render(float alpha, bool isMine);
|
||||
void renderMohawk();
|
||||
|
||||
void setScale(float scale);
|
||||
|
|
|
@ -557,7 +557,7 @@ void MyAvatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
|||
// Always render other people, and render myself when beyond threshold distance
|
||||
if (b == BODY_BALL_HEAD_BASE) { // the head is rendered as a special
|
||||
if (alpha > 0.0f) {
|
||||
_head.render(alpha);
|
||||
_head.render(alpha, true);
|
||||
}
|
||||
} else if (alpha > 0.0f) {
|
||||
// Render the body ball sphere
|
||||
|
@ -614,7 +614,7 @@ void MyAvatar::renderBody(bool lookingInMirror, bool renderAvatarBalls) {
|
|||
float alpha = getBallRenderAlpha(BODY_BALL_HEAD_BASE, lookingInMirror);
|
||||
if (alpha > 0.0f) {
|
||||
_voxels.render(false);
|
||||
_head.render(alpha);
|
||||
_head.render(alpha, true);
|
||||
}
|
||||
}
|
||||
_hand.render(lookingInMirror);
|
||||
|
|
Loading…
Reference in a new issue