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: two cases of NPCs printing messages in odd contexts #4098

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

chaosvolt
Copy link
Member

Purpose of change

This fixes another couple of cases of NPC messages printing in cases where they shouldn't.

Describe the solution

  1. In npcmove.cpp, set npc::move_to so the second case of having NPCs shout "lemme move ree" (the one that applies when the person blocking the way is a fellow NPC) doesn't trigger if the person committing Door Stuck is currently following the player. In this case it can be reasonably assumed they get the picture and will move out of the way on their own when the player does, and more importantly this fixes the constant "move plz" spam that happens when you've got more than one NPC follower tailing you.
  2. In sounds.cpp, set sounds::process_sound_markers so you're only reminded about noise waking you up if the person being woke up is the player, not an NPC.

Describe alternatives you've considered

Making the sound message use a player-or-npc sorta message and having the NPC version be phrased as "the noise wakes up %s" or something like that.

Testing

  1. Compiled and load-tested.
  2. Recruited an NPC and forced them to be an eepy lil guy.
  3. Set off firecrackers after waiting an hour into their snooze.
  4. No message prints but sleeping status indicator goes away.
  5. Set a laser turret on the other side of a wall plus a debug monster for it to shoot at.
  6. Infected myself with the eepy, message still printed as expected when the lasers woke me up.
  7. Recruited the poor bastard again and spawned an additional bunch of NPCs to follow along.
  8. Followers get pissy when bumbling around the NPCs I failed to recruit but after a while of walking around don't seem to complain when bumbling over each other.
  9. Checked affected files for astyle.

Additional context

Checklist

@github-actions github-actions bot added the src changes related to source code. label Jan 12, 2024
@scarf005 scarf005 changed the title fix: fix two cases of NPCs printing messages in odd contexts fix: two cases of NPCs printing messages in odd contexts Jan 12, 2024
@scarf005 scarf005 merged commit dea4a49 into cataclysmbnteam:main Jan 12, 2024
12 checks passed
@chaosvolt chaosvolt deleted the the-npc-is-eepy branch January 12, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants