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

Comparing deliantra/server/server/shop.C (file contents):
Revision 1.44 by root, Thu Nov 8 19:43:28 2007 UTC vs.
Revision 1.45 by elmex, Mon Nov 26 11:41:02 2007 UTC

1268 return false; 1268 return false;
1269 1269
1270 return is_in_shop (o->map, o->x, o->y); 1270 return is_in_shop (o->map, o->x, o->y);
1271} 1271}
1272 1272
1273/* elmex: this function checks whether we are in a shop or not */ 1273/* elmex: this function checks whether we are in a shop or not
1274 - change 2007-11-26: enhanced the O(n) case by stopping at the first
1275 floor tile. this possibly will make map bugs where shopfloors are above
1276 floors more obvious.
1277*/
1278
1274bool 1279bool
1275is_in_shop (maptile *map, int x, int y) 1280is_in_shop (maptile *map, int x, int y)
1276{ 1281{
1277 for (object *floor = GET_MAP_OB (map, x, y); floor; floor = floor->above) 1282 for (object *floor = GET_MAP_OB (map, x, y); floor; floor = floor->above)
1283 if (QUERY_FLAG (floor, FLAG_IS_FLOOR))
1278 if (floor->type == SHOP_FLOOR) 1284 return floor->type == SHOP_FLOOR;
1279 return true;
1280
1281 return false; 1285 return false;
1282} 1286}
1283 1287

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines