diff options
Diffstat (limited to 'source/gameengine/Ketsji/KX_TrackToActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_TrackToActuator.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index 3ed8eba759f..beccdfaad93 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -92,12 +92,12 @@ static MT_Matrix3x3 EulToMat3(float eul[3]) MT_Matrix3x3 mat; float ci, cj, ch, si, sj, sh, cc, cs, sc, ss; - ci = cos(eul[0]); - cj = cos(eul[1]); - ch = cos(eul[2]); - si = sin(eul[0]); - sj = sin(eul[1]); - sh = sin(eul[2]); + ci = cosf(eul[0]); + cj = cosf(eul[1]); + ch = cosf(eul[2]); + si = sinf(eul[0]); + sj = sinf(eul[1]); + sh = sinf(eul[2]); cc = ci*ch; cs = ci*sh; sc = si*ch; @@ -131,7 +131,7 @@ static void Mat3ToEulOld(MT_Matrix3x3 mat, float eul[3]) else { eul[0] = atan2f(-mat[2][1], mat[1][1]); eul[1] = atan2f(-mat[0][2], cy); - eul[2] = 0.0; + eul[2] = 0.0f; } } @@ -196,8 +196,8 @@ static float basis_cross(int n, int m) static MT_Matrix3x3 vectomat(MT_Vector3 vec, short axis, short upflag, short threedimup) { MT_Matrix3x3 mat; - MT_Vector3 y(MT_Scalar(0.0), MT_Scalar(1.0), MT_Scalar(0.0)); - MT_Vector3 z(MT_Scalar(0.0), MT_Scalar(0.0), MT_Scalar(1.0)); /* world Z axis is the global up axis */ + MT_Vector3 y(MT_Scalar(0.0f), MT_Scalar(1.0f), MT_Scalar(0.0f)); + MT_Vector3 z(MT_Scalar(0.0f), MT_Scalar(0.0f), MT_Scalar(1.0f)); /* world Z axis is the global up axis */ MT_Vector3 proj; MT_Vector3 right; MT_Scalar mul; @@ -208,7 +208,7 @@ static MT_Matrix3x3 vectomat(MT_Vector3 vec, short axis, short upflag, short thr /* if 2D doesn't move the up vector */ if (!threedimup){ - vec.setValue(MT_Scalar(vec[0]), MT_Scalar(vec[1]), MT_Scalar(0.0)); + vec.setValue(MT_Scalar(vec[0]), MT_Scalar(vec[1]), MT_Scalar(0.0f)); vec = (vec - z.dot(vec)*z).safe_normalized_vec(z); } @@ -411,7 +411,7 @@ int KX_TrackToActuator::pyattr_set_object(void *self, const struct KX_PYATTRIBUT KX_TrackToActuator* actuator = static_cast<KX_TrackToActuator*>(self); KX_GameObject *gameobj; - if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.object = value: KX_TrackToActuator")) + if (!ConvertPythonToGameObject(actuator->GetLogicManager(), value, &gameobj, true, "actuator.object = value: KX_TrackToActuator")) return PY_SET_ATTR_FAIL; // ConvertPythonToGameObject sets the error if (actuator->m_object != NULL) |