mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 11:11:16 +00:00
- 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:
parent
a7cde2fd96
commit
f401d4bb44
1 changed files with 1 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue