mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Fix sound indexes not erased correctly
This commit is contained in:
parent
6136bbd019
commit
ef09f136d4
3 changed files with 8 additions and 8 deletions
|
@ -6413,7 +6413,7 @@ void Entity::PlayNonPvsSound(const str& soundName, float volume)
|
|||
if (name.length() && ret) {
|
||||
nonpvs_sound_t* npvs = &edict->r.nonpvs_sounds[edict->r.num_nonpvs_sounds];
|
||||
|
||||
npvs->index = gi.soundindex(name.c_str(), ret->streamed);
|
||||
npvs->index = gi.pvssoundindex(name.c_str(), ret->streamed);
|
||||
npvs->volume = G_Random() * ret->volumeMod + ret->volume * volume;
|
||||
npvs->minDist = ret->dist;
|
||||
npvs->maxDist = ret->maxDist;
|
||||
|
|
|
@ -461,6 +461,12 @@ typedef struct gameImport_s {
|
|||
void (*HudDrawFont)(int info, const char *fontName);
|
||||
qboolean (*SanitizeName)(const char *oldName, char *newName);
|
||||
|
||||
//
|
||||
// Added in OPM
|
||||
//
|
||||
|
||||
int (*pvssoundindex)(const char* name, int streamed);
|
||||
|
||||
cvar_t *fsDebug;
|
||||
|
||||
//
|
||||
|
@ -532,12 +538,6 @@ typedef struct gameExport_s {
|
|||
void (*SetFrameNumber)(int frameNumber);
|
||||
void (*SoundCallback)(int entNum, soundChannel_t channelNumber, const char *name);
|
||||
|
||||
//
|
||||
// Added in OPM
|
||||
//
|
||||
|
||||
int (*pvssoundindex)(const char* name, int streamed);
|
||||
|
||||
//
|
||||
// global variables shared between game and server
|
||||
//
|
||||
|
|
|
@ -1803,7 +1803,7 @@ void SV_InitGameProgs( void ) {
|
|||
import.fsDebug = fs_debug;
|
||||
|
||||
// Added in OPM
|
||||
import.soundindex = SV_PVSSoundIndex;
|
||||
import.pvssoundindex = SV_PVSSoundIndex;
|
||||
|
||||
ge = Sys_GetGameAPI( &import );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue