[Bf-blender-cvs] [bbf6b05] soc-2014-bge: slow parent in game engine: fix for negative values

Ines Almeida noreply at git.blender.org
Wed Aug 6 18:41:41 CEST 2014


Commit: bbf6b0535e4d10f94b5f062eea6aa60355361256
Author: Ines Almeida
Date:   Wed Aug 6 17:02:14 2014 +0200
Branches: soc-2014-bge
https://developer.blender.org/rBbbf6b0535e4d10f94b5f062eea6aa60355361256

slow parent in game engine: fix for negative values

===================================================================

M	source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp

===================================================================

diff --git a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
index de0ab76..160654c 100644
--- a/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
+++ b/source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
@@ -233,9 +233,9 @@ SG_ParentRelation* KX_SlowParentRelation::NewCopy()
 }
 
 KX_SlowParentRelation::KX_SlowParentRelation(MT_Scalar relaxation)
-	:m_relax(relaxation),
-	m_initialized(false)
+	:m_initialized(false)
 {
+	m_relax = fabs(relaxation);
 	m_weight = MT_Scalar(1)/(m_relax + 1);
 }




More information about the Bf-blender-cvs mailing list