Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.17k stars 85 forks source link

Trigger improvements #636

Closed thokkat closed 4 months ago

thokkat commented 6 months ago

This aims at fixing some more trigger quirks.

Apparently movers ignore fireDelay and sendUntrigger. In https://github.com/Try/OpenGothic/discussions/622 issues13.1 the stone gate opens immediately instead of respecting delay and the metal gate doesn't have sendUntrigger set to true, blocking it from opening. I added retriggerDelay here as well without testing.

Same goes for collision. Part of code in https://github.com/Try/OpenGothic/pull/635 suggests movers can't have it and I confirmed it by testing. CsCamera behave the same way. In sleeper temple are some that could be wrongly triggered by normal walking. I changed the test for number of npcs in a trigger zone to be any positive number instead of exactly one. There was a case where a number of skeletons following the player would prevent the trigger.

In another case a trigger activated by intersection had a fireDelay. Because it was not called by WorldObjects::execTriggerEvent it did not work. This made it necessary to move the call for population of triggersDef object inside AbstractTrigger class.

Try commented 4 months ago

Merged, thanks!