- fixed some places in p_pillar.cpp where sector plane z's were calculated at (0, 0) which could cause overflows if the actual plane is too far away from the origin.
- renamed sector_t::soundorg in centerspot, changed the type to a fixedvec2 and removed the CenterSpot #define. Since this thing was used in lots of places that have nothing to do with sound the name made no sense. Having it as a fixed_t array also made it clumsy to use and the CenterSpot #define used a potentially dangerous type cast.
This commit is contained in:
parent
81cca69303
commit
58d3b04590
11 changed files with 63 additions and 61 deletions
|
|
@ -709,8 +709,8 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
}
|
||||
else
|
||||
{
|
||||
x = sector->soundorg[0];
|
||||
z = sector->soundorg[1];
|
||||
x = sector->centerspot.x;
|
||||
z = sector->centerspot.y;
|
||||
chanflags |= CHAN_LISTENERZ;
|
||||
}
|
||||
}
|
||||
|
|
@ -776,8 +776,8 @@ static void CalcSectorSoundOrg(const sector_t *sec, int channum, fixed_t *x, fix
|
|||
}
|
||||
else
|
||||
{
|
||||
*x = sec->soundorg[0];
|
||||
*y = sec->soundorg[1];
|
||||
*x = sec->centerspot.x;
|
||||
*y = sec->centerspot.y;
|
||||
}
|
||||
|
||||
// Set sound vertical position based on channel.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue