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

Comparing deliantra/server/common/map.C (file contents):
Revision 1.81 by root, Sat Jan 27 23:59:29 2007 UTC vs.
Revision 1.82 by root, Mon Jan 29 16:11:48 2007 UTC

1452 1452
1453/** 1453/**
1454 * Return whether map2 is adjacent to map1. If so, store the distance from 1454 * Return whether map2 is adjacent to map1. If so, store the distance from
1455 * map1 to map2 in dx/dy. 1455 * map1 to map2 in dx/dy.
1456 */ 1456 */
1457static int 1457int
1458adjacent_map (const maptile *map1, const maptile *map2, int *dx, int *dy) 1458adjacent_map (const maptile *map1, const maptile *map2, int *dx, int *dy)
1459{ 1459{
1460 if (!map1 || !map2) 1460 if (!map1 || !map2)
1461 return 0; 1461 return 0;
1462 1462
1634 * flags has no meaning for this function at this time - I kept it in to 1634 * flags has no meaning for this function at this time - I kept it in to
1635 * be more consistant with the above function and also in case they are needed 1635 * be more consistant with the above function and also in case they are needed
1636 * for something in the future. Also, since no object is pasted, the best 1636 * for something in the future. Also, since no object is pasted, the best
1637 * field of the rv_vector is set to NULL. 1637 * field of the rv_vector is set to NULL.
1638 */ 1638 */
1639
1640void 1639void
1641get_rangevector_from_mapcoord (const maptile *m, int x, int y, const object *op2, rv_vector * retval, int flags) 1640get_rangevector_from_mapcoord (const maptile *m, int x, int y, const object *op2, rv_vector *retval, int flags)
1642{ 1641{
1643 if (!adjacent_map (m, op2->map, &retval->distance_x, &retval->distance_y)) 1642 if (!adjacent_map (m, op2->map, &retval->distance_x, &retval->distance_y))
1644 { 1643 {
1645 /* be conservative and fill in _some_ data */ 1644 /* be conservative and fill in _some_ data */
1646 retval->distance = 100000; 1645 retval->distance = 100000;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines