--- deliantra/server/socket/request.C 2009/10/20 07:18:11 1.152 +++ deliantra/server/socket/request.C 2009/11/05 16:03:07 1.155 @@ -22,6 +22,8 @@ * The authors can be reached via e-mail to */ +//+GPL + /** * \file * Client handling. @@ -144,7 +146,7 @@ send_map_info (player *pl) { client &socket = *pl->ns; - object *ob = pl->observe; + object *ob = pl->viewpoint; if (socket.mapinfocmd) { @@ -171,7 +173,7 @@ check_map_change (player *pl) { client &socket = *pl->ns; - object *ob = pl->observe; + object *ob = pl->viewpoint; region *reg = ob->region (); if (socket.current_region != reg) @@ -239,11 +241,7 @@ break; } - if (!strcmp (buf, "image_info")) - send_image_info (ns, params); - else if (!strcmp (buf, "image_sums")) - send_image_sums (ns, params); - else if (!strcmp (buf, "skill_info")) + if (!strcmp (buf, "skill_info")) send_skill_info (ns, params); else if (!strcmp (buf, "spell_paths")) send_spell_paths (ns, params); @@ -269,6 +267,8 @@ INVOKE_CLIENT (EXTICMD, ns, ARG_DATA (buf, len)); } +//-GPL + void client::mapinfo_queue_clear () { @@ -285,9 +285,9 @@ buf += strlen (buf) + 9; // initial map and its origin - maptile *map = pl->observe->map; - int mapx = pl->ns->mapx / 2 - pl->observe->x; - int mapy = pl->ns->mapy / 2 - pl->observe->y; + maptile *map = pl->viewpoint->map; + int mapx = pl->ns->mapx / 2 - pl->viewpoint->x; + int mapy = pl->ns->mapy / 2 - pl->viewpoint->y; int max_distance = 8; // limit maximum path length to something generous while (*buf && map && max_distance) @@ -402,6 +402,8 @@ INVOKE_CLIENT (ADDME, ns, ARG_DATA (buf, len)); } +//+GPL + /* #define MSG_TYPE_BOOK 1 #define MSG_TYPE_CARD 2 @@ -930,6 +932,8 @@ return 0; } +//-GPL + // prefetch (and touch) all maps within a specific distancd static void prefetch_surrounding_maps (maptile *map, int distance) @@ -952,14 +956,16 @@ prefetch_surrounding_maps (op->map, 3); } +//+GPL + /** * Draws client map. */ void draw_client_map (player *pl) { - object *ob = pl->observe; - if (!ob->active) + object *ob = pl->viewpoint; + if (!pl->observe->active) return; /* If player is just joining the game, he isn't here yet, so the map @@ -976,7 +982,7 @@ /* do LOS after calls to update_position */ /* unfortunately, we need to udpate los when observing, currently */ - if (pl->do_los || pl->observe != pl->ob) + if (pl->do_los || pl->viewpoint != pl->ob) { pl->do_los = 0; pl->update_los (); @@ -1462,3 +1468,5 @@ pl->ns->send_packet (sl); } +//-GPL +