Skip to content

Support sectors as sound origins in Lua

Tatsuru requested to merge Tatsuru/SRB2:lua-sectorsounds into next

This allows S_StartSound, S_StartSoundAtVolume, S_StopSound, S_StopSoundByID, S_OriginPlaying and S_SoundPlaying to also recognize sector_t userdata as the first argument, allowing Lua to play sounds from sectors just like linedef type 414.

This also fixes a small glitch where the origin of a sound is never properly cleared from sound channels, making S_OriginPlaying and S_SoundPlaying give inaccurate return values, as well as purge a seemingly unused piece of Doom code.

Edited by Tatsuru

Merge request reports

Loading