… | |
… | |
258 | if (!strncmp (buf, "spatial ", 8)) |
258 | if (!strncmp (buf, "spatial ", 8)) |
259 | { |
259 | { |
260 | buf += 8; |
260 | buf += 8; |
261 | |
261 | |
262 | // initial map and its origin |
262 | // initial map and its origin |
263 | mapstruct *map = pl->ob->map; |
263 | maptile *map = pl->ob->map; |
264 | sint16 dx, dy; |
264 | sint16 dx, dy; |
265 | int mapx = pl->socket.mapx / 2 - pl->ob->x; |
265 | int mapx = pl->socket.mapx / 2 - pl->ob->x; |
266 | int mapy = pl->socket.mapy / 2 - pl->ob->y; |
266 | int mapy = pl->socket.mapy / 2 - pl->ob->y; |
267 | int max_distance = 8; // limit maximum path length to something generous |
267 | int max_distance = 8; // limit maximum path length to something generous |
268 | |
268 | |
… | |
… | |
1541 | * the case, it seems to make more sense to have these layer values |
1541 | * the case, it seems to make more sense to have these layer values |
1542 | * actually match. |
1542 | * actually match. |
1543 | */ |
1543 | */ |
1544 | |
1544 | |
1545 | static int |
1545 | static int |
1546 | update_space (SockList * sl, NewSocket * ns, mapstruct *mp, int mx, int my, int sx, int sy, int layer) |
1546 | update_space (SockList * sl, NewSocket * ns, maptile *mp, int mx, int my, int sx, int sy, int layer) |
1547 | { |
1547 | { |
1548 | object *ob, *head; |
1548 | object *ob, *head; |
1549 | uint16 face_num; |
1549 | uint16 face_num; |
1550 | int bx, by, i; |
1550 | int bx, by, i; |
1551 | |
1551 | |
… | |
… | |
1765 | * top layer (this matches what the GET_MAP_FACE and GET_MAP_FACE_OBJ |
1765 | * top layer (this matches what the GET_MAP_FACE and GET_MAP_FACE_OBJ |
1766 | * take. |
1766 | * take. |
1767 | */ |
1767 | */ |
1768 | |
1768 | |
1769 | static inline int |
1769 | static inline int |
1770 | update_smooth (SockList * sl, NewSocket * ns, mapstruct *mp, int mx, int my, int sx, int sy, int layer) |
1770 | update_smooth (SockList * sl, NewSocket * ns, maptile *mp, int mx, int my, int sx, int sy, int layer) |
1771 | { |
1771 | { |
1772 | object *ob; |
1772 | object *ob; |
1773 | int smoothlevel; /* old face_num; */ |
1773 | int smoothlevel; /* old face_num; */ |
1774 | |
1774 | |
1775 | ob = GET_MAP_FACE_OBJ (mp, mx, my, layer); |
1775 | ob = GET_MAP_FACE_OBJ (mp, mx, my, layer); |
… | |
… | |
1853 | SockList esl; /*For extended Map info */ |
1853 | SockList esl; /*For extended Map info */ |
1854 | uint16 mask, emask; |
1854 | uint16 mask, emask; |
1855 | uint8 eentrysize; |
1855 | uint8 eentrysize; |
1856 | uint16 ewhatstart, ewhatflag; |
1856 | uint16 ewhatstart, ewhatflag; |
1857 | uint8 extendedinfos; |
1857 | uint8 extendedinfos; |
1858 | mapstruct *m; |
1858 | maptile *m; |
1859 | |
1859 | |
1860 | NewSocket & socket = pl->contr->socket; |
1860 | NewSocket & socket = pl->contr->socket; |
1861 | |
1861 | |
1862 | check_map_change (pl->contr); |
1862 | check_map_change (pl->contr); |
1863 | |
1863 | |
… | |
… | |
2241 | sint16 ax, ay, nx, ny; /* ax and ay goes from 0 to max-size of arrays */ |
2241 | sint16 ax, ay, nx, ny; /* ax and ay goes from 0 to max-size of arrays */ |
2242 | New_Face *face, *floor; |
2242 | New_Face *face, *floor; |
2243 | New_Face *floor2; |
2243 | New_Face *floor2; |
2244 | int d, mflags; |
2244 | int d, mflags; |
2245 | struct Map newmap; |
2245 | struct Map newmap; |
2246 | mapstruct *m, *pm; |
2246 | maptile *m, *pm; |
2247 | |
2247 | |
2248 | if (pl->type != PLAYER) |
2248 | if (pl->type != PLAYER) |
2249 | { |
2249 | { |
2250 | LOG (llevError, "draw_client_map called with non player/non eric-server\n"); |
2250 | LOG (llevError, "draw_client_map called with non player/non eric-server\n"); |
2251 | return; |
2251 | return; |