push and pop when drawing agent heads

This commit is contained in:
Stephen Birarda 2013-02-21 16:55:20 -08:00
parent 5d8ece7867
commit e7fc997f78

View file

@ -586,10 +586,11 @@ void display(void)
for(std::vector<Agent>::iterator agent = agentList.agents.begin(); agent != agentList.agents.end(); agent++) {
if (agent->linkedData != NULL) {
Head *agentHead = (Head *)agent->linkedData;
glPushMatrix();
glm::vec3 pos = agentHead->getPos();
glTranslatef(-pos.x, -pos.y, -pos.z);
agentHead->render(0, &location[0]);
glPopMatrix();
}
}