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

Reset mount moves on dismount #33461

Merged
merged 3 commits into from Aug 22, 2019
Merged

Reset mount moves on dismount #33461

merged 3 commits into from Aug 22, 2019

Conversation

ghost
Copy link

@ghost ghost commented Aug 22, 2019

Summary

SUMMARY: Bugfixes "Reset mount moves on dismount"

Purpose of change

Fixes #32463

Describe the solution

Horses - all mounts, stored up their moves while you are riding them, and never used them.
So it was quite possible for them to have 100,000 moves + after a while.
Then when you dismounted, they used all of them at once.
This resulted in lag, sound /message spam, and often,t he horse zooming off into the distance.

Describe alternatives you've considered

N/A

Additional context

N/A

@ghost ghost added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly. labels Aug 22, 2019
@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/horse-went-poof/21132/4

src/player.cpp Outdated Show resolved Hide resolved
@jeremyshannon
Copy link
Contributor

It might be worth giving the mount a few free moves to use when you're forcibly dismounted. When dismounting voluntarily, a horse should (hopefully) stand there while you do it, but when a brute knocks you flying out of the saddle it would probably look less goofy if the horse were to jump away in the process, rather than just stand there with a surprised look on his face.

@ghost
Copy link
Author

ghost commented Aug 22, 2019

It might be worth giving the mount a few free moves to use when you're forcibly dismounted. When dismounting voluntarily, a horse should (hopefully) stand there while you do it, but when a brute knocks you flying out of the saddle it would probably look less goofy if the horse were to jump away in the process, rather than just stand there with a surprised look on his face.

It will get its moves as normal as soon as your dismounted. it will be able to react just as quickly as the player does.

And infact often its the horse that is hulk smashed and yeeted long distance, which prompts the forced dismount, so they would react in the same way as the player would then aswell, or any other monster smashed by a hulk
.

@jeremyshannon
Copy link
Contributor

jeremyshannon commented Aug 22, 2019

It will get its moves as normal as soon as your dismounted. it will be able to react just as quickly as the player does.

I'm aware, it just seems like the mount, who is theoretically able to move on his own and only held back by the riding code, should react as it happens instead of after you land. Which I think is not entirely feasible, but might be approximated by giving him some extra moves to count for what he did as you were dislodged.

@kevingranade
Copy link
Member

The current status of this is that the mount's moves when the player mounts them is preserved through the riding process, so when the player is dismounted, the mount is most likely going to have a non-zero number of moves.

@kevingranade kevingranade merged commit 3825c95 into CleverRaven:master Aug 22, 2019
@ghost ghost deleted the horse_zoom_fix2 branch September 11, 2019 09:57
misterprimus pushed a commit to misterprimus/Cataclysm-DDA that referenced this pull request Sep 21, 2019
* stop regeneration of moves instead of resetting on dismount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Horse sounds lag the game upon dismounting
3 participants