Fix action target reset on same procedure only.

shapetextures
Sven Eberhardt 2016-01-15 08:14:46 -05:00
parent c8a76ce450
commit cc613c01f4
1 changed files with 5 additions and 3 deletions

View File

@ -2874,10 +2874,12 @@ bool C4Object::SetAction(C4PropList * Act, C4Object *pTarget, C4Object *pTarget2
Action.Time=0;
// reset action data and targets if procedure is changed
if ((Act ? Act->GetPropertyP(P_Procedure) : -1)
!= (LastAction ? LastAction->GetPropertyP(P_Procedure) : -1))
!= (LastAction ? LastAction->GetPropertyP(P_Procedure) : -1))
{
Action.Data = 0;
Action.Target = NULL;
Action.Target2 = NULL;
Action.Target = NULL;
Action.Target2 = NULL;
}
}
// Set new action