ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/socket/request.C
(Generate patch)

Comparing deliantra/server/socket/request.C (file contents):
Revision 1.129 by root, Tue May 6 19:37:01 2008 UTC vs.
Revision 1.130 by root, Tue May 20 03:14:19 2008 UTC

147static void 147static void
148check_map_change (player *pl) 148check_map_change (player *pl)
149{ 149{
150 client &socket = *pl->ns; 150 client &socket = *pl->ns;
151 object *ob = pl->observe; 151 object *ob = pl->observe;
152
153 // first try to aovid a full newmap on tiled map scrolls
154 if (socket.current_map != ob->map)
155 {
156 rv_vector rv;
157
158 get_rangevector_from_mapcoord (socket.current_map, socket.current_x, socket.current_y, ob, &rv, 0);
159
160 // manhattan distance is very handy here
161 if (rv.distance < 8) // 8 works nicely for speed << 70 and buggy gcfclient
162 {
163 socket.current_map = ob->map;
164 socket.current_x = ob->x;
165 socket.current_y = ob->y;
166
167 socket_map_scroll (&socket, rv.distance_x, rv.distance_y);
168 socket.floorbox_reset ();
169 }
170 }
152 171
153 if (socket.current_map != ob->map || socket.force_newmap) 172 if (socket.current_map != ob->map || socket.force_newmap)
154 { 173 {
155 clear_map (pl); 174 clear_map (pl);
156 socket.current_map = ob->map; 175 socket.current_map = ob->map;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines