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.45 by root, Tue Dec 19 04:58:05 2006 UTC vs.
Revision 1.46 by root, Tue Dec 19 05:12:52 2006 UTC

138} 138}
139 139
140static void 140static void
141clear_map (player *pl) 141clear_map (player *pl)
142{ 142{
143 client &socket = *pl->socket;
144
145 memset (&socket.lastmap, 0, sizeof (socket.lastmap)); 143 memset (&pl->socket->lastmap, 0, sizeof (pl->socket->lastmap));
146 144
147 if (socket.newmapcmd == 1) 145 if (pl->socket->newmapcmd == 1)
148 socket.send_packet ("newmap"); 146 pl->socket->send_packet ("newmap");
149 147
150 socket.update_look = 1; 148 pl->socket->floorbox_reset ();
151 socket.look_position = 0;
152} 149}
153 150
154/** check for map change and send new map data */ 151/** check for map change and send new map data */
155static void 152static void
156check_map_change (player *pl) 153check_map_change (player *pl)
197 if (socket.buggy_mapscroll && (abs (dx) > 8 || abs (dy) > 8)) 194 if (socket.buggy_mapscroll && (abs (dx) > 8 || abs (dy) > 8))
198 clear_map (pl); // current (<= 1.9.1) clients have unchecked buffer overflows 195 clear_map (pl); // current (<= 1.9.1) clients have unchecked buffer overflows
199 else 196 else
200 { 197 {
201 socket_map_scroll (&socket, ob->x - socket.current_x, ob->y - socket.current_y); 198 socket_map_scroll (&socket, ob->x - socket.current_x, ob->y - socket.current_y);
202 socket.update_look = 1; 199 socket.floorbox_reset ();
203 socket.look_position = 0;
204 } 200 }
205 } 201 }
206 202
207 socket.current_x = ob->x; 203 socket.current_x = ob->x;
208 socket.current_y = ob->y; 204 socket.current_y = ob->y;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines