Add WorldLinePreActivated to override line activation, as a counterpart to WorldLineActivated.

This commit is contained in:
Mari the Deer 2018-03-24 15:59:20 +01:00 committed by Christoph Oelckers
commit 0656916bf2
4 changed files with 38 additions and 2 deletions

View file

@ -189,6 +189,11 @@ bool P_ActivateLine (line_t *line, AActor *mo, int side, int activationType, DVe
return false;
}
// [MK] Use WorldLinePreActivated to decide if activation should continue
bool shouldactivate = true;
E_WorldLinePreActivated(line, mo, &shouldactivate);
if ( !shouldactivate ) 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;