DMFCBase::SendTeamAssignment A DMFC Special Packet function, this sends a team assignment packet to all the players. Server only. playernum = player to change teams team = new team
| 262 | // playernum = player to change teams |
| 263 | // team = new team |
| 264 | void DMFCBase::SendTeamAssignment(int playernum, int team, bool spew_onrespawn) { |
| 265 | if (GetLocalRole() != LR_SERVER) |
| 266 | return; |
| 267 | |
| 268 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 269 | int count = 0; |
| 270 | |
| 271 | StartPacket(data, SPID_TEAMASSIGNMENT, &count); |
| 272 | |
| 273 | MultiAddByte((spew_onrespawn) ? 1 : 0, data, &count); |
| 274 | MultiAddInt(playernum, data, &count); |
| 275 | MultiAddInt(team, data, &count); |
| 276 | |
| 277 | SendPacket(data, count, SP_ALL); |
| 278 | } |
| 279 | |
| 280 | // DMFCBase::GetTeamAssignmentPacket |
| 281 | // |
no test coverage detected