aboutsummaryrefslogtreecommitdiff
path: root/src/Person.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Person.cpp')
-rw-r--r--src/Person.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Person.cpp b/src/Person.cpp
index f7066b2..b431b02 100644
--- a/src/Person.cpp
+++ b/src/Person.cpp
@@ -782,13 +782,13 @@ float* determine_color(int model, int who, int whichcostume)
{
switch (model) {
case 0:
- if (who || thirdperson)
+ if (who != 0 || thirdperson)
return costume[whichcostume].headcolor;
- else if (!who && thirdperson)
- return nullptr;
+ break;
case 1:
- if (who || thirdperson)
+ if (who != 0 || thirdperson)
return costume[whichcostume].chestcolor;
+ break;
case 2:
return costume[whichcostume].abdomencolor;
case 3:
@@ -803,9 +803,8 @@ float* determine_color(int model, int who, int whichcostume)
return costume[whichcostume].lowerlegcolor;
case 8:
return costume[whichcostume].footcolor;
- default:
- return nullptr;
}
+ return nullptr;
}
void draw_joint(Joint& joint, int who, int whichcostume)
@@ -824,7 +823,7 @@ void draw_joint(Joint& joint, int who, int whichcostume)
auto& model = joint.modelnum;
if (auto color = determine_color(model, who, whichcostume))
skeletonmodels[model].draw(*color, color[1], color[2]);
- else
+ if (model == 0 && who == 0 && thirdperson)
skeletonmodels[9].draw();
glPopMatrix();
}
@@ -846,7 +845,7 @@ void draw_muscle(Muscle& mus, int who, int whichcostume)
auto& model = mus.parent1->modelnum;
if (auto color = determine_color(model, who, whichcostume))
skeletonmodels[model].draw(*color, color[1], color[2]);
- else
+ if (model == 0 && who == 0 && thirdperson)
skeletonmodels[9].draw();
glPopMatrix();
}