fix for own error made r35267.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 Mar 2011 08:01:11 +0000 (08:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 Mar 2011 08:01:11 +0000 (08:01 +0000)
source/blender/python/generic/mathutils.c
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp

index 3f888cb..9d2fcf1 100644 (file)
@@ -278,7 +278,7 @@ int _BaseMathObject_ReadCallback(BaseMathObject *self)
                return 0;
 
        if(!PyErr_Occurred())
-               PyErr_Format(PyExc_RuntimeError, "%s user has become invalid", Py_TYPE(self)->tp_name);
+               PyErr_Format(PyExc_RuntimeError, "%s read, user has become invalid", Py_TYPE(self)->tp_name);
        return -1;
 }
 
@@ -289,7 +289,7 @@ int _BaseMathObject_WriteCallback(BaseMathObject *self)
                return 0;
 
        if(!PyErr_Occurred())
-               PyErr_Format(PyExc_RuntimeError, "%s user has become invalid", Py_TYPE(self)->tp_name);
+               PyErr_Format(PyExc_RuntimeError, "%s write, user has become invalid", Py_TYPE(self)->tp_name);
        return -1;
 }
 
@@ -300,7 +300,7 @@ int _BaseMathObject_ReadIndexCallback(BaseMathObject *self, int index)
                return 0;
 
        if(!PyErr_Occurred())
-               PyErr_Format(PyExc_RuntimeError, "%s user has become invalid", Py_TYPE(self)->tp_name);
+               PyErr_Format(PyExc_RuntimeError, "%s read index, user has become invalid", Py_TYPE(self)->tp_name);
        return -1;
 }
 
@@ -311,7 +311,7 @@ int _BaseMathObject_WriteIndexCallback(BaseMathObject *self, int index)
                return 0;
 
        if(!PyErr_Occurred())
-               PyErr_Format(PyExc_RuntimeError, "%s user has become invalid", Py_TYPE(self)->tp_name);
+               PyErr_Format(PyExc_RuntimeError, "%s write index, user has become invalid", Py_TYPE(self)->tp_name);
        return -1;
 }
 
index bd59949..85d09d9 100644 (file)
@@ -1368,7 +1368,7 @@ static int mathutils_kxgameob_vector_set(BaseMathObject *bmo, int subtype)
 static int mathutils_kxgameob_vector_get_index(BaseMathObject *bmo, int subtype, int index)
 {
        /* lazy, avoid repeteing the case statement */
-       if(!mathutils_kxgameob_vector_get(bmo, subtype))
+       if(mathutils_kxgameob_vector_get(bmo, subtype) == -1)
                return -1;
        return 0;
 }
@@ -1378,7 +1378,7 @@ static int mathutils_kxgameob_vector_set_index(BaseMathObject *bmo, int subtype,
        float f= bmo->data[index];
        
        /* lazy, avoid repeteing the case statement */
-       if(!mathutils_kxgameob_vector_get(bmo, subtype))
+       if(mathutils_kxgameob_vector_get(bmo, subtype) == -1)
                return -1;
        
        bmo->data[index]= f;
index 977e32a..8c3e25c 100644 (file)
@@ -436,7 +436,7 @@ static int mathutils_obactu_vector_set(BaseMathObject *bmo, int subtype)
 static int mathutils_obactu_vector_get_index(BaseMathObject *bmo, int subtype, int index)
 {
        /* lazy, avoid repeteing the case statement */
-       if(!mathutils_obactu_vector_get(bmo, subtype))
+       if(mathutils_obactu_vector_get(bmo, subtype) == -1)
                return -1;
        return 0;
 }
@@ -446,7 +446,7 @@ static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, i
        float f= bmo->data[index];
 
        /* lazy, avoid repeteing the case statement */
-       if(!mathutils_obactu_vector_get(bmo, subtype))
+       if(mathutils_obactu_vector_get(bmo, subtype) == -1)
                return -1;
 
        bmo->data[index]= f;