- added custom get function for navmesh property of steering actuator to accept only objects with NavMesh physics type

- fixed the access to KX_SteeringActuator attributes from scripts
- added enum members for KX_SteeringActuator and KX_NavMeshObject to GameLogic dictionary
This commit is contained in:
Nick Samarin
2010-07-21 09:16:27 +00:00
parent b4b9e01f8d
commit e8d129cc76
6 changed files with 40 additions and 14 deletions

View File

@@ -856,18 +856,10 @@ KX_PYMETHODDEF_DOC(KX_NavMeshObject, draw,
"draw(mode): navigation mesh debug drawing\n"
"mode: WALLS, POLYS, TRIS\n")
{
char* mode;
int arg;
NavMeshRenderMode renderMode = RM_TRIS;
if (PyArg_ParseTuple(args,"s:rebuild",&mode))
{
STR_String mode_str(mode);
if (mode_str.IsEqualNoCase("WALLS"))
renderMode = RM_WALLS;
else if (mode_str.IsEqualNoCase("POLYS"))
renderMode = RM_POLYS;
else if (mode_str.IsEqualNoCase("TRIS"))
renderMode = RM_TRIS;
}
if (PyArg_ParseTuple(args,"i:rebuild",&arg) && arg>=0 && arg<RM_MAX)
renderMode = (NavMeshRenderMode)arg;
DrawNavMesh(renderMode);
Py_RETURN_NONE;
}