- Added per-actor teleport fog modifications.
- New properties include TeleFogSourceType and TeleFogDestType. - TeleFogSourceType is the fog left behind where the actor teleported away from. - TeleFogDestType is the fog the actor sees when it arrives at its destination. - Added A_SetTeleFog(<oldpos>,<newpos>) -- oldpos sets TeleFogSourceType, newpos sets TeleFogDestType.
This commit is contained in:
parent
24f1bfae99
commit
30acb72006
8 changed files with 68 additions and 27 deletions
|
|
@ -2938,9 +2938,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
|||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_INT(flags, 0);
|
||||
|
||||
bool oktorespawn = false;
|
||||
|
||||
fixed_t oldx = self->x;
|
||||
fixed_t oldy = self->y;
|
||||
fixed_t oldz = self->z;
|
||||
self->flags |= MF_SOLID;
|
||||
self->height = self->GetDefault()->height;
|
||||
CALL_ACTION(A_RestoreSpecialPosition, self);
|
||||
|
|
@ -2998,7 +2999,8 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
|||
|
||||
if (flags & RSF_FOG)
|
||||
{
|
||||
Spawn<ATeleportFog> (self->x, self->y, self->z + TELEFOGHEIGHT, ALLOW_REPLACE);
|
||||
P_SpawnTeleportFog(self, oldx, oldy, oldz, true);
|
||||
P_SpawnTeleportFog(self, self->x, self->y, self->z, false);
|
||||
}
|
||||
if (self->CountsAsKill())
|
||||
{
|
||||
|
|
@ -5377,3 +5379,24 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Remove)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_SetTeleFog
|
||||
//
|
||||
// Sets the teleport fog(s) for the calling actor.
|
||||
// Takes a name of the classes for te source and destination.
|
||||
//===========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetTeleFog)
|
||||
{
|
||||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_NAME(oldpos, 0);
|
||||
ACTION_PARAM_NAME(newpos, 1);
|
||||
|
||||
if (oldpos)
|
||||
self->TeleFogSourceType = oldpos;
|
||||
if (newpos)
|
||||
self->TeleFogDestType = newpos;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue