mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-29 11:32:13 +00:00
Merge pull request #7045 from mwerezak/no-sound-in-space
Fixes being able to hear people through a vacuum
This commit is contained in:
@@ -8,7 +8,19 @@
|
|||||||
//Does the speaker have a client? It's either random stuff that observers won't care about (Experiment 97B says, 'EHEHEHEHEHEHEHE')
|
//Does the speaker have a client? It's either random stuff that observers won't care about (Experiment 97B says, 'EHEHEHEHEHEHEHE')
|
||||||
//Or someone snoring. So we make it where they won't hear it.
|
//Or someone snoring. So we make it where they won't hear it.
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//make sure the air can transmit speech - hearer's side
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
if (T)
|
||||||
|
var/datum/gas_mixture/environment = T.return_air()
|
||||||
|
var/pressure = (environment)? environment.return_pressure() : 0
|
||||||
|
if(pressure < SOUND_MINIMUM_PRESSURE && get_dist(speaker, src) > 1)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
|
||||||
|
italics = 1
|
||||||
|
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||||
|
|
||||||
if(sleeping || stat == 1)
|
if(sleeping || stat == 1)
|
||||||
hear_sleep(message)
|
hear_sleep(message)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -73,22 +73,21 @@ var/list/department_radio_keys = list(
|
|||||||
if (speaking.flags & SIGNLANG)
|
if (speaking.flags & SIGNLANG)
|
||||||
say_signlang(message, pick(speaking.signlang_verb), speaking)
|
say_signlang(message, pick(speaking.signlang_verb), speaking)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
//make sure the air can transmit speech
|
|
||||||
var/datum/gas_mixture/environment = T.return_air()
|
|
||||||
if(environment)
|
|
||||||
var/pressure = environment.return_pressure()
|
|
||||||
if(pressure < SOUND_MINIMUM_PRESSURE)
|
|
||||||
italics = 1
|
|
||||||
message_range = 1
|
|
||||||
|
|
||||||
if (speech_sound)
|
|
||||||
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
|
||||||
|
|
||||||
var/list/listening = list()
|
var/list/listening = list()
|
||||||
var/list/listening_obj = list()
|
var/list/listening_obj = list()
|
||||||
|
|
||||||
if(T)
|
if(T)
|
||||||
|
//make sure the air can transmit speech - speaker's side
|
||||||
|
var/datum/gas_mixture/environment = T.return_air()
|
||||||
|
var/pressure = (environment)? environment.return_pressure() : 0
|
||||||
|
if(pressure < SOUND_MINIMUM_PRESSURE)
|
||||||
|
message_range = 1
|
||||||
|
|
||||||
|
if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
|
||||||
|
italics = 1
|
||||||
|
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||||
|
|
||||||
var/list/hear = hear(message_range, T)
|
var/list/hear = hear(message_range, T)
|
||||||
var/list/hearturfs = list()
|
var/list/hearturfs = list()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user