--- deliantra/server/socket/request.C 2007/03/14 04:12:29 1.75 +++ deliantra/server/socket/request.C 2007/03/14 15:44:47 1.77 @@ -461,6 +461,7 @@ if (is_valid_faceset (q)) ns->faceset = q; + sprintf (tmpbuf, "%d", ns->faceset); safe_strcat (cmdback, tmpbuf, &slen, HUGE_BUF); /* if the client is using faceset, it knows about image2 command */ @@ -563,8 +564,28 @@ * it either has to be here or init_sockets needs to be exported. */ void -AddMeCmd (char *buf, int len, client * ns) +AddMeCmd (char *buf, int len, client *ns) { + // face caching is mandatory + if (!ns->facecache) + { + ns->send_drawinfo ( + "\n" + "\n" + "***\n" + "*** WARNING:\n" + "*** Your client does not support face/image caching,\n" + "*** or it has been disabled. Face caching is mandatory\n" + "*** so please enable it or use a newer client.\n" + "***\n" + "*** I will proceed as if face caching were enabled.\n" + "\n" + "***\n", + NDI_RED + ); + //ns->facecache = true; + } + INVOKE_CLIENT (ADDME, ns, ARG_DATA (buf, len)); } @@ -685,6 +706,16 @@ } /** + * client requested an image. send it rate-limited + * before flushing. + */ +void +AskFaceCmd (char *buf, int len, client *ns) +{ + ns->askface.push_back (atoi (buf)); +} + +/** * Tells client the picture it has to use * to smooth a picture number given as argument. */ @@ -1252,13 +1283,6 @@ estartlen = esl.length (); } - else - { - /* suppress compiler warnings */ - ewhatstart = 0; - ewhatflag = 0; - estartlen = 0; - } /* x,y are the real map locations. ax, ay are viewport relative * locations. @@ -1271,6 +1295,8 @@ max_x = pl->x + (socket.mapx + 1) / 2; max_y = pl->y + (socket.mapy + 1) / 2; + maptile *plmap = pl->map; + for (y = pl->y - socket.mapy / 2; y < max_y; y++, ay++) { ax = 0; @@ -1286,7 +1312,7 @@ */ nx = x; ny = y; - m = get_map_from_coord (pl->map, &nx, &ny); + m = get_map_from_coord (plmap, &nx, &ny); if (!m) {