mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-31 05:00:41 +00:00
When checking for SE7 water teleportation, regard sign of z velocity.
This fixes RPGs fired upwards at a steep angle teleporting immediately to underwater when wading in water (reported via PM by Turok 64 Jr). git-svn-id: https://svn.eduke32.com/eduke32@5190 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a979fa95a3
commit
80b766f13a
1 changed files with 4 additions and 3 deletions
|
@ -3461,14 +3461,15 @@ ACTOR_STATIC void G_MoveTransports(void)
|
|||
{
|
||||
if (totalclock > actor[j].lasttransport)
|
||||
{
|
||||
const int32_t ll = klabs(sprite[j].zvel);
|
||||
const int32_t zvel = sprite[j].zvel;
|
||||
const int32_t ll = klabs(zvel);
|
||||
int32_t warpspriteto = 0;
|
||||
|
||||
if (ll != 0)
|
||||
{
|
||||
if (sectlotag == ST_2_UNDERWATER && sprite[j].z < (sector[sect].ceilingz+ll))
|
||||
if (sectlotag == ST_2_UNDERWATER && sprite[j].z < (sector[sect].ceilingz+ll) && zvel < 0)
|
||||
warpspriteto = 1;
|
||||
if (sectlotag == ST_1_ABOVE_WATER && sprite[j].z > (sector[sect].floorz-ll))
|
||||
if (sectlotag == ST_1_ABOVE_WATER && sprite[j].z > (sector[sect].floorz-ll) && zvel > 0)
|
||||
warpspriteto = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue