… | |
… | |
150 | * |
150 | * |
151 | * If message is black, and not NDI_UNIQUE, gets sent through output buffers. |
151 | * If message is black, and not NDI_UNIQUE, gets sent through output buffers. |
152 | * |
152 | * |
153 | */ |
153 | */ |
154 | void |
154 | void |
155 | new_draw_info (int flags, int pri, const object *pl, const char *buf) |
155 | new_draw_info (int flags, int pri, const object *op, const char *buf) |
156 | { |
156 | { |
157 | if (flags & NDI_ALL) |
157 | if (flags & NDI_ALL) |
158 | { |
|
|
159 | for_all_players (pl) |
158 | for_all_players (pl) |
160 | new_draw_info (flags & ~NDI_ALL, pri, pl->ob, buf); |
159 | new_draw_info (flags & ~NDI_ALL, pri, pl->ob, buf); |
161 | |
160 | else |
|
|
161 | { |
|
|
162 | if (!op || !op->contr || !op->contr->ns) |
162 | return; |
163 | return; |
163 | } |
|
|
164 | |
164 | |
165 | if (!pl || pl->type != PLAYER || !pl->contr || !pl->contr->ns) |
|
|
166 | return; |
|
|
167 | |
|
|
168 | if (pri >= pl->contr->listening) |
165 | if (pri >= op->contr->listening) |
169 | return; |
166 | return; |
170 | |
167 | |
171 | if ((flags & (NDI_COLOR_MASK | NDI_UNIQUE)) != NDI_BLACK |
168 | if ((flags & (NDI_COLOR_MASK | NDI_UNIQUE)) != NDI_BLACK |
172 | || !pl->contr->ns->msg_suppressed (buf)) |
169 | || !op->contr->ns->msg_suppressed (buf)) |
173 | print_message (flags & NDI_COLOR_MASK, pl, buf); |
170 | print_message (flags & NDI_COLOR_MASK, op, buf); |
|
|
171 | } |
174 | } |
172 | } |
175 | |
173 | |
176 | /** |
174 | /** |
177 | * Wrapper for new_draw_info printf-like. |
175 | * Wrapper for new_draw_info printf-like. |
178 | * |
176 | * |