DMFCBase::SendNetGameInfoSync Sends out a NetGame info sync packet to all the players
| 613 | // |
| 614 | // Sends out a NetGame info sync packet to all the players |
| 615 | void DMFCBase::SendNetGameInfoSync(int to_who) { |
| 616 | if (GetLocalRole() != LR_SERVER) |
| 617 | return; |
| 618 | |
| 619 | uint8_t data[MAX_GAME_DATA_SIZE]; |
| 620 | int count = 0; |
| 621 | StartPacket(data, SPID_NETGAMESYNC, &count); |
| 622 | |
| 623 | MultiAddByte(Netgame->packets_per_second, data, &count); |
| 624 | MultiAddByte((Netgame->flags & NF_KILLGOAL) ? 1 : 0, data, &count); |
| 625 | MultiAddByte((Netgame->flags & NF_TIMER) ? 1 : 0, data, &count); |
| 626 | |
| 627 | MultiAddUshort(Netgame->timelimit, data, &count); |
| 628 | MultiAddUshort(Netgame->killgoal, data, &count); |
| 629 | MultiAddUshort(Netgame->respawn_time, data, &count); |
| 630 | MultiAddUshort(Netgame->max_players, data, &count); |
| 631 | |
| 632 | SendPacket(data, count, to_who); |
| 633 | } |
| 634 | |
| 635 | // DMFCBase::ReceiveNetGameInfoSync |
| 636 | // |
no test coverage detected