Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger improvements #636

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Trigger improvements #636

merged 2 commits into from
Jul 3, 2024

Conversation

thokkat
Copy link
Contributor

@thokkat thokkat commented May 24, 2024

This aims at fixing some more trigger quirks.

Apparently movers ignore fireDelay and sendUntrigger. In #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 #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.

@thokkat thokkat mentioned this pull request May 24, 2024
@@ -122,6 +122,7 @@ class World final {
void triggerEvent(const TriggerEvent& e);
void triggerChangeWorld(std::string_view world, std::string_view wayPoint);
void execTriggerEvent(const TriggerEvent& e);
void addDefTrigger(AbstractTrigger& t);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addDefTrigger -> enableDefTrigger

game/world/worldobjects.cpp Show resolved Hide resolved
game/world/worldobjects.cpp Show resolved Hide resolved
@thokkat thokkat requested a review from Try July 3, 2024 16:47
@Try Try merged commit 94fa80e into Try:master Jul 3, 2024
1 check passed
@Try
Copy link
Owner

Try commented Jul 3, 2024

Merged, thanks!

@thokkat thokkat deleted the move-trigger branch July 3, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants