- changed action function interface so that callers can be identified directly, instead of guessing it from looking at the parameters.

With arbitrary PSP layers the old method was no longer safe because the layer ID was not available in the action function.
This commit is contained in:
Christoph Oelckers 2016-06-16 16:11:00 +02:00
commit cfaa3e3fa9
9 changed files with 54 additions and 32 deletions

View file

@ -321,7 +321,8 @@ void DPSprite::SetState(FState *newstate, bool pending)
if (Owner->mo != nullptr)
{
FState *nextstate;
if (newstate->CallAction(Owner->mo, Caller, &nextstate))
FStateParamInfo stp = { newstate, STATE_Psprite, ID };
if (newstate->CallAction(Owner->mo, Caller, &stp, &nextstate))
{
// It's possible this call resulted in this very layer being replaced.
if (ObjectFlags & OF_EuthanizeMe)