From b649ab6c16c6275c9ef9c21b2971d410ffd5b0db Mon Sep 17 00:00:00 2001 From: Alfred Eriksson Date: Mon, 1 Sep 2008 18:17:01 +0000 Subject: merged teambalance-warning and mini-/maximize-stuff from 0.4.3 --- src/game/client/gameclient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game/client/gameclient.cpp') 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; -- cgit 1.4.1