[wpdev-commits] wolfpack/python pycoord.cpp,1.20,1.21
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-09-14 23:03:26
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19211/python Modified Files: pycoord.cpp Log Message: los Index: pycoord.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/pycoord.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pycoord.cpp 3 Sep 2004 16:55:17 -0000 1.20 --- pycoord.cpp 14 Sep 2004 23:03:17 -0000 1.21 *************** *** 179,182 **** --- 179,196 ---- } + extern bool lineOfSightNew(const Coord_cl &origin, const Coord_cl &target); + + static PyObject* wpCoord_lineofsightnew( wpCoord* self, PyObject* args ) + { + Coord_cl pos; + if ( !PyArg_ParseTuple( args, "O&:coord.lineofsight(coord)", &PyConvertCoord, &pos ) ) + return 0; + + if ( lineOfSightNew( self->coord, pos ) ) + return Py_True; + + return Py_False; + } + static PyMethodDef wpCoordMethods[] = { *************** *** 185,188 **** --- 199,203 ---- { "validspawnspot", ( getattrofunc ) wpCoord_validspawnspot, METH_VARARGS, NULL }, { "lineofsight", ( getattrofunc ) wpCoord_lineofsight, METH_VARARGS, NULL }, + { "lineofsightnew", ( getattrofunc ) wpCoord_lineofsightnew, METH_VARARGS, NULL }, { 0, 0, 0, 0 } }; |