BGE: Object color channels can now be animated separately without zeroing out the other channels. Problem reported by Dalai via IRC.

This commit is contained in:
Mitchell Stokes 2013-02-23 01:17:01 +00:00
parent 31e6af92c8
commit c00191dbe3

@ -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);