diff options
| author | Alfred Eriksson <somerunce@gmail.com> | 2008-09-01 18:17:01 +0000 |
|---|---|---|
| committer | Alfred Eriksson <somerunce@gmail.com> | 2008-09-01 18:17:01 +0000 |
| commit | b649ab6c16c6275c9ef9c21b2971d410ffd5b0db (patch) | |
| tree | fe8f911031777913a9626081ff4ebdf5b7eba963 /src/game/client/gameclient.cpp | |
| parent | 67aa042dcbf9938896f20f47d2a778761efa4dcc (diff) | |
| download | zcatch-b649ab6c16c6275c9ef9c21b2971d410ffd5b0db.tar.gz zcatch-b649ab6c16c6275c9ef9c21b2971d410ffd5b0db.zip | |
merged teambalance-warning and mini-/maximize-stuff from 0.4.3
Diffstat (limited to 'src/game/client/gameclient.cpp')
| -rw-r--r-- | src/game/client/gameclient.cpp | 6 |
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; |