mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 08:31:23 +00:00
- Always allow replacement.
This commit is contained in:
parent
b255e5d67d
commit
dd3d7789d5
2 changed files with 4 additions and 4 deletions
|
@ -903,7 +903,7 @@ bool EV_DoChange (line_t *line, EChange changetype, int tag);
|
||||||
//
|
//
|
||||||
// P_TELEPT
|
// P_TELEPT
|
||||||
//
|
//
|
||||||
void P_SpawnTeleportFog(AActor *mobj, fixed_t x, fixed_t y, fixed_t z, bool beforeTele = true, bool replace = true, bool setTarget = false); //Spawns teleport fog. Pass the actor to pluck TeleFogFromType and TeleFogToType. 'from' determines if this is the fog to spawn at the old position (true) or new (false).
|
void P_SpawnTeleportFog(AActor *mobj, fixed_t x, fixed_t y, fixed_t z, bool beforeTele = true, bool setTarget = false); //Spawns teleport fog. Pass the actor to pluck TeleFogFromType and TeleFogToType. 'from' determines if this is the fog to spawn at the old position (true) or new (false).
|
||||||
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation, bool haltVelocity = true, bool keepHeight = false);
|
bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle, bool useFog, bool sourceFog, bool keepOrientation, bool haltVelocity = true, bool keepHeight = false);
|
||||||
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation, bool haltVelocity = true, bool keepHeight = false);
|
bool EV_Teleport (int tid, int tag, line_t *line, int side, AActor *thing, bool fog, bool sourceFog, bool keepOrientation, bool haltVelocity = true, bool keepHeight = false);
|
||||||
bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse);
|
bool EV_SilentLineTeleport (line_t *line, int side, AActor *thing, int id, INTBOOL reverse);
|
||||||
|
|
|
@ -74,18 +74,18 @@ void ATeleportFog::PostBeginPlay ()
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void P_SpawnTeleportFog(AActor *mobj, fixed_t x, fixed_t y, fixed_t z, bool beforeTele, bool replace, bool setTarget)
|
void P_SpawnTeleportFog(AActor *mobj, fixed_t x, fixed_t y, fixed_t z, bool beforeTele, bool setTarget)
|
||||||
{
|
{
|
||||||
AActor *mo;
|
AActor *mo;
|
||||||
FNameNoInit tf = (beforeTele ? mobj->TeleFogSourceType : mobj->TeleFogDestType);
|
FNameNoInit tf = (beforeTele ? mobj->TeleFogSourceType : mobj->TeleFogDestType);
|
||||||
|
|
||||||
if (!tf) //If the actor doesn't have one, initialize the original.
|
if (!tf) //If the actor doesn't have one, initialize the original.
|
||||||
{
|
{
|
||||||
mo = Spawn<ATeleportFog>(x, y, z, (replace ? ALLOW_REPLACE : NO_REPLACE));
|
mo = Spawn<ATeleportFog>(x, y, z, ALLOW_REPLACE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mo = Spawn(tf, x, y, z, (replace ? ALLOW_REPLACE : NO_REPLACE));
|
mo = Spawn(tf, x, y, z, ALLOW_REPLACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mo != NULL && setTarget)
|
if (mo != NULL && setTarget)
|
||||||
|
|
Loading…
Reference in a new issue