--- deliantra/server/socket/info.C 2006/12/21 06:12:37 1.22 +++ deliantra/server/socket/info.C 2006/12/25 14:43:23 1.25 @@ -85,7 +85,7 @@ return; if (pl->type == PLAYER) - esrv_print_msg (pl->contr->socket, colr, (char *) tmp); + esrv_print_msg (pl->contr->ns, colr, (char *) tmp); } /** @@ -189,7 +189,7 @@ { player *tmppl; - for (tmppl = first_player; tmppl != NULL; tmppl = tmppl->next) + for_all_players (pl) new_draw_info ((flags & ~NDI_ALL), pri, tmppl->ob, buf); return; @@ -249,7 +249,7 @@ if (pri >= pl->contr->listening) return; - if (!CLIENT_SUPPORT_READABLES (pl->contr->socket, type)) + if (!CLIENT_SUPPORT_READABLES (pl->contr->ns, type)) { char *buf = (char *) malloc (strlen (oldmessage == NULL ? message : oldmessage) + 1); @@ -264,7 +264,7 @@ } } else - esrv_print_ext_msg (pl->contr->socket, flags & NDI_COLOR_MASK, type, subtype, message); + esrv_print_ext_msg (pl->contr->ns, flags & NDI_COLOR_MASK, type, subtype, message); } void @@ -279,7 +279,7 @@ if (pri >= pl->contr->listening) return; - if (!CLIENT_SUPPORT_READABLES (pl->contr->socket, type)) + if (!CLIENT_SUPPORT_READABLES (pl->contr->ns, type)) { va_list ap; @@ -298,7 +298,7 @@ vsnprintf (buf, HUGE_BUF, new_format, ap); va_end (ap); strip_media_tag (buf); - esrv_print_ext_msg (pl->contr->socket, flags & NDI_COLOR_MASK, type, subtype, buf); + esrv_print_ext_msg (pl->contr->ns, flags & NDI_COLOR_MASK, type, subtype, buf); } } @@ -311,7 +311,7 @@ { player *pl; - for (pl = first_player; pl != NULL; pl = pl->next) + for_all_players (pl) if (pl->ob != NULL && pl->ob->map == map && pl->ob != op) { new_draw_info (color, 0, pl->ob, str); @@ -327,7 +327,7 @@ { player *pl; - for (pl = first_player; pl != NULL; pl = pl->next) + for_all_players (pl) if (pl->ob != NULL && pl->ob->map == map && pl->ob != op1 && pl->ob != op2) { new_draw_info (color, 0, pl->ob, str); @@ -343,7 +343,7 @@ { player *pl; - for (pl = first_player; pl != NULL; pl = pl->next) + for_all_players (pl) if (pl->ob != NULL && pl->ob->map == map) { new_draw_info (color, 0, pl->ob, str); @@ -600,7 +600,7 @@ for (int x = 0; x < MAGIC_MAP_SIZE; x++) for (int y = 0; y < MAGIC_MAP_SIZE; y++) - if (map_mark[x + MAP_WIDTH (pl->map) * y] | FACE_FLOOR) + if (map_mark[x + pl->map->width * y] | FACE_FLOOR) { xmin = x < xmin ? x : xmin; xmax = x > xmax ? x : xmax; @@ -616,7 +616,7 @@ for (int x = xmin; x <= xmax; x++) sl << uint8 (map_mark[x + MAGIC_MAP_SIZE * y] & ~FACE_FLOOR); - pl->contr->socket->send_packet (sl); + pl->contr->ns->send_packet (sl); free (map_mark); }