mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 14:30:48 +00:00
sound: use current func name in Com_Error
This commit is contained in:
parent
f73bcf5fbd
commit
6f045f71af
2 changed files with 10 additions and 8 deletions
|
@ -308,17 +308,18 @@ S_FindName(char *name, qboolean create)
|
|||
|
||||
if (!name)
|
||||
{
|
||||
Com_Error(ERR_FATAL, "S_FindName: NULL\n");
|
||||
Com_Error(ERR_FATAL, "%s: NULL\n", __func__);
|
||||
}
|
||||
|
||||
if (!name[0])
|
||||
{
|
||||
Com_Error(ERR_FATAL, "S_FindName: empty name\n");
|
||||
Com_Error(ERR_FATAL, "%s: empty name\n", __func__);
|
||||
}
|
||||
|
||||
if (strlen(name) >= MAX_QPATH)
|
||||
{
|
||||
Com_Error(ERR_FATAL, "Sound name too long: %s", name);
|
||||
Com_Error(ERR_FATAL, "%s :Sound name too long: %s",
|
||||
__func__, name);
|
||||
}
|
||||
|
||||
/* see if already loaded */
|
||||
|
@ -348,7 +349,7 @@ S_FindName(char *name, qboolean create)
|
|||
{
|
||||
if (num_sfx == MAX_SFX)
|
||||
{
|
||||
Com_Error(ERR_FATAL, "S_FindName: out of sfx_t");
|
||||
Com_Error(ERR_FATAL, "%s: out of sfx_t", __func__);
|
||||
}
|
||||
|
||||
num_sfx++;
|
||||
|
@ -390,7 +391,7 @@ S_AliasName(char *aliasname, char *truename)
|
|||
{
|
||||
if (num_sfx == MAX_SFX)
|
||||
{
|
||||
Com_Error(ERR_FATAL, "S_FindName: out of sfx_t");
|
||||
Com_Error(ERR_FATAL, "%s: out of sfx_t", __func__);
|
||||
}
|
||||
|
||||
num_sfx++;
|
||||
|
@ -572,7 +573,7 @@ S_PickChannel(int entnum, int entchannel)
|
|||
|
||||
if (entchannel < 0)
|
||||
{
|
||||
Com_Error(ERR_DROP, "S_PickChannel: entchannel<0");
|
||||
Com_Error(ERR_DROP, "%s: entchannel<0", __func__);
|
||||
}
|
||||
|
||||
/* Check for replacement sound, or find the best one to replace */
|
||||
|
@ -920,7 +921,7 @@ S_StartLocalSound(char *sound)
|
|||
|
||||
if (!sfx)
|
||||
{
|
||||
Com_Printf("S_StartLocalSound: can't cache %s\n", sound);
|
||||
Com_Printf("%s: can't cache %s\n", __func__, sound);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -195,7 +195,8 @@ GetWavinfo(char *name, byte *wav, int wavlength)
|
|||
{
|
||||
if (samples < info.samples)
|
||||
{
|
||||
Com_Error(ERR_DROP, "Sound %s has a bad loop length", name);
|
||||
Com_Error(ERR_DROP, "%s: Sound %s has a bad loop length",
|
||||
__func__, name);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue