diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_ObjectActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_ObjectActuator.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.cpp b/source/gameengine/Ketsji/KX_ObjectActuator.cpp index 83d8f4b883b..8c3e25cf3e2 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_ObjectActuator.cpp @@ -392,16 +392,16 @@ static int mathutils_obactu_generic_check(BaseMathObject *bmo) { KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; - return 1; + return 0; } static int mathutils_obactu_vector_get(BaseMathObject *bmo, int subtype) { KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; switch(subtype) { case MATHUTILS_VEC_CB_LINV: @@ -412,14 +412,14 @@ static int mathutils_obactu_vector_get(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } static int mathutils_obactu_vector_set(BaseMathObject *bmo, int subtype) { KX_ObjectActuator* self= static_cast<KX_ObjectActuator*>BGE_PROXY_REF(bmo->cb_user); if(self==NULL) - return 0; + return -1; switch(subtype) { case MATHUTILS_VEC_CB_LINV: @@ -430,15 +430,15 @@ static int mathutils_obactu_vector_set(BaseMathObject *bmo, int subtype) break; } - return 1; + return 0; } 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)) - return 0; - return 1; + if(mathutils_obactu_vector_get(bmo, subtype) == -1) + return -1; + return 0; } static int mathutils_obactu_vector_set_index(BaseMathObject *bmo, int subtype, int index) @@ -446,8 +446,8 @@ 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)) - return 0; + if(mathutils_obactu_vector_get(bmo, subtype) == -1) + return -1; bmo->data[index]= f; return mathutils_obactu_vector_set(bmo, subtype); |