2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 18:07:09 +01:00

engine: server: do not apply sound precache check for sentences, as they may start with 0 index

This commit is contained in:
Alibek Omarov 2022-12-13 11:12:08 +03:00
parent 07afbd64d4
commit cd813bbfbe

View File

@ -2091,12 +2091,12 @@ int SV_BuildSoundMsg( sizebuf_t *msg, edict_t *ent, int chan, const char *sample
// precache_sound can be used twice: cache sounds when loading
// and return sound index when server is active
sound_idx = SV_SoundIndex( sample );
}
if( !sound_idx )
{
Con_Printf( S_ERROR "SV_StartSound: %s not precached (%d)\n", sample, sound_idx );
return 0;
if( !sound_idx )
{
Con_Printf( S_ERROR "SV_StartSound: %s not precached (%d)\n", sample, sound_idx );
return 0;
}
}
spawn = FBitSet( flags, SND_RESTORE_POSITION ) ? false : true;