You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 22, 2025. It is now read-only.
@@ -162,35 +154,35 @@ distance_multiplier - Can be used to multiply the distance at which the sound is
162
154
if(distance <=1)
163
155
pressure_factor = max(pressure_factor, 0.15) //touching the source of the sound
164
156
165
-
S.volume *= pressure_factor
157
+
sound_to_use.volume *= pressure_factor
166
158
//End Atmosphere affecting sound
167
159
168
-
if(S.volume <=0)
160
+
if(sound_to_use.volume <=0)
169
161
return//No sound
170
162
171
-
var/dx= turf_source.x -T.x // Hearing from the right/left
172
-
S.x = dx * distance_multiplier
173
-
var/dz= turf_source.y -T.y // Hearing from infront/behind
174
-
S.z = dz * distance_multiplier
175
-
var/dy= (turf_source.z -T.z) *5* distance_multiplier // Hearing from above / below, multiplied by 5 because we assume height is further along coords.
176
-
S.y = dy
163
+
var/dx= turf_source.x -turf_loc.x // Hearing from the right/left
164
+
sound_to_use.x = dx * distance_multiplier
165
+
var/dz= turf_source.y -turf_loc.y // Hearing from infront/behind
166
+
sound_to_use.z = dz * distance_multiplier
167
+
var/dy= (turf_source.z -turf_loc.z) *5* distance_multiplier // Hearing from above / below, multiplied by 5 because we assume height is further along coords.
168
+
sound_to_use.y = dy
177
169
178
-
S.falloff = max_distance ||1//use max_distance, else just use 1 as we are a direct sound so falloff isnt relevant.
170
+
sound_to_use.falloff = max_distance ||1//use max_distance, else just use 1 as we are a direct sound so falloff isnt relevant.
179
171
180
172
// Sounds can't have their own environment. A sound's environment will be:
181
173
// 1. the mob's
182
174
// 2. the area's (defaults to SOUND_ENVRIONMENT_NONE)
0 commit comments