mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- made spawning of teleport fog portal aware.
This commit is contained in:
parent
2b74ee1eef
commit
38c1b8588c
1 changed files with 3 additions and 3 deletions
|
@ -106,7 +106,6 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
||||||
fixedvec3 old;
|
fixedvec3 old;
|
||||||
fixed_t aboveFloor;
|
fixed_t aboveFloor;
|
||||||
player_t *player;
|
player_t *player;
|
||||||
angle_t an;
|
|
||||||
sector_t *destsect;
|
sector_t *destsect;
|
||||||
bool resetpitch = false;
|
bool resetpitch = false;
|
||||||
fixed_t floorheight, ceilingheight;
|
fixed_t floorheight, ceilingheight;
|
||||||
|
@ -193,8 +192,9 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
||||||
if (!predicting)
|
if (!predicting)
|
||||||
{
|
{
|
||||||
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
||||||
an = angle >> ANGLETOFINESHIFT;
|
fixedvec2 vector = Vec2Angle(20 * FRACUNIT, angle);
|
||||||
P_SpawnTeleportFog(thing, x + 20 * finecosine[an], y + 20 * finesine[an], thing->Z() + fogDelta, false, true);
|
fixedvec2 fogpos = P_GetOffsetPosition(x, y, vector.x, vector.y);
|
||||||
|
P_SpawnTeleportFog(thing, fogpos.x, fogpos.y, thing->Z() + fogDelta, false, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (thing->player)
|
if (thing->player)
|
||||||
|
|
Loading…
Reference in a new issue