diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-02-23 05:17:01 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-02-23 05:17:01 +0400 |
commit | c00191dbe3cbc3667948b7108068d4c8984f6d3c (patch) | |
tree | 7ba18de38278d4060e49c0461a833ac01fc04f2a /source/gameengine/Ketsji | |
parent | 31e6af92c81a9e45f9fbf0667d242fe1493f3e13 (diff) |
BGE: Object color channels can now be animated separately without zeroing out the other channels. Problem reported by Dalai via IRC.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp b/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp index f7e3194ee78..7f81f221c07 100644 --- a/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp +++ b/source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp @@ -45,10 +45,10 @@ bool KX_ObColorIpoSGController::Update(double currentTime) { if (m_modified) { - m_rgba[0]=0; - m_rgba[1]=0; - m_rgba[2]=0; - m_rgba[3]=0; + SG_Spatial* ob = (SG_Spatial*)m_pObject; + KX_GameObject* kxgameobj= (KX_GameObject*) ob->GetSGClientObject(); + + m_rgba = kxgameobj->GetObjectColor(); T_InterpolatorList::iterator i; for (i = m_interpolators.begin(); !(i == m_interpolators.end()); ++i) { @@ -56,9 +56,6 @@ bool KX_ObColorIpoSGController::Update(double currentTime) } - SG_Spatial* ob = (SG_Spatial*)m_pObject; - KX_GameObject* kxgameobj= (KX_GameObject*) ob->GetSGClientObject(); - kxgameobj->SetObjectColor(m_rgba); |