BGE Animations: Getting the Frame Property option of the Action Actuator working again.

This commit is contained in:
2011-06-06 06:31:42 +00:00
parent ef5f78ecc7
commit e18bea1cfc

View File

@@ -190,6 +190,19 @@ bool BL_ActionActuator::Update(double curtime, bool frame)
obj->StopAction(0); // Stop the action after getting the frame
}
// Handle a frame property if it's defined
if (m_framepropname[0] != 0)
{
CValue* oldprop = obj->GetProperty(m_framepropname);
CValue* newval = new CFloatValue(obj->GetActionFrame(0));
if (oldprop)
oldprop->SetValue(newval);
else
obj->SetProperty(m_framepropname, newval);
newval->Release();
}
// Handle a finished animation
if (m_is_going && obj->IsActionDone(0))
{