mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-04-22 03:00:47 +00:00
Fix audio pitch issues with clients that actually support it.
This commit is contained in:
parent
307828a2a2
commit
e51c134d02
2 changed files with 5 additions and 5 deletions
|
@ -661,7 +661,7 @@ static void PF_sound (void)
|
|||
edict_t *entity;
|
||||
int volume;
|
||||
float attenuation;
|
||||
float ratepct;
|
||||
float rate;
|
||||
unsigned int flags;
|
||||
float offset;
|
||||
|
||||
|
@ -671,7 +671,7 @@ static void PF_sound (void)
|
|||
volume = G_FLOAT(OFS_PARM3) * 255;
|
||||
attenuation = G_FLOAT(OFS_PARM4);
|
||||
|
||||
ratepct = (qcvm->argc<6)?100:G_FLOAT(OFS_PARM5);
|
||||
rate = (qcvm->argc<6)?1:G_FLOAT(OFS_PARM5)/100;
|
||||
flags = (qcvm->argc<7)?0:G_FLOAT(OFS_PARM6);
|
||||
offset = (qcvm->argc<8)?0:G_FLOAT(OFS_PARM7);
|
||||
|
||||
|
@ -681,7 +681,7 @@ static void PF_sound (void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (ratepct && ratepct != 100)
|
||||
if (rate && rate != 1)
|
||||
Con_DPrintf("sound() rate scaling is not supported\n");
|
||||
if (flags)
|
||||
Con_DPrintf("sound() flags %#x not supported\n", flags);
|
||||
|
@ -698,7 +698,7 @@ static void PF_sound (void)
|
|||
if (channel < 0 || channel > 7)
|
||||
Host_Error ("SV_StartSound: channel = %i", channel);
|
||||
*/
|
||||
SV_StartSound (entity, NULL, channel, sample, volume, attenuation);
|
||||
SV_StartSound2 (entity, NULL, channel, sample, volume, attenuation, rate, flags, offset);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1740,7 +1740,7 @@ void SV_StartSound2 (edict_t *entity, float *origin, int channel, const char *sa
|
|||
}
|
||||
void SV_StartSound (edict_t *entity, float *origin, int channel, const char *sample, int volume, float attenuation)
|
||||
{
|
||||
SV_StartSound2 (entity, origin, channel, sample, volume, attenuation, 100, 0, 0);
|
||||
SV_StartSound2 (entity, origin, channel, sample, volume, attenuation, 1, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue