|
From: <kon...@us...> - 2013-06-08 16:53:19
|
Revision: 22797
http://sourceforge.net/p/bzflag/code/22797
Author: kongr45gpen
Date: 2013-06-08 16:53:16 +0000 (Sat, 08 Jun 2013)
Log Message:
-----------
Don't show handicap values for observers
Modified Paths:
--------------
trunk/bzflag/src/bzfs/commands.cxx
Modified: trunk/bzflag/src/bzfs/commands.cxx
===================================================================
--- trunk/bzflag/src/bzfs/commands.cxx 2013-06-06 17:10:43 UTC (rev 22796)
+++ trunk/bzflag/src/bzfs/commands.cxx 2013-06-08 16:53:16 UTC (rev 22797)
@@ -1851,7 +1851,7 @@
const float maxhandicap = std::max(1.0f, BZDB.eval(StateDatabase::BZDB_HANDICAPSCOREDIFF)); // prevent division by zero below
for (int i = 0; i < curMaxPlayers; i++) {
GameKeeper::Player *p = GameKeeper::Player::getPlayerByIndex(i);
- if (p != NULL) {
+ if (p != NULL && !p->player.isObserver()) {
char reply[MessageLen];
snprintf(reply, MessageLen, "%-16s : %2d%%", p->player.getCallSign(), int(100.0 * std::min((float)p->score.getHandicap(), maxhandicap) / maxhandicap + 0.5));
sendMessage(ServerPlayer, t, reply);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|