Notify scripts when door has closed/opened

This commit is contained in:
smallmodel 2024-09-01 18:43:38 +02:00
parent 981d72ac5a
commit 5baf5bccf2
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -578,6 +578,10 @@ void Door::OpenEnd(Event *ev)
} else {
StopSound(CHAN_VOICE);
}
// Added in 2.30
// Notify scripts that the door has finished opening
Unregister(STRING_DONE);
previous_state = state;
SetState(STATE_OPEN);
@ -609,6 +613,10 @@ void Door::CloseEnd(Event *ev)
previous_state = state;
SetState(STATE_CLOSED);
// Added in 2.30
// Notify scripts that the door has finished closing
Unregister(STRING_DONE);
}
void Door::Close(Event *ev)