mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- floatified remaining code of SE17.
This commit is contained in:
parent
671e75ba5f
commit
e4898af11a
3 changed files with 9 additions and 8 deletions
|
@ -3787,8 +3787,9 @@ void handle_se17(DDukeActor* actor)
|
|||
{
|
||||
auto sc = actor->sector();
|
||||
int sh = actor->spr.hitag;
|
||||
double refheight = actor->spr.yint * zmaptoworld;
|
||||
|
||||
double q = actor->temp_data[0] * actor->spr.yint * (1 / 64.);
|
||||
double q = actor->temp_data[0] * refheight * 4;
|
||||
|
||||
sc->addceilingz(q);
|
||||
sc->addfloorz(q);
|
||||
|
@ -3817,7 +3818,7 @@ void handle_se17(DDukeActor* actor)
|
|||
|
||||
if (actor->temp_data[0]) //If in motion
|
||||
{
|
||||
if (abs(sc->int_floorz() - actor->temp_data[2]) <= actor->spr.yint)
|
||||
if (abs(sc->floorz - actor->temp_pos.X) <= refheight)
|
||||
{
|
||||
activatewarpelevators(actor, 0);
|
||||
return;
|
||||
|
@ -3825,10 +3826,10 @@ void handle_se17(DDukeActor* actor)
|
|||
|
||||
if (actor->temp_data[0] == -1)
|
||||
{
|
||||
if (sc->int_floorz() > actor->temp_data[3])
|
||||
if (sc->floorz > actor->temp_pos.Y)
|
||||
return;
|
||||
}
|
||||
else if (sc->int_ceilingz() < actor->temp_data[4]) return;
|
||||
else if (sc->ceilingz < actor->temp_pos.Z) return;
|
||||
|
||||
if (actor->temp_data[1] == 0) return;
|
||||
actor->temp_data[1] = 0;
|
||||
|
|
|
@ -488,7 +488,7 @@ bool activatewarpelevators(DDukeActor* actor, int d) //Parm = sectoreffectornum
|
|||
{
|
||||
if (act2->spr.lotag == SE_17_WARP_ELEVATOR || (isRRRA() && act2->spr.lotag == SE_18_INCREMENTAL_SECTOR_RISE_FALL))
|
||||
if (act2->spr.hitag == actor->spr.hitag)
|
||||
if ((abs(sect->int_floorz() - actor->temp_data[2]) > act2->spr.yint) ||
|
||||
if ((abs(sect->floorz - actor->temp_pos.X) > act2->spr.yint * maptoworld) ||
|
||||
(act2->sector()->hitag == (sect->hitag - d)))
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -709,9 +709,9 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
}
|
||||
case SE_17_WARP_ELEVATOR:
|
||||
{
|
||||
actor->temp_data[2] = sectp->int_floorz(); //Stopping loc
|
||||
actor->temp_data[3] = nextsectorneighborzptr(sectp, sectp->floorz, Find_CeilingUp | Find_Safe)->int_ceilingz();
|
||||
actor->temp_data[4] = nextsectorneighborzptr(sectp, sectp->ceilingz, Find_FloorDown | Find_Safe)->int_floorz();
|
||||
actor->temp_pos.X = sectp->floorz; //Stopping loc
|
||||
actor->temp_pos.Y = nextsectorneighborzptr(sectp, sectp->floorz, Find_CeilingUp | Find_Safe)->ceilingz;
|
||||
actor->temp_pos.Z = nextsectorneighborzptr(sectp, sectp->ceilingz, Find_FloorDown | Find_Safe)->floorz;
|
||||
|
||||
if (numplayers < 2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue