[wpdev-commits] wolfpack/python global.cpp,1.169,1.170
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-11-03 16:48:36
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18441/python Modified Files: global.cpp Log Message: Fixes Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.169 retrieving revision 1.170 diff -C2 -d -r1.169 -r1.170 *** global.cpp 3 Nov 2004 02:09:32 -0000 1.169 --- global.cpp 3 Nov 2004 16:48:24 -0000 1.170 *************** *** 701,707 **** \param y The y component of the coordinate. \param map The map to look on. ! \param range Defaults to 1. ! This is the range in which the server should search for items. Please remember that this is not ! a circle. \return A list of <object id="item">item</object> objects. \description This function searches for dynamic items (no static items) at the given --- 701,706 ---- \param y The y component of the coordinate. \param map The map to look on. ! \param range Defaults to 0. ! The range of the circle to search in \return A list of <object id="item">item</object> objects. \description This function searches for dynamic items (no static items) at the given *************** *** 715,724 **** y = 0, map = 0, ! range = 1; if ( !PyArg_ParseTuple( args, "iii|i:wolfpack.items", &x, &y, &map, &range ) ) return 0; Coord pos( x, y, 0, map ); ! MapItemsIterator iter = MapObjects::instance()->listItemsInCircle( pos, range ); PyObject* list = PyList_New( 0 ); --- 714,728 ---- y = 0, map = 0, ! range = 0; if ( !PyArg_ParseTuple( args, "iii|i:wolfpack.items", &x, &y, &map, &range ) ) return 0; Coord pos( x, y, 0, map ); ! MapItemsIterator iter; ! if (range > 0) { ! iter = MapObjects::instance()->listItemsInCircle( pos, range ); ! } else { ! iter = MapObjects::instance()->listItemsAtCoord(pos); // Suppose this is faster ! } PyObject* list = PyList_New( 0 ); |