forked from Mirrors/openclonk
Pass previous ActionTarget/ActionTarget2 to AbortCalls
parent
8b8c7080c2
commit
6512340382
|
@ -117,7 +117,7 @@ oben gez
|
|||
<row>
|
||||
<col>AbortCall</col>
|
||||
<col>Zeichenfolge (max. 30)</col>
|
||||
<col>Wird aufgerufen, wenn die Aktivität vor ihrem Ende durch eine andere ersetzt wird.</col>
|
||||
<col>Wird aufgerufen, wenn die Aktivität vor ihrem Ende durch eine andere ersetzt wird. Parameter sind letzte Animationsphase, letztes ActionTarget und ActionTarget2.</col>
|
||||
</row>
|
||||
<row>
|
||||
<col>InLiquidAction</col>
|
||||
|
|
|
@ -3354,6 +3354,8 @@ bool C4Object::SetAction(C4PropList * Act, C4Object *pTarget, C4Object *pTarget2
|
|||
{
|
||||
C4PropList * LastAction = GetAction();
|
||||
int32_t iLastPhase=Action.Phase;
|
||||
C4Object *pLastTarget = Action.Target;
|
||||
C4Object *pLastTarget2 = Action.Target2;
|
||||
// No other action
|
||||
if (LastAction)
|
||||
if (LastAction->GetPropertyInt(P_NoOtherAction) && !fForce)
|
||||
|
@ -3430,7 +3432,9 @@ bool C4Object::SetAction(C4PropList * Act, C4Object *pTarget, C4Object *pTarget2
|
|||
if (LastAction->GetPropertyStr(P_AbortCall))
|
||||
{
|
||||
C4Def *pOldDef = Def;
|
||||
Call(LastAction->GetPropertyStr(P_AbortCall)->GetCStr(), &C4AulParSet(C4VInt(iLastPhase)));
|
||||
if (pLastTarget && !pLastTarget->Status) pLastTarget = NULL;
|
||||
if (pLastTarget2 && !pLastTarget2->Status) pLastTarget2 = NULL;
|
||||
Call(LastAction->GetPropertyStr(P_AbortCall)->GetCStr(), &C4AulParSet(C4VInt(iLastPhase), C4VObj(pLastTarget), C4VObj(pLastTarget2)));
|
||||
// abort exeution if def changed
|
||||
if (Def != pOldDef || !Status) return true;
|
||||
}
|
||||
|
|
|
@ -187,7 +187,7 @@ bool C4GraphicsResource::Init()
|
|||
}
|
||||
|
||||
Game.SetInitProgress(11.0f);
|
||||
ProgressStart = 12; ProgressIncrement = 0.4;
|
||||
ProgressStart = 12.0f; ProgressIncrement = 0.4f;
|
||||
// The progress bar is the only graphic besides the background that is
|
||||
// used during startup, so load it early
|
||||
if (!LoadFile(fctProgressBar, "GUIProgress", Files)) return false;
|
||||
|
|
Loading…
Reference in New Issue