- Fixed: The rail sound used the shooter's position for calculating the sound origin
but should use the camera position instead to get the correct position for the closest point along the trail. - Fixed: Explosions no longer caused splashes. - Fixed: Copying translations to lower decals had the shade color check wrong. - Fixed: Waggling floors did not move attached geometry. - Cleaned up p_floor.cpp so that related parts of the code are grouped together. SVN r1926 (trunk)
This commit is contained in:
parent
bbcd6ed5f9
commit
0c39b5c66a
12 changed files with 341 additions and 219 deletions
|
|
@ -4618,7 +4618,7 @@ int P_GetThingFloorType (AActor *thing)
|
|||
// Returns true if hit liquid and splashed, false if not.
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z, bool checkabove)
|
||||
bool P_HitWater (AActor * thing, sector_t * sec, fixed_t x, fixed_t y, fixed_t z, bool checkabove, bool alert)
|
||||
{
|
||||
if (thing->flags2 & MF2_FLOATBOB || thing->flags3 & MF3_DONTSPLASH)
|
||||
return false;
|
||||
|
|
@ -4716,7 +4716,7 @@ foundone:
|
|||
{
|
||||
mo = Spawn (splash->SplashBase, x, y, z, ALLOW_REPLACE);
|
||||
}
|
||||
if (thing->player && !splash->NoAlert)
|
||||
if (thing->player && !splash->NoAlert && alert)
|
||||
{
|
||||
P_NoiseAlert (thing, thing, true);
|
||||
}
|
||||
|
|
@ -4793,6 +4793,25 @@ bool P_HitFloor (AActor *thing)
|
|||
return P_HitWater (thing, m->m_sector);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// P_CheckSplash
|
||||
//
|
||||
// Checks for splashes caused by explosions
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void P_CheckSplash(AActor *self, fixed_t distance)
|
||||
{
|
||||
if (self->z <= self->floorz + (distance<<FRACBITS) && self->floorsector == self->Sector)
|
||||
{
|
||||
// Explosion splashes never alert monsters. This is because A_Explode has
|
||||
// a separate parameter for that so this would get in the way of proper
|
||||
// behavior.
|
||||
P_HitWater (self, self->Sector, self->x, self->y, self->floorz, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// FUNC P_CheckMissileSpawn
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue