Merge branch 'zmaster'

This commit is contained in:
Christoph Oelckers 2016-01-10 10:30:23 +01:00
commit bfbc160b0c
2 changed files with 11 additions and 7 deletions

View file

@ -5973,15 +5973,19 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
case ACSF_SetSectorTerrain:
if (argCount >= 3)
{
int terrain = P_FindTerrain(FBehavior::StaticLookupString(args[2]));
FSectorTagIterator it(args[0]);
int s;
while ((s = it.Next()) >= 0)
if (args[1] == sector_t::floor || args[1] == sector_t::ceiling)
{
sectors[s].terrainnum[args[1]] = terrain;
int terrain = P_FindTerrain(FBehavior::StaticLookupString(args[2]));
FSectorTagIterator it(args[0]);
int s;
while ((s = it.Next()) >= 0)
{
sectors[s].terrainnum[args[1]] = terrain;
}
}
}
break;
default:
break;
}

View file

@ -698,7 +698,7 @@ Renderer::Renderer(float sample_rate, const char *args)
if (def_instr_name.IsNotEmpty())
set_default_instrument(def_instr_name);
voices = clamp<int>(midi_voices, 16, 256);
voices = MAX(*midi_voices, 16);
voice = new Voice[voices];
drumchannels = DEFAULT_DRUMCHANNELS;
}