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

Fix TF2_OnIsHolidayActive forward not getting called after map change #1752

Merged
merged 2 commits into from
Apr 22, 2022

Conversation

Mikusch
Copy link
Contributor

@Mikusch Mikusch commented Apr 20, 2022

Fixes #1747

After a map change, the virtual hook on IsHolidayActive will be invalid due to the gamerules object being destroyed, but current code does not attempt to hook it again if a plugin using the TF2_OnIsHolidayActive forward is still loaded.

Always unhook on level change, and check for plugins using the forward only in HolidayManager::OnPluginUnloaded.

@peace-maker
Copy link
Member

Maybe it's better to just call the function Unhook now that it always does that.

@Mikusch
Copy link
Contributor Author

Mikusch commented Apr 20, 2022

Maybe it's better to just call the function Unhook now that it always does that.

I agree. Done.

@peace-maker peace-maker changed the title Fix TF2_IsHolidayActive forward not getting called after map change Fix TF2_OnIsHolidayActive forward not getting called after map change Apr 20, 2022
@peace-maker peace-maker merged commit a1ad9e1 into alliedmodders:master Apr 22, 2022
@Mikusch Mikusch deleted the holiday-fix branch April 22, 2022 09:57
asherkin pushed a commit that referenced this pull request May 4, 2022
…#1752)

* Fix TF2_IsHolidayActive forward not getting called after map change

* Rename function to Unhook
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.

TF2_OnIsHolidayActive forward does not get called anymore after a map change
2 participants