Skip to content

Commit

Permalink
SV_BuildSoundMsg: fix '\n' in args check
Browse files Browse the repository at this point in the history
- fix #965
  • Loading branch information
SergeyShorokhov committed May 8, 2023
1 parent 1796459 commit a680f18
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rehlds/engine/sv_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,22 +680,22 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int

if (volume < 0 || volume > 255)
{
Con_Printf("%s: volume = %i", __func__, volume);
Con_Printf("%s: volume = %i\n", __func__, volume);
volume = (volume < 0) ? 0 : 255;
}
if (attenuation < 0.0f || attenuation > 4.0f)
{
Con_Printf("%s: attenuation = %f", __func__, attenuation);
Con_Printf("%s: attenuation = %f\n", __func__, attenuation);
attenuation = (attenuation < 0.0f) ? 0.0f : 4.0f;
}
if (channel < 0 || channel > 7)
{
Con_Printf("%s: channel = %i", __func__, channel);
Con_Printf("%s: channel = %i\n", __func__, channel);
channel = (channel < 0) ? CHAN_AUTO : CHAN_NETWORKVOICE_BASE;
}
if (pitch < 0 || pitch > 255)
{
Con_Printf("%s: pitch = %i", __func__, pitch);
Con_Printf("%s: pitch = %i\n", __func__, pitch);
pitch = (pitch < 0) ? 0 : 255;
}

Expand All @@ -707,7 +707,7 @@ qboolean SV_BuildSoundMsg(edict_t *entity, int channel, const char *sample, int
sound_num = Q_atoi(sample + 1);
if (sound_num >= CVOXFILESENTENCEMAX)
{
Con_Printf("%s: invalid sentence number: %s", __func__, sample + 1);
Con_Printf("%s: invalid sentence number: %s\n", __func__, sample + 1);
return FALSE;
}
}
Expand Down

0 comments on commit a680f18

Please sign in to comment.