OnRegister triggered twice when returning to map in hub
Posted: Tue Aug 28, 2018 3:32 am
I noticed that OnRegister (ZScript) is called twice for an event class when the player returns to a map in a hub.
I have included a small demo pk3 with 2 maps; just walk to the exit signs and check the console; you will see that OnRegister is called once when a map is entered for the the first time, but on return it's always called twice.
Some remarks:
- I discovered this with the latest version 3.5.1, but it seems to exist for quite some time (tested back as far as 3.2.4 and it also already happened there);
- it doesn't make any difference if the events are defined with AddEventHandlers on game level or with EventHandlers on map level (see MAPINFO)