Add worldlineactivated event, triggered after successful line activation.

This commit is contained in:
Mari the Deer 2018-03-17 16:01:47 +01:00 committed by Christoph Oelckers
commit 69c6e95b08
4 changed files with 37 additions and 1 deletions

View file

@ -188,8 +188,10 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVe
{
return false;
}
bool remote = (line->special != 7 && line->special != 8 && (line->special < 11 || line->special > 14));
if (line->locknumber > 0 && !P_CheckKeys (mo, line->locknumber, remote)) return false;
lineActivation = line->activation;
repeat = line->flags & ML_REPEAT_SPECIAL;
buttonSuccess = false;
@ -198,6 +200,9 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVe
line->args[1], line->args[2],
line->args[3], line->args[4]);
// [MK] Fire up WorldLineActivated
if ( buttonSuccess ) E_WorldLineActivated(line, mo);
special = line->special;
if (!repeat && buttonSuccess)
{ // clear the special on non-retriggerable lines