… | |
… | |
48 | */ |
48 | */ |
49 | static void |
49 | static void |
50 | esrv_print_msg (client *ns, int color, const char *str) |
50 | esrv_print_msg (client *ns, int color, const char *str) |
51 | { |
51 | { |
52 | ns->send_msg (color, "info", str); |
52 | ns->send_msg (color, "info", str); |
53 | } |
|
|
54 | |
|
|
55 | /** |
|
|
56 | * Draws an extended message on the client. |
|
|
57 | * ns the socket to send message to |
|
|
58 | * color color informations (used mainly if client does not support message type) |
|
|
59 | * type, |
|
|
60 | * subtype type and subtype of text message |
|
|
61 | * intro Intro message to send with main message if client does not support the message type |
|
|
62 | * message The main message |
|
|
63 | */ |
|
|
64 | static void |
|
|
65 | esrv_print_ext_msg (client *ns, int color, uint8 type, uint8 subtype, const char *message) |
|
|
66 | { |
|
|
67 | ns->send_packet_printf ("drawextinfo %d %u %u %s", color, type, subtype, message); |
|
|
68 | } |
53 | } |
69 | |
54 | |
70 | /** |
55 | /** |
71 | * Frontend for esrv_print_msg |
56 | * Frontend for esrv_print_msg |
72 | * \param colr message color |
57 | * \param colr message color |
… | |
… | |
192 | void |
177 | void |
193 | new_info_map_except (int color, maptile * map, object *op, const char *str) |
178 | new_info_map_except (int color, maptile * map, object *op, const char *str) |
194 | { |
179 | { |
195 | for_all_players (pl) |
180 | for_all_players (pl) |
196 | if (pl->ob->map == map && pl->ob != op) |
181 | if (pl->ob->map == map && pl->ob != op) |
197 | new_draw_info (color, 0, pl->ob, str); |
|
|
198 | } |
|
|
199 | |
|
|
200 | /** |
|
|
201 | * Writes to everyone on the map except op1 and op2 |
|
|
202 | */ |
|
|
203 | static void |
|
|
204 | new_info_map_except2 (int color, maptile * map, object *op1, object *op2, const char *str) |
|
|
205 | { |
|
|
206 | for_all_players (pl) |
|
|
207 | if (pl->ob->map == map && pl->ob != op1 && pl->ob != op2) |
|
|
208 | new_draw_info (color, 0, pl->ob, str); |
182 | new_draw_info (color, 0, pl->ob, str); |
209 | } |
183 | } |
210 | |
184 | |
211 | /** |
185 | /** |
212 | * Writes to everyone on the specified map |
186 | * Writes to everyone on the specified map |