Difference between revisions of "Final Doom teleporters do not set Z coordinate"

From DoomWiki.org

[checked revision][checked revision]
(The id Anthology included an updated version of DOOM2.EXE with Final Doom which fixed some bug and may have fixed other bugs that are still unknown)
(Add a piece of source code that shows what was changed)
Line 3: Line 3:
  
 
This bug was fixed in the executable included in the [[id Anthology]] with Final Doom.
 
This bug was fixed in the executable included in the [[id Anthology]] with Final Doom.
 +
 +
It was due to a line being removed from the function {{c|EV_Teleport}} which teleports [[things]]. The line still has the comment {{c|fixme: not needed?}} in the [[Linux Doom]] source code release.
 +
 +
    oldx = thing->x;
 +
    oldy = thing->y;
 +
    oldz = thing->z;
 +
   
 +
    if (!P_TeleportMove (thing, m->x, m->y))
 +
        return 0;
 +
   
 +
    thing->z = thing->floorz;  //fixme: not needed?
 +
    if (thing->player)
 +
        thing->player->viewz = thing->z+thing->player->viewheight;
  
 
[[Category:Errors and bugs]]
 
[[Category:Errors and bugs]]

Revision as of 20:33, 3 April 2017

This bug emulated using Chocolate Doom in Doom II MAP23: Barrels o' Fun.

A problem introduced in the Final Doom version of the Doom engine, the Z coordinate of the player is not adjusted to the teleport destination altitude. This can cause the player to be teleported in the air or in the ground. When a monster is teleported, it is spawned on the floor but the teleporter fog remains at the height of origin teleporter.

This bug was fixed in the executable included in the id Anthology with Final Doom.

It was due to a line being removed from the function EV_Teleport which teleports things. The line still has the comment fixme: not needed? in the Linux Doom source code release.

   oldx = thing->x;
   oldy = thing->y;
   oldz = thing->z;
   	
   if (!P_TeleportMove (thing, m->x, m->y))
       return 0;
   
   thing->z = thing->floorz;  //fixme: not needed?
   if (thing->player)
       thing->player->viewz = thing->z+thing->player->viewheight;