Number of downloads: 149
The main area in the map consists of 2 TROR layers, one having its ceiling at -26624, while the other has its ceiling at -51200.
In this area you will find 4 floating sprite platforms, the highest of which is set at -15360. Next to it is a raised floor whose height is also at -15360.
Jump up the sprite platforms to the highest one. Once you are standing on this platform you will not be able to jump anymore -- however if you move onto the raised floor right next to it, you can jump.
In an adjacent room you will find the same 4 sprite platforms in a non-TROR area. Here you can jump on top of the highest platform no problem.
The problem here is a conditional check that occurs at line 5744 of player.cpp.
// jumping if (!TEST_SYNC_KEY(playerBits, SK_JUMP) && pPlayer->jumping_toggle) pPlayer->jumping_toggle--; else if (TEST_SYNC_KEY(playerBits, SK_JUMP) && pPlayer->jumping_toggle == 0) { int32_t floorZ2, ceilZ2; getzrange(&pPlayer->pos, pPlayer->cursectnum, &ceilZ2, &dummy, &floorZ2, &dummy, pPlayer->clipdist - GETZRANGECLIPDISTOFFSET, CLIPMASK0); if (klabs(floorZ2-ceilZ2) > (48<<8)) { ....... } }
Here the game computes whether there is enough room in the sector to allow the player to jump. It returns false once the player is standing on the highest sprite bridge in the TROR area.
This is because getzrange(...) returns the wrong value for ceilZ if the player is standing on a sprite bridge in TROR areas -- it returns the ceiling height of the lower TROR layer, -26624, rather than the height of the highest connected TROR layer, -51200.
The function works fine however if one is standing on a regular floor.
Similarly, there are also inconsistent values being returned if one moves over the transparent TROR grate. Jumping on top of the grate returns a floor height of 12288, which is much lower than the height at which the grate is really placed.