Bug #1212

Disable flying rifle grenade sound

Added by Bystry 5 months ago. Updated 3 months ago.

Status:New% Done:

0%

Priority:LowSpent time:-
Assignee:-
Category:Mod CGAME
Target version:2.78
OS: Arch:

Description

Remove very annoying sound of rifle grenade flying next to/towards a player.

Hatcher wrote on Discord (19.02.2019):

I’ve found that sound. It’s an original sound file from etmain’s pak0.pk3.
sound\weapons\garand\m1_grenade_fly.wav
sound\weapons\k43\k43_grenade_fly.wav
Most likely the original developers decided on not using it after all for the same reason we’re complaining about. It’s nost just annoying but also a cheesy sound effect. Later mods like ETPub which Legacy is based on must’ve decided to reintroduce it if it wasn’t somebody from Legacy.

Associated revisions

Revision 9688eac5
Added by Spyhawk 3 months ago

mod: disabled flying grenade sound, refs #1212

History

#1 Updated by Bystry 5 months ago

  • Subject changed from Disable flying rifle name sound to Disable flying rifle grenade sound

#2 Updated by Spyhawk 5 months ago

  • Category set to Mod CGAME
  • Priority changed from Normal to Low
  • Target version set to 2.77

#3 Updated by Spyhawk 4 months ago

Note: the SDL and OpenAL backend provide a quite different experience (f.e., I don’t even hear that sound when using the grenade launcher with SDL2, and with OpenAL it actually improves the audio experience imho). I don’t understand the complaints from people saying it’s "loud" and "cheesy", but these issues might be due to using SDL2 - I have been using OpenAL as my backend of choice for a long time now. Test and investigate with SDL2 backend.

#4 Updated by Aranud 4 months ago

Little analyze : in the code below, the riflenade shoot sound is called like this (from CG_Missile in cg_ents.c) :

trap_S_AddLoopingSound(cent->lerpOrigin, velocity, weapon->missileSound, volume, 0);

           // add missile sound

            if (weapon->missileSound)
            {
                        if (GetWeaponTableData(cent->currentState.weapon)->type x%x% WEAPON_TYPE_RIFLENADE)
                        {
                                   if (!cent->currentState.effect1Time)
                                   {
                                               int flytime = cg.time - cent->currentState.pos.trTime;

                                               if (flytime > 300)
                                               {
                                                           // have a quick fade in so we don't have a pop
                                                           vec3_t velocity;
                                                           int    volume = flytime > 375 ? 255 : (int)((75.f / ((float)flytime - 300.f)) * 255);

                                                           BG_EvaluateTrajectoryDelta(x%x%cent->currentState.pos, cg.time, velocity, qfalse, -1);
                                                           trap_S_AddLoopingSound(cent->lerpOrigin, velocity, weapon->missileSound, volume, 0);
                                               }
                                   }
                        }
                        else
                        {
                                   vec3_t velocity;

                                   BG_EvaluateTrajectoryDelta(x%x%cent->currentState.pos, cg.time, velocity, qfalse, -1);
                                   trap_S_AddLoopingSound(cent->lerpOrigin, velocity, weapon->missileSound, 255, 0);

                        }
            }

the called function work like this :

void trap_S_AddLoopingSound(const vec3_t origin, const vec3_t velocity, sfxHandle_t sfx, int volume, int soundTime)

In SDL all the parmeters are used .... but with OpenAL we are unusing range and SoundTime parameters.

Range is set by default at 1250, and the SoundTime is set to 0 for riflenade missile fly sound .... This mean no looping sound and no sound at all !!!
The non implement SoundTime parameters in OpenAL "play" the sound we never hear before with SDL2 ... because this sound was shut down.

#5 Updated by Spyhawk 3 months ago

  • Target version changed from 2.77 to 2.78

Disabling for now. We can see later if that backend issue can be fixed and if these sounds are worth adding.

Also available in: Atom PDF