… | |
… | |
191 | new_draw_info (flags & ~NDI_ALL, pri, pl->ob, buf); |
191 | new_draw_info (flags & ~NDI_ALL, pri, pl->ob, buf); |
192 | |
192 | |
193 | return; |
193 | return; |
194 | } |
194 | } |
195 | |
195 | |
196 | if (!pl || (pl->type == PLAYER && pl->contr == NULL)) |
196 | if (!pl || pl->type != PLAYER || !pl->contr || !pl->contr->ns) |
197 | { |
|
|
198 | /* Write to the socket? */ |
|
|
199 | print_message (0, NULL, buf); |
|
|
200 | return; |
|
|
201 | } |
|
|
202 | |
|
|
203 | if (pl->type != PLAYER) |
|
|
204 | return; |
197 | return; |
205 | |
198 | |
206 | if (pri >= pl->contr->listening) |
199 | if (pri >= pl->contr->listening) |
207 | return; |
200 | return; |
208 | |
201 | |
209 | if ((flags & NDI_COLOR_MASK) == NDI_BLACK && !(flags & NDI_UNIQUE)) |
202 | if ((flags & NDI_COLOR_MASK) == NDI_BLACK && !(flags & NDI_UNIQUE)) |
210 | /* following prints stuff out, as appropriate */ |
|
|
211 | check_output_buffers (pl, buf); |
203 | check_output_buffers (pl, buf); |
212 | else |
204 | else |
213 | print_message (flags & NDI_COLOR_MASK, pl, buf); |
205 | print_message (flags & NDI_COLOR_MASK, pl, buf); |
214 | } |
206 | } |
215 | |
207 | |
… | |
… | |
225 | new_draw_info_format (int flags, int pri, const object *pl, const char *format, ...) |
217 | new_draw_info_format (int flags, int pri, const object *pl, const char *format, ...) |
226 | { |
218 | { |
227 | char buf[HUGE_BUF]; |
219 | char buf[HUGE_BUF]; |
228 | |
220 | |
229 | va_list ap; |
221 | va_list ap; |
230 | |
|
|
231 | va_start (ap, format); |
222 | va_start (ap, format); |
232 | |
|
|
233 | vsnprintf (buf, HUGE_BUF, format, ap); |
223 | vsnprintf (buf, HUGE_BUF, format, ap); |
234 | |
|
|
235 | va_end (ap); |
224 | va_end (ap); |
236 | |
225 | |
237 | new_draw_info (flags, pri, pl, buf); |
226 | new_draw_info (flags, pri, pl, buf); |
238 | } |
227 | } |
239 | |
228 | |