- create named texture copies for 'tilefromtexture' replacements.

We want to be able later to find them in the texture manager again.
This commit is contained in:
Christoph Oelckers 2020-10-10 16:52:04 +02:00
parent c478d1add2
commit f9ab77f700
2 changed files with 7 additions and 0 deletions

View file

@ -619,6 +619,9 @@ int tileImportFromTexture(const char* fn, int tilenum, int alphacut, int istextu
if (xsiz <= 0 || ysiz <= 0)
return -2;
// create a new game texture here - we want to give it a new name!
tex = MakeGameTexture(tex->GetTexture(), FStringf("#%05d", tilenum), ETextureType::Override);
TexMan.AddGameTexture(tex);
TileFiles.tiledata[tilenum].backup = TileFiles.tiledata[tilenum].texture = tex;
if (istexture)
tileSetHightileReplacement(tilenum, 0, fn, (float)(255 - alphacut) * (1.f / 255.f), 1.0f, 1.0f, 1.0, 1.0, 0);

View file

@ -408,6 +408,10 @@ void GameInterface::UpdateSounds(void)
int S_PlaySound3D(int sndnum, int spriteNum, const vec3_t* pos, int channel, EChanFlags flags)
{
if (sndnum == GENERIC_AMBIENCE1 || sndnum == DUMPSTER_MOVE)
{
int a = 0;
}
auto const pl = &ps[myconnectindex];
if (!soundEngine->isValidSoundId(sndnum+1) || !SoundEnabled() || (unsigned)spriteNum >= MAXSPRITES || !playrunning() ||
(pl->timebeforeexit > 0 && pl->timebeforeexit <= REALGAMETICSPERSEC * 3)) return -1;