================ idGameLocal::ServerSendChatMessage ================ */
| 768 | ================ |
| 769 | */ |
| 770 | void idGameLocal::ServerSendChatMessage( int to, const char *name, const char *text ) { |
| 771 | idBitMsg outMsg; |
| 772 | byte msgBuf[ MAX_GAME_MESSAGE_SIZE ]; |
| 773 | |
| 774 | outMsg.Init( msgBuf, sizeof( msgBuf ) ); |
| 775 | outMsg.BeginWriting(); |
| 776 | outMsg.WriteByte( GAME_RELIABLE_MESSAGE_CHAT ); |
| 777 | outMsg.WriteString( name ); |
| 778 | outMsg.WriteString( text, -1, false ); |
| 779 | networkSystem->ServerSendReliableMessage( to, outMsg ); |
| 780 | |
| 781 | if ( to == -1 || to == localClientNum ) { |
| 782 | mpGame.AddChatLine( "%s^0: %s\n", name, text ); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | /* |
| 787 | ================ |
no test coverage detected