| 2529 | enterUsr(); |
| 2530 | if (to == DPNID_ALL_PLAYERS_GROUP) |
| 2531 | { // broadcast to all players |
| 2532 | #ifdef NET_LOG_SERVER_SEND |
| 2533 | NetLog("Peer(%u): NetServer::SendMsg: broadcast to all players", getServerPeer()->getPeerId()); |
| 2534 | #endif |
| 2535 | IteratorState it; |
| 2536 | if (users.getFirst(it, channel)) |
| 2537 | { |
| 2538 | do |
| 2539 | { |
| 2540 | msg = NetMessagePool::pool()->newMessage(bufferSize, channel); |
| 2541 | if (!msg) |
| 2542 | { |
| 2543 | leaveUsr(); |
| 2544 | RptF("NetServer: pool()->newMessage failed when sending to %d", to); |
| 2545 | return false; |
| 2546 | } |
| 2547 | msg->setFlags(MSG_ALL_FLAGS, fl); |
| 2548 | if (fl) |
| 2549 | { |
| 2550 | msg->setOrderedPrevious(); // VIM is set ORDERED automatically |
no test coverage detected