From f9ab77f7004032a91a48d2c68dbe1b29e303049d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 10 Oct 2020 16:52:04 +0200 Subject: [PATCH] - create named texture copies for 'tilefromtexture' replacements. We want to be able later to find them in the texture manager again. --- source/core/textures/buildtiles.cpp | 3 +++ source/games/duke/src/sounds.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/source/core/textures/buildtiles.cpp b/source/core/textures/buildtiles.cpp index 7ddd2a4cf..022f3cb72 100644 --- a/source/core/textures/buildtiles.cpp +++ b/source/core/textures/buildtiles.cpp @@ -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); diff --git a/source/games/duke/src/sounds.cpp b/source/games/duke/src/sounds.cpp index 3a077945e..c61dc6026 100644 --- a/source/games/duke/src/sounds.cpp +++ b/source/games/duke/src/sounds.cpp @@ -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;