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 gargoyles being always awake in mp #6736
base: master
Are you sure you want to change the base?
Conversation
I think this fix actually makes them behave in a way that is most logical. Once they sense no threat nearby (on that level) they take their stone-like form. |
I agree with qndel that it's not a proper fix but is a huge improvement. |
I think the proper fix in this case wouldn't align as well as Qndel's fix with the expected behavior of these monsters with their unique ability. In my opinion either way would be perfectly fine really and the fact that we can have this fix is a huge improvement. |
I have a feeling you don't understand how a proper fix would differ from what Qndel has implemented here. The main problem with this fix is that Gargoyles that were in line-of-sight of the player within 13 seconds of them entering a Town Portal will still wake up regardless of whether they were close enough to do so. This is no different from how those Gargoyles would behave without this fix, but it is still unusual and would still cause desync. A proper fix would resolve that issue by accurately tracking the monster flags. If a Gargoyle is not awake, that information would be written to the monster delta. Then we could more accurately determine whether the Gargoyle is supposed to be awake or not when entering a Town Portal and reloading the level. Perhaps you meant to say that qndel's fix before he edited it was better than a proper fix (and also his edit). If so.. well, you might be right. That fix could still cause desync for Gargoyles that retreat to go heal, but I don't think syncing the flags alone would be enough to resolve that issue anyway. |
From Qndel's description I thought his fix makes all Gargoyles sit and heal once all players leave the level regardless of whether they are awake or not. I assumed that the proper fix he was thinking of was to save the already awoken/active gargoyles state when leaving the level so that they are still in that state when returning to it. I thought his fix made more sense. |
Partial fix for #5600
It's not a perfect fix - basically changes gargoyle's perma awake behavior on subsequent visits to always sit - if player is close, gargoyle will get up anyway - checking for
MFLAG_ALLOW_SPECIAL
is pointless because I think it will be always set from initializing the monster.activeForTick
wasn't useful either because it can be non-zero and the monster can be sitting anyway - the range at which they wake up is determined by their intelligence. A proper fix would be to rewrite everything to sync actual monster flags in MP - but that's a much bigger and more complex change and imo this fix improves current situation anyway.After adding a check for nonzero activeForTicks, this PR is a straight improvement for current situation - gargoyles that are close will wake up anyway but this will prevent awakening them on the whole level.