--- deliantra/server/socket/request.C 2007/03/14 13:05:30 1.76 +++ deliantra/server/socket/request.C 2007/03/16 02:51:17 1.81 @@ -134,6 +134,8 @@ { memset (&pl->ns->lastmap, 0, sizeof (pl->ns->lastmap)); + pl->ns->force_newmap = false; + if (pl->ns->newmapcmd == 1) pl->ns->send_packet ("newmap"); @@ -148,11 +150,17 @@ object *ob = pl->ob; char buf[MAX_BUF]; /* eauugggh */ - if (socket.current_map != ob->map) + if (socket.force_newmap) { + // force newmap is used for clients that do not redraw their map + // after image uploads. socket.current_map = ob->map; - clear_map (pl); + } + else if (socket.current_map != ob->map) + { + clear_map (pl); + socket.current_map = ob->map; if (socket.mapinfocmd) { @@ -564,8 +572,43 @@ * 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" + "*** Look at your client preferences:\n" + "***\n" + "*** CFPlus: all known versions automatically enable the facecache.\n" + "*** cfclient: use the -cache commandline option.\n" + "*** cfclient: map will not redraw automatically (bug).\n" + "*** gcfclient: use -cache commandline option, or enable\n" + "*** gcfclient: Client=>Configure=>Map & Image=>Cache Images.\n" + "*** jcrossclient: your client is broken, use CFPlus or gcfclient.\n" + "***\n" + "***\n", + NDI_RED + ); + + if (strstr (ns->version, "jcrossclient")) + /* let them, for now*/; + else + { + ns->flush (); + //ns->destroy (); + } + //ns->facecache = true; + } + INVOKE_CLIENT (ADDME, ns, ARG_DATA (buf, len)); } @@ -686,6 +729,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. */ @@ -1253,13 +1306,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.