mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-13 07:57:51 +00:00
- Make teleport fogs target the teleported actor.
SVN r4190 (trunk)
This commit is contained in:
parent
fc4b0ffe68
commit
283ee1a891
1 changed files with 4 additions and 2 deletions
|
@ -184,14 +184,16 @@ bool P_Teleport (AActor *thing, fixed_t x, fixed_t y, fixed_t z, angle_t angle,
|
||||||
if (sourceFog)
|
if (sourceFog)
|
||||||
{
|
{
|
||||||
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
||||||
Spawn<ATeleportFog> (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE);
|
AActor *fog = Spawn<ATeleportFog> (oldx, oldy, oldz + fogDelta, ALLOW_REPLACE);
|
||||||
|
fog->target = thing;
|
||||||
}
|
}
|
||||||
if (useFog)
|
if (useFog)
|
||||||
{
|
{
|
||||||
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
fixed_t fogDelta = thing->flags & MF_MISSILE ? 0 : TELEFOGHEIGHT;
|
||||||
an = angle >> ANGLETOFINESHIFT;
|
an = angle >> ANGLETOFINESHIFT;
|
||||||
Spawn<ATeleportFog> (x + 20*finecosine[an],
|
AActor *fog = Spawn<ATeleportFog> (x + 20*finecosine[an],
|
||||||
y + 20*finesine[an], thing->z + fogDelta, ALLOW_REPLACE);
|
y + 20*finesine[an], thing->z + fogDelta, ALLOW_REPLACE);
|
||||||
|
fog->target = thing;
|
||||||
if (thing->player)
|
if (thing->player)
|
||||||
{
|
{
|
||||||
// [RH] Zoom player's field of vision
|
// [RH] Zoom player's field of vision
|
||||||
|
|
Loading…
Reference in a new issue