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

sounds: squelch NPC messages regarding hearing footsteps #28424

Merged
merged 1 commit into from
Mar 1, 2019

Conversation

mlangsdorf
Copy link
Contributor

@mlangsdorf mlangsdorf commented Feb 28, 2019

Summary

SUMMARY: Bugfixes "sounds: squelch NPC messages regarding hearing footsteps"

Purpose of change

Players with NPCs nearby are hearing footsteps constantly. The footsteps are coming from the NPCs processing ambient sounds into the player-only section of sound processing, and displaying "add_msg" messages that were really intended to be player only.

Remove the errant sound markers and messages.

Describe the solution

Change the NPC cut-off logic to be a two-stage test:

if( npc ) {
    if( !sound.ambient ) {
        npc->hear_sound( sound );
    }
    continue;
}

instead of the current single stage test

if( npc && !sound.ambient ) {
    npc->hear_sound( sound );
    continue;
}

which continues sound processing for when NPCs hear ambient sounds.

NPCs don't respond to ambient sounds which is good, but they
continue processing them past point where all processing is
supposed to be PC only.  Fix that.
@mlangsdorf mlangsdorf added NPC / Factions NPCs, AI, Speech, Factions, Ownership [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) Sound Events Sound events handling in the game labels Feb 28, 2019
@kevingranade kevingranade added this to Confirm Fix in 0.D Release via automation Feb 28, 2019
@kevingranade kevingranade added this to the 0.D milestone Feb 28, 2019
@kevingranade kevingranade merged commit 367442a into CleverRaven:master Mar 1, 2019
kevingranade added a commit that referenced this pull request Mar 1, 2019
* master:
  sounds: squelch NPC messages regarding hearing footsteps (#28424)
  Initialize reach_attacking member. (#28430)
  Enable travis builds of development branch (#28429)
  Cap engine noise to avoid deafening
  Used abstracts with set land_use_code in some overmap terrains
  Added land code definitions and abstracts
  Allow land use code display toggle via ui
  Added land use code infrastructure
@kevingranade kevingranade moved this from Confirm Fix to Closed Issues in 0.D Release Mar 1, 2019
@mlangsdorf mlangsdorf deleted the blessed_silence branch March 1, 2019 13:36
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` NPC / Factions NPCs, AI, Speech, Factions, Ownership Sound Events Sound events handling in the game
Projects
No open projects
0.D Release
  
Closed Issues
Development

Successfully merging this pull request may close these issues.

None yet

2 participants