about summary refs log tree commit diff
path: root/src/game/client/gameclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/client/gameclient.cpp')
-rw-r--r--src/game/client/gameclient.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp
index 6403873a..5efc9413 100644
--- a/src/game/client/gameclient.cpp
+++ b/src/game/client/gameclient.cpp
@@ -501,6 +501,7 @@ void GAMECLIENT::on_snapshot()
 	{
 		// 1. fetch local player
 		// 2. set him to the center
+		gameclient.snap.team_size[0] = gameclient.snap.team_size[1] = 0;
 		int num = snap_num_items(SNAP_CURRENT);
 		for(int i = 0; i < num; i++)
 		{
@@ -527,6 +528,11 @@ void GAMECLIENT::on_snapshot()
 							gameclient.snap.local_prev_character = (NETOBJ_CHARACTER *)p;
 					}
 				}
+				
+				// calculate team-balance
+				if(info->team != -1)
+					gameclient.snap.team_size[info->team]++;
+				
 			}
 			else if(item.type == NETOBJTYPE_GAME)
 				gameclient.snap.gameobj = (NETOBJ_GAME *)data;