- Fixed: Teleports that were not initiated by walking would not trigger sector actions.
SVN r3455 (trunk)
This commit is contained in:
parent
e93029a42a
commit
37a322e46b
3 changed files with 66 additions and 27 deletions
|
|
@ -3362,6 +3362,42 @@ void AActor::Tick ()
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// AActor :: CheckSectorTransition
|
||||
//
|
||||
// Fire off some sector triggers if the actor has changed sectors.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void AActor::CheckSectorTransition(sector_t *oldsec)
|
||||
{
|
||||
if (oldsec != Sector)
|
||||
{
|
||||
if (oldsec->SecActTarget != NULL)
|
||||
{
|
||||
oldsec->SecActTarget->TriggerAction(this, SECSPAC_Exit);
|
||||
}
|
||||
if (Sector->SecActTarget != NULL)
|
||||
{
|
||||
int act = SECSPAC_Enter;
|
||||
if (z <= Sector->floorplane.ZatPoint(x, y))
|
||||
{
|
||||
act |= SECSPAC_HitFloor;
|
||||
}
|
||||
if (z + height >= Sector->ceilingplane.ZatPoint(x, y))
|
||||
{
|
||||
act |= SECSPAC_HitCeiling;
|
||||
}
|
||||
if (Sector->heightsec != NULL && z == Sector->heightsec->floorplane.ZatPoint(x, y))
|
||||
{
|
||||
act |= SECSPAC_HitFakeFloor;
|
||||
}
|
||||
Sector->SecActTarget->TriggerAction(this, act);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// AActor::UpdateWaterLevel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue