New parameters:
STATE heal: If specified, jump to this state instead of the automatic healing state.
INT healflags:
RESF_NORAISE: Do not resurrect the corpse.
RESF_REUSECORPSE: Use the corpse from the previous resurrection instead of a search. If the previous call did not find a suitable corpse, this is NULL.
RESF_NOSOUND: Do not play the default sound.
RESF_NODEFAULTJUMP: Do not perform the default jump. Implicit if a custom jump for healing is specified.
RESF_DONTSTOPCORPSE: Do not set the corpse's xy-momentum to 0.
The demo uses NORAISE, NOSOUND and DONTSTOPCORPSE to locate a corpse and start healing it. Because momentum is not killed, a sliding corpse can slip out of reach during this process. When the final call is made, REUSECORPSE causes the function to try resurrecting the same corpse that was first selected, instead of searching for a new corpse.
Spoiler: For good and for bad this had to goSome details in decorate-file in demo.
Possible uses: Delay the resurrection effect (demonstrated). Make the resurrection interruptable by painstate (demonstrated). Customise the appearance of resurrections. (I'd say that's demonstrated too)
Spoiler: Compatibility notesImportant note to developer: I have now modified the save format by adding the new pointer. In the patch you might note a big comment where the revision number needs to be updated. The line reads "if (SaveVersion >= 3242) // THIS NUMBER CANNOT BE 3242, that's only for my revision 3242M (feature added) [FDARI]". I couldn't see a good way for me to ensure that the revision number would end up being correct, so I left it to you.