equal
deleted
inserted
replaced
182 // Packet: CLIENT_CHAT |
182 // Packet: CLIENT_CHAT |
183 // Function: Send a chat-packet to the serve |
183 // Function: Send a chat-packet to the serve |
184 // Data: |
184 // Data: |
185 // uint8: ActionID (see network_data.h, NetworkAction) |
185 // uint8: ActionID (see network_data.h, NetworkAction) |
186 // uint8: Destination Type (see network_data.h, DestType); |
186 // uint8: Destination Type (see network_data.h, DestType); |
187 // uint8: Destination Player (1..MAX_PLAYERS) |
187 // uint16: Destination Player |
188 // String: Message (max MAX_TEXT_MSG_LEN) |
188 // String: Message (max MAX_TEXT_MSG_LEN) |
189 // |
189 // |
190 |
190 |
191 Packet *p = NetworkSend_Init(PACKET_CLIENT_CHAT); |
191 Packet *p = NetworkSend_Init(PACKET_CLIENT_CHAT); |
192 |
192 |
193 p->Send_uint8 (action); |
193 p->Send_uint8 (action); |
194 p->Send_uint8 (type); |
194 p->Send_uint8 (type); |
195 p->Send_uint8 (dest); |
195 p->Send_uint16(dest); |
196 p->Send_string(msg); |
196 p->Send_string(msg); |
197 MY_CLIENT->Send_Packet(p); |
197 MY_CLIENT->Send_Packet(p); |
198 } |
198 } |
199 |
199 |
200 // Send an error-packet over the network |
200 // Send an error-packet over the network |