diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-26 13:15:41 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-06-26 13:15:41 +0400 |
commit | 4c53f38756976704bab11a3dd8c33c71d926e6b8 (patch) | |
tree | 5db17347afbc71062a77f01f1197a9bfe7f0c20d /source/gameengine/Ketsji/KX_TouchSensor.cpp | |
parent | f69cc652e283bfa1958ae6945b0a014eb7d50906 (diff) |
Minor Fixes:
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)
Diffstat (limited to 'source/gameengine/Ketsji/KX_TouchSensor.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_TouchSensor.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp index 9baa9377f02..9091a41d054 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.cpp +++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp @@ -369,15 +369,7 @@ PyObject* KX_TouchSensor::PyGetTouchMaterial(PyObject* self, PyObject* args, PyObject* kwds) { - int retval = 0; - - if (m_bFindMaterial) { - retval = KX_TRUE; - } else { - retval = KX_FALSE; - } - - return PyInt_FromLong(retval); + return PyInt_FromLong(m_bFindMaterial); } /* 6. setTouchMaterial */ @@ -394,13 +386,7 @@ PyObject* KX_TouchSensor::PySetTouchMaterial(PyObject* self, PyObject* args, PyO return NULL; } - if (pulseArg == KX_TRUE) { - m_bFindMaterial = true; - } else if (pulseArg == KX_FALSE){ - m_bFindMaterial = false; - } else { - ; /* internal error */ - } + m_bFindMaterial = pulseArg != 0; Py_Return; } |