ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/info.C
(Generate patch)

Comparing deliantra/server/socket/info.C (file contents):
Revision 1.23 by root, Thu Dec 21 23:37:06 2006 UTC vs.
Revision 1.27 by root, Tue Dec 26 17:11:40 2006 UTC

185void 185void
186new_draw_info (int flags, int pri, const object *pl, const char *buf) 186new_draw_info (int flags, int pri, const object *pl, const char *buf)
187{ 187{
188 if (flags & NDI_ALL) 188 if (flags & NDI_ALL)
189 { 189 {
190 player *tmppl; 190 for_all_players (pl)
191
192 for (tmppl = first_player; tmppl != NULL; tmppl = tmppl->next)
193 new_draw_info ((flags & ~NDI_ALL), pri, tmppl->ob, buf); 191 new_draw_info (flags & ~NDI_ALL, pri, pl->ob, buf);
194 192
195 return; 193 return;
196 } 194 }
197 195
198 if (!pl || (pl->type == PLAYER && pl->contr == NULL)) 196 if (!pl || (pl->type == PLAYER && pl->contr == NULL))
309void 307void
310new_info_map_except (int color, maptile * map, object *op, const char *str) 308new_info_map_except (int color, maptile * map, object *op, const char *str)
311{ 309{
312 player *pl; 310 player *pl;
313 311
314 for (pl = first_player; pl != NULL; pl = pl->next) 312 for_all_players (pl)
315 if (pl->ob != NULL && pl->ob->map == map && pl->ob != op) 313 if (pl->ob != NULL && pl->ob->map == map && pl->ob != op)
316 { 314 {
317 new_draw_info (color, 0, pl->ob, str); 315 new_draw_info (color, 0, pl->ob, str);
318 } 316 }
319} 317}
325void 323void
326new_info_map_except2 (int color, maptile * map, object *op1, object *op2, const char *str) 324new_info_map_except2 (int color, maptile * map, object *op1, object *op2, const char *str)
327{ 325{
328 player *pl; 326 player *pl;
329 327
330 for (pl = first_player; pl != NULL; pl = pl->next) 328 for_all_players (pl)
331 if (pl->ob != NULL && pl->ob->map == map && pl->ob != op1 && pl->ob != op2) 329 if (pl->ob != NULL && pl->ob->map == map && pl->ob != op1 && pl->ob != op2)
332 { 330 {
333 new_draw_info (color, 0, pl->ob, str); 331 new_draw_info (color, 0, pl->ob, str);
334 } 332 }
335} 333}
341void 339void
342new_info_map (int color, maptile * map, const char *str) 340new_info_map (int color, maptile * map, const char *str)
343{ 341{
344 player *pl; 342 player *pl;
345 343
346 for (pl = first_player; pl != NULL; pl = pl->next) 344 for_all_players (pl)
347 if (pl->ob != NULL && pl->ob->map == map) 345 if (pl->ob != NULL && pl->ob->map == map)
348 { 346 {
349 new_draw_info (color, 0, pl->ob, str); 347 new_draw_info (color, 0, pl->ob, str);
350 } 348 }
351} 349}
598 xmax = 0; 596 xmax = 0;
599 ymax = 0; 597 ymax = 0;
600 598
601 for (int x = 0; x < MAGIC_MAP_SIZE; x++) 599 for (int x = 0; x < MAGIC_MAP_SIZE; x++)
602 for (int y = 0; y < MAGIC_MAP_SIZE; y++) 600 for (int y = 0; y < MAGIC_MAP_SIZE; y++)
603 if (map_mark[x + MAP_WIDTH (pl->map) * y] | FACE_FLOOR) 601 if (map_mark[x + pl->map->width * y] | FACE_FLOOR)
604 { 602 {
605 xmin = x < xmin ? x : xmin; 603 xmin = x < xmin ? x : xmin;
606 xmax = x > xmax ? x : xmax; 604 xmax = x > xmax ? x : xmax;
607 ymin = y < ymin ? y : ymin; 605 ymin = y < ymin ? y : ymin;
608 ymax = y > ymax ? y : ymax; 606 ymax = y > ymax ? y : ymax;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines