mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-22 17:01:08 +00:00
- copied ST160/161 handling to movetransports_d.
This commit is contained in:
parent
ac50daf5f3
commit
687cfd610f
2 changed files with 31 additions and 1 deletions
|
@ -357,6 +357,25 @@ void movetransports_d(void)
|
|||
|
||||
int k = 0;
|
||||
|
||||
if (ud.mapflags & MFLAG_ALLSECTORTYPES)
|
||||
{
|
||||
if (onfloorz && sectlotag == ST_160_FLOOR_TELEPORT && ps[p].GetActor()->getOffsetZ() > sectp->floorz - 48)
|
||||
{
|
||||
k = 2;
|
||||
ps[p].GetActor()->spr.pos.Z = Owner->sector()->ceilingz + 7 + gs.playerheight;
|
||||
ps[p].GetActor()->backupz();
|
||||
}
|
||||
|
||||
if (onfloorz && sectlotag == ST_161_CEILING_TELEPORT && ps[p].GetActor()->getOffsetZ() < sectp->ceilingz + 6)
|
||||
{
|
||||
k = 2;
|
||||
if (ps[p].GetActor()->spr.extra <= 0) break;
|
||||
ps[p].GetActor()->spr.pos.Z = Owner->sector()->floorz - 49 + gs.playerheight;
|
||||
ps[p].GetActor()->backupz();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (onfloorz && sectlotag == ST_1_ABOVE_WATER && ps[p].on_ground && ps[p].GetActor()->getOffsetZ() > (sectp->floorz - 16) && (PlayerInput(p, SB_CROUCH) || ps[p].vel.Z > 8))
|
||||
// if( onfloorz && sectlotag == 1 && ps[p].pos.z > (sectp->floorz-(6<<8)) )
|
||||
{
|
||||
|
@ -415,6 +434,17 @@ void movetransports_d(void)
|
|||
if (q) q->spr.pos.Z += krandf(64);
|
||||
}
|
||||
}
|
||||
else if (k == 2)
|
||||
{
|
||||
ps[p].GetActor()->spr.pos.XY() += Owner->spr.pos.XY() - act->spr.pos.XY();
|
||||
ps[p].GetActor()->backupvec2();
|
||||
|
||||
if (Owner->GetOwner() != Owner)
|
||||
ps[p].transporter_hold = -2;
|
||||
ps[p].setCursector(Owner->sector());
|
||||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -395,7 +395,7 @@ void movetransports_r(void)
|
|||
if ((krand() & 255) < 32)
|
||||
spawn(ps[p].GetActor(), DukeWaterSplashClass);
|
||||
}
|
||||
else if (isRRRA() && k == 2)
|
||||
else if (k == 2)
|
||||
{
|
||||
ps[p].GetActor()->spr.pos.XY() += Owner->spr.pos.XY() - act->spr.pos.XY();
|
||||
ps[p].GetActor()->backupvec2();
|
||||
|
|
Loading…
Reference in a new issue