OpenTomb
OpenTomb copied to clipboard
Switch trigger timer behavior
I finally figured out what makes timer in switches behave so weird. It has two stages, but only the first is performed by timer, i.e. deactivate the switch and deactivate the objects. The second stage is performed by trigger itself, i.e. inverts bits in objects mask and again deactivates objects. So, if the switch trigger was not active when objects were deactivated by timer then their masks are not changed and any other trigger which checks if it's 0x1F will activate those objects again.