Added stats to menu bar for both avatars and other servers
Showing the changes to interface/src/main.cpp (1 of 1 file). Show all
Unified · Split
| @@ -983,11 +983,18 @@ void display(void) · 982 unmodified lines | |||
| 983 | menu.render(WIDTH,HEIGHT); | 983 | menu.render(WIDTH,HEIGHT); |
| 984 | } | 984 | } |
| 985 | 985 | ||
| 986 | // Draw number of nearby people always | 986 | // Stats at upper right of screen about who domain server is telling us about |
| 987 | glPointSize(1.0f); | 987 | glPointSize(1.0f); |
| 988 | char agents[100]; | 988 | char agents[100]; |
| 989 | sprintf(agents, "Agents: %ld\n", AgentList::getInstance()->getAgents().size()); | 989 | |
| 990 | drawtext(WIDTH-100,20, 0.10, 0, 1.0, 0, agents, 1, 0, 0); | 990 | int totalAgents = AgentList::getInstance()->getAgents().size(); |
| 991 | int totalAvatars = 0, totalServers = 0; | ||
| 992 | for (int i = 0; i < totalAgents; i++) { | ||
| 993 | (AgentList::getInstance()->getAgents()[i].getType() == AGENT_TYPE_INTERFACE) | ||
| 994 | ? totalAvatars++ : totalServers++; | ||
| 995 | } | ||
| 996 | sprintf(agents, "Servers: %d, Avatars: %d\n", totalServers, totalAvatars); | ||
| 997 | drawtext(WIDTH-150,20, 0.10, 0, 1.0, 0, agents, 1, 0, 0); | ||
| 991 | 998 | ||
| 992 | if (::paintOn) { | 999 | if (::paintOn) { |
| 993 | 1000 | ||