Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/gameengine/GameLogic/SCA_PropertySensor.cpp8
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp1
2 files changed, 4 insertions, 5 deletions
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index ced3b8418fe..f02ac495233 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -152,13 +152,11 @@ bool SCA_PropertySensor::CheckPropertyCondition()
*/
if (result==false && dynamic_cast<CFloatValue *>(orgprop) != NULL) {
float f;
-
- if (EOF == sscanf(m_checkpropval.ReadPtr(), "%f", &f))
- {
- //error
+ if (sscanf(m_checkpropval.ReadPtr(), "%f", &f) == 1) {
+ result = (f == ((CFloatValue *)orgprop)->GetFloat());
}
else {
- result = (f == ((CFloatValue *)orgprop)->GetFloat());
+ /* error */
}
}
/* end patch */
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index a669f4346ea..4f3d020a3d9 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -99,6 +99,7 @@ KX_GameObject::KX_GameObject(
m_bSuspendDynamics(false),
m_bUseObjectColor(false),
m_bIsNegativeScaling(false),
+ m_objectColor(1.0, 1.0, 1.0, 1.0),
m_bVisible(true),
m_bCulled(true),
m_bOccluder(false),