StrataSource / Engine

Issue tracker for Strata Source
https://stratasource.org
48 stars 2 forks source link

Bug: prop_door_rotating playing sounds everywhere #15

Open darvil82 opened 3 years ago

darvil82 commented 3 years ago

Describe the bug

This actually happens in any source game, if the sound specified for the prop_door_rotating is RAW, it will be played everywhere in the map, this isn't normally a problem if you are playing singleplayer, unless you want to close a door that is far from the player (which is the problem I'm experiencing). image

To Reproduce

Steps to reproduce the behavior:

  1. Make a prop_door_rotating with any sound set as RAW.
  2. Open/Close from the distance (firing Open, setting the Delay Before Close keyvalue, etc...)
  3. Notice how the sound plays everywhere.

Expected behavior

The sound playing at the right volume and position depending on the distance of the player relative to the door.

Gocnak commented 3 years ago

Wiki page for linked snippet: https://developer.valvesoftware.com/wiki/Prop_door_rotating

Looks like this just needs to use a CPASAttenuation filter for playing the sound.