Merge pull request #98 from PhilipRosedale/master

Added stats to menu bar for both avatars and other servers
This commit is contained in:
birarda 2013-04-22 13:23:09 -07:00
commit 79a178997d

View file

@ -983,11 +983,18 @@ void display(void)
menu.render(WIDTH,HEIGHT);
}
// Draw number of nearby people always
// Stats at upper right of screen about who domain server is telling us about
glPointSize(1.0f);
char agents[100];
sprintf(agents, "Agents: %ld\n", AgentList::getInstance()->getAgents().size());
drawtext(WIDTH-100,20, 0.10, 0, 1.0, 0, agents, 1, 0, 0);
int totalAgents = AgentList::getInstance()->getAgents().size();
int totalAvatars = 0, totalServers = 0;
for (int i = 0; i < totalAgents; i++) {
(AgentList::getInstance()->getAgents()[i].getType() == AGENT_TYPE_INTERFACE)
? totalAvatars++ : totalServers++;
}
sprintf(agents, "Servers: %d, Avatars: %d\n", totalServers, totalAvatars);
drawtext(WIDTH-150,20, 0.10, 0, 1.0, 0, agents, 1, 0, 0);
if (::paintOn) {