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

Stop Hulks teleporting after shoving vehicle. #37117

Merged
merged 1 commit into from Jan 16, 2020
Merged

Stop Hulks teleporting after shoving vehicle. #37117

merged 1 commit into from Jan 16, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 16, 2020

Summary

SUMMARY: Bugfixes "Stop Hulks teleporting after shoving vehicle."

Purpose of change

Fixes #36190

Describe the solution

The shove_vehicle() function can trigger a submap shift, if the player is in the vehicle when it moves, then the rest of monster::move() can carry on using a local position it stored beforehand, to move to.
So ive just changed that to store absolute position, then convert it to local after shove_vehicle, when it comes time to actually move there.
That way any submap shifting wont invalidate that position.

Describe alternatives you've considered

N/A

Testing

Loaded save in linked issue, hulk didnt teleport.
Spawned a few mothe rmonsters and moved around to make sure monster movement in general wasnt broken by this change.

Additional context

N/A

@ZhilkinSerg ZhilkinSerg 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 Jan 16, 2020
@ZhilkinSerg ZhilkinSerg merged commit ad53cdb into CleverRaven:master Jan 16, 2020
va5h added a commit to va5h/Cataclysm-DDA that referenced this pull request Jan 17, 2020
@ghost ghost deleted the teleporting_hulk branch January 17, 2020 09:55
@ghost ghost mentioned this pull request Jan 17, 2020
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.

The amazing teleporting hulk
1 participant