- SW: don't spawn sprites to play wall sounds.

This function isn't really necessary because we got a sound playing variant that takes a world coordinate, which is far more practical here. Worse, this was leaking sprites.
This commit is contained in:
Christoph Oelckers 2021-11-01 08:40:32 +01:00
parent a7cde2fd96
commit f401d4bb44

View file

@ -80,25 +80,14 @@ extern ParentalStruct aVoxelArray[MAXTILES];
/////////////////////////////////////////////////////
void SpawnWallSound(short sndnum, short i)
{
short SpriteNum;
vec3_t mid;
SPRITEp sp;
SpriteNum = COVERinsertsprite(0, STAT_DEFAULT);
if (SpriteNum < 0)
return;
sp = &sprite[SpriteNum];
sp->cstat = 0;
sp->extra = 0;
// Get wall midpoint for offset in mirror view
mid.x = (wall[i].x + wall[wall[i].point2].x) / 2;
mid.y = (wall[i].y + wall[wall[i].point2].y) / 2;
mid.z = (sector[wall[i].nextsector].ceilingz + sector[wall[i].nextsector].floorz) / 2;
setspritez(SpriteNum, &mid);
sp = &sprite[SpriteNum];
PlaySound(sndnum, sp, v3df_dontpan | v3df_doppler);
PlaySound(sndnum, &mid, v3df_dontpan | v3df_doppler);
}
short