From 1217928e662bd74980dc17c8d32797b0bc6f7002 Mon Sep 17 00:00:00 2001 From: Kester Maddock Date: Fri, 21 May 2004 09:18:42 +0000 Subject: Fixes for Camera objects and python: Normalise clip planes for sphere testing. Do a frustum-sphere <-> sphere test Reference count all python objects (!) --- source/gameengine/Ketsji/KX_PyMath.cpp | 48 +++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'source/gameengine/Ketsji/KX_PyMath.cpp') diff --git a/source/gameengine/Ketsji/KX_PyMath.cpp b/source/gameengine/Ketsji/KX_PyMath.cpp index 3fd1b7be69b..287ae500ea5 100644 --- a/source/gameengine/Ketsji/KX_PyMath.cpp +++ b/source/gameengine/Ketsji/KX_PyMath.cpp @@ -69,12 +69,14 @@ MT_Vector3 MT_Vector3FromPyList(PyObject* pylist) } else { // assert the list is long enough... - unsigned int numitems = PyList_Size(pylist); + unsigned int numitems = PySequence_Size(pylist); if (numitems <= 3) { for (unsigned int index=0;index