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.183 by root, Sat May 7 20:03:28 2011 UTC vs.
Revision 1.184 by root, Sun May 8 11:44:43 2011 UTC

887 887
888 /* Nothing changed */ 888 /* Nothing changed */
889 return 0; 889 return 0;
890} 890}
891 891
892//-GPL
893
894// prefetch some flat area around the player
895static void
896prefetch_surrounding_area (object *op, maptile *map, int range)
897{
898 for (maprect *rect = map->split_to_tiles (mapwalk_buf,
899 op->x - range , op->y - range ,
900 op->x + range + 1, op->y + range + 1);
901 rect->m;
902 ++rect)
903 {
904 rect->m->touch ();
905 rect->m->activate ();
906 }
907}
908
909// prefetch a generous area around the player, also up and down
910void
911object::prefetch_surrounding_maps ()
912{
913 prefetch_surrounding_area (this, map, 40);
914
915 if (maptile *m = map->tile_available (TILE_DOWN))
916 prefetch_surrounding_area (this, m, 20);
917
918 if (maptile *m = map->tile_available (TILE_UP))
919 prefetch_surrounding_area (this, m, 20);
920}
921
922//+GPL
923
924/** 892/**
925 * Draws client map. 893 * Draws client map.
926 */ 894 */
927void 895void
928draw_client_map (player *pl) 896draw_client_map (player *pl)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines