mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 11:30:44 +00:00
Mapster32 sound: fixes bug when sound definitions are located in more than one con file.
git-svn-id: https://svn.eduke32.com/eduke32@1258 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8151a49817
commit
59e2177364
1 changed files with 6 additions and 6 deletions
|
@ -9002,7 +9002,7 @@ int32_t parseconsounds(scriptfile *script)
|
||||||
{
|
{
|
||||||
int32_t tokn;
|
int32_t tokn;
|
||||||
char *cmdtokptr;
|
char *cmdtokptr;
|
||||||
int32_t numsounds=0, num_invalidsounds=0;
|
int32_t num_invalidsounds=0;
|
||||||
|
|
||||||
tokenlist cstokens[] =
|
tokenlist cstokens[] =
|
||||||
{
|
{
|
||||||
|
@ -9037,7 +9037,6 @@ int32_t parseconsounds(scriptfile *script)
|
||||||
int32_t tmp = parseconsounds(included);
|
int32_t tmp = parseconsounds(included);
|
||||||
scriptfile_close(included);
|
scriptfile_close(included);
|
||||||
if (tmp < 0) return tmp;
|
if (tmp < 0) return tmp;
|
||||||
numsounds += tmp;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -9121,8 +9120,8 @@ BAD:
|
||||||
g_sounds[sndnum].pr = pr;
|
g_sounds[sndnum].pr = pr;
|
||||||
g_sounds[sndnum].m = m;
|
g_sounds[sndnum].m = m;
|
||||||
g_sounds[sndnum].vo = vo;
|
g_sounds[sndnum].vo = vo;
|
||||||
g_sndnum[numsounds] = g_definedsndnum[numsounds] = sndnum;
|
g_sndnum[g_numsounds] = g_definedsndnum[g_numsounds] = sndnum;
|
||||||
numsounds++;
|
g_numsounds++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case T_EOF:
|
case T_EOF:
|
||||||
|
@ -9132,7 +9131,7 @@ BAD:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
END:
|
END:
|
||||||
return numsounds;
|
return g_numsounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t loadconsounds(char *fn)
|
int32_t loadconsounds(char *fn)
|
||||||
|
@ -9166,7 +9165,8 @@ void ExtPreLoadMap(void)
|
||||||
static int32_t soundinit = 0;
|
static int32_t soundinit = 0;
|
||||||
if (!soundinit)
|
if (!soundinit)
|
||||||
{
|
{
|
||||||
g_numsounds = loadconsounds(gamecon);
|
g_numsounds = 0;
|
||||||
|
loadconsounds(gamecon);
|
||||||
if (g_numsounds > 0)
|
if (g_numsounds > 0)
|
||||||
{
|
{
|
||||||
if (S_SoundStartup() != 0)
|
if (S_SoundStartup() != 0)
|
||||||
|
|
Loading…
Reference in a new issue