BGE Animations: Getting the Frame Property option of the Action Actuator working again.
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user