Merge the boolean args to EV/P_Teleport into a single flags arg
- The flags use TELF_ since DECORATE has an A_Teleport with its own set of TF_ flags. - TELF_KEEPVELOCITY is used instead of TELF_HALTVELOCITY, because there was only one call that ever set bHaltVelocity to false.
This commit is contained in:
parent
939989dc8c
commit
c1b2861362
7 changed files with 59 additions and 33 deletions
|
|
@ -880,19 +880,38 @@ FUNC(LS_Teleport_NewMap)
|
|||
FUNC(LS_Teleport)
|
||||
// Teleport (tid, sectortag, bNoSourceFog)
|
||||
{
|
||||
return EV_Teleport (arg0, arg1, ln, backSide, it, true, !arg2, false);
|
||||
int flags = TELF_DESTFOG;
|
||||
if (!arg2)
|
||||
{
|
||||
flags |= TELF_SOURCEFOG;
|
||||
}
|
||||
return EV_Teleport (arg0, arg1, ln, backSide, it, flags);
|
||||
}
|
||||
|
||||
FUNC( LS_Teleport_NoStop )
|
||||
// Teleport_NoStop (tid, sectortag, bNoSourceFog)
|
||||
{
|
||||
return EV_Teleport( arg0, arg1, ln, backSide, it, true, !arg2, false, false );
|
||||
int flags = TELF_DESTFOG | TELF_KEEPVELOCITY;
|
||||
if (!arg2)
|
||||
{
|
||||
flags |= TELF_SOURCEFOG;
|
||||
}
|
||||
return EV_Teleport( arg0, arg1, ln, backSide, it, flags);
|
||||
}
|
||||
|
||||
FUNC(LS_Teleport_NoFog)
|
||||
// Teleport_NoFog (tid, useang, sectortag, keepheight)
|
||||
{
|
||||
return EV_Teleport (arg0, arg2, ln, backSide, it, false, false, !arg1, true, !!arg3);
|
||||
int flags = 0;
|
||||
if (arg1)
|
||||
{
|
||||
flags |= TELF_KEEPORIENTATION;
|
||||
}
|
||||
if (arg3)
|
||||
{
|
||||
flags |= TELF_KEEPHEIGHT;
|
||||
}
|
||||
return EV_Teleport (arg0, arg2, ln, backSide, it, flags);
|
||||
}
|
||||
|
||||
FUNC(LS_Teleport_ZombieChanger)
|
||||
|
|
@ -901,7 +920,7 @@ FUNC(LS_Teleport_ZombieChanger)
|
|||
// This is practically useless outside of Strife, but oh well.
|
||||
if (it != NULL)
|
||||
{
|
||||
EV_Teleport (arg0, arg1, ln, backSide, it, false, false, false);
|
||||
EV_Teleport (arg0, arg1, ln, backSide, it, 0);
|
||||
if (it->health >= 0) it->SetState (it->FindState(NAME_Pain));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue