| 876 | { |
| 877 | // create message |
| 878 | NetworkMessageType type = _playerRoles[i].GetNMType(NMCCreate); |
| 879 | NetworkMessageFormatBase* format = GetFormat(type); |
| 880 | Ref<NetworkMessage> msg = new NetworkMessage(); |
| 881 | msg->time = Glob.time; |
| 882 | NetworkMessageContext ctx(msg, format, this, to, MSG_SEND); |
| 883 | |
| 884 | NET_ERROR(dynamic_cast<const IndicesPlayerRole*>(ctx.GetIndices())) |
| 885 | const IndicesPlayerRole* indices = static_cast<const IndicesPlayerRole*>(ctx.GetIndices()); |
| 886 | |
| 887 | TMError err; |
| 888 | err = ctx.IdxTransfer(indices->index, i); |
| 889 | if (err != TMOK) |
| 890 | { |
| 891 | continue; |
| 892 | } |
| 893 | err = _playerRoles[i].TransferMsg(ctx); |
| 894 | if (err != TMOK) |
| 895 | { |
| 896 | continue; |
| 897 | } |
| 898 | |
| 899 | // send message |
| 900 | NetworkComponent::SendMsg(to, msg, type, NMFGuaranteed); |
| 901 | } |
| 902 | |
| 903 | if (!onlyPlayers) |
| 904 | { |
| 905 | MissionParamsMessage msg; |
| 906 | msg._param1 = _param1; |
| 907 | msg._param2 = _param2; |
| 908 | SendMsg(to, &msg, NMFGuaranteed); |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | namespace Poseidon |
| 913 | { |
| 914 | void Encrypt(QOStream& out, const unsigned char* publicKey, int keySize); |
| 915 | } |
| 916 | |
| 917 | bool NetworkServer::IsDedicatedBotClient(int dpnid) const |
| 918 | { |