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 zombie bash parties #44673

Merged
merged 2 commits into from
Oct 8, 2020
Merged

Stop zombie bash parties #44673

merged 2 commits into from
Oct 8, 2020

Conversation

kevingranade
Copy link
Member

Summary

SUMMARY: Bugfixes "Prevent monsters from bashing obstacles based on tracking sounds."

Purpose of change

Zombie bash parties have been a problem for a long time now. One zombie hears a noise and starts wandering toward it.
The zombie encounters something it thinks it can bash through, frequently a car, and starts bashing it.
The noise attracts other zombies, more bashing ensues.

Describe the solution

Zombies simply don't bash when all they're doing is tracking a noise.
They will still bash when they see or saw a player recently and are walking to their last known location.
They will still bash when tracking scent.

Describe alternatives you've considered

I think we should whitelist some "sounds like a living creature" noises and set a flag that re-enables bashing when following that kind of noise.

Testing

Make yourself invisible and scentless, spawn a bunch of zombies and a car.
Throw a rock at the car. The zombies should approach it, but not start smashing it to pieces.

@I-am-Erk I-am-Erk added <Bugfix> This is a fix for a bug (or closes open issue) Monsters Monsters both friendly and unfriendly. labels Oct 6, 2020
@esotericist
Copy link
Contributor

esotericist commented Oct 6, 2020

so in the process of testing this, i discovered that monsters with CAN_OPEN_DOORS will not open doors in order to reach sound sources with this PR.

the apparent cause of this is needing the moved variable to be set true at some point in monster::move(), which doesn't happen when we bail out of the bash evaluation span with the wander check.

monmove.cpp, around line 1024:
image

@esotericist
Copy link
Contributor

i have no idea if my fix is adequate. i do know it causes ferals to open all doors along their path, like some kind of compulsion:

image

personally, i kinda like this as a "let's make the path as clear as we can" thing, but it might be weird in some contexts.

@ZhilkinSerg ZhilkinSerg merged commit 3d4e966 into master Oct 8, 2020
@kevingranade kevingranade deleted the kevingranade-dont-noise-bash branch October 10, 2020 23:05
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) Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants