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

Comparing deliantra/server/common/object.C (file contents):
Revision 1.189 by root, Thu Sep 13 16:23:01 2007 UTC vs.
Revision 1.190 by root, Sat Sep 15 15:58:06 2007 UTC

1991 * customized, changed states, etc. 1991 * customized, changed states, etc.
1992 */ 1992 */
1993int 1993int
1994find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop) 1994find_free_spot (const object *ob, maptile *m, int x, int y, int start, int stop)
1995{ 1995{
1996 int altern[SIZEOFFREE];
1996 int index = 0, flag; 1997 int index = 0, flag;
1997 int altern[SIZEOFFREE];
1998 1998
1999 for (int i = start; i < stop; i++) 1999 for (int i = start; i < stop; i++)
2000 { 2000 {
2001 mapxy pos (m, x, y); pos.move (i); 2001 mapxy pos (m, x, y); pos.move (i);
2002 2002
2011 /* However, often 2011 /* However, often
2012 * ob doesn't have any move type (when used to place exits) 2012 * ob doesn't have any move type (when used to place exits)
2013 * so the AND operation in OB_TYPE_MOVE_BLOCK doesn't work. 2013 * so the AND operation in OB_TYPE_MOVE_BLOCK doesn't work.
2014 */ 2014 */
2015 if (ob->move_type == 0 && ms.move_block != MOVE_ALL) 2015 if (ob->move_type == 0 && ms.move_block != MOVE_ALL)
2016 {
2017 altern [index++] = i;
2016 continue; 2018 continue;
2019 }
2017 2020
2018 /* Basically, if we find a wall on a space, we cut down the search size. 2021 /* Basically, if we find a wall on a space, we cut down the search size.
2019 * In this way, we won't return spaces that are on another side of a wall. 2022 * In this way, we won't return spaces that are on another side of a wall.
2020 * This mostly work, but it cuts down the search size in all directions - 2023 * This mostly work, but it cuts down the search size in all directions -
2021 * if the space being examined only has a wall to the north and empty 2024 * if the space being examined only has a wall to the north and empty

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines