- floatified SE 32.

This commit is contained in:
Christoph Oelckers 2022-09-12 21:52:47 +02:00
parent c0e7e6a543
commit 43e1e3f50f
2 changed files with 8 additions and 8 deletions

View file

@ -4442,7 +4442,7 @@ void handle_se32(DDukeActor *actor)
if (actor->temp_data[2] == 1) // Retract
{
if (actor->int_ang() != 1536)
if (actor->spr.intangle != 1536)
{
if (abs(sc->ceilingz - actor->spr.pos.Z) < targetval * 2)
{
@ -4455,14 +4455,14 @@ void handle_se32(DDukeActor *actor)
}
else
{
if (abs(sc->ceilingz - actor->temp_data[1] * zinttoworld) < targetval * 2)
if (abs(sc->ceilingz - actor->temp_pos.Z) < targetval * 2)
{
sc->set_int_ceilingz(actor->temp_data[1]);
sc->setceilingz(actor->temp_pos.Z);
callsound(actor->sector(), actor);
actor->temp_data[2] = 0;
actor->temp_data[0] = 0;
}
else sc->addceilingz(Sgn(actor->temp_data[1] * zinttoworld - sc->int_ceilingz()) * targetval);
else sc->addceilingz(Sgn(actor->temp_pos.Z - sc->ceilingz) * targetval);
}
return;
}
@ -4480,13 +4480,13 @@ void handle_se32(DDukeActor *actor)
}
else
{
if (abs(sc->ceilingz - actor->temp_data[1] * zinttoworld) < targetval * 2)
if (abs(sc->ceilingz - actor->temp_pos.Z) < targetval * 2)
{
actor->temp_data[0] = 0;
actor->temp_data[2] = !actor->temp_data[2];
callsound(actor->sector(), actor);
}
else sc->addceilingz(-Sgn(actor->int_pos().Z - actor->temp_data[1]) * targetval);
else sc->addceilingz(-Sgn(actor->spr.pos.Z - actor->temp_pos.Z) * targetval);
}
}

View file

@ -839,9 +839,9 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
break;
case SE_32_CEILING_RISE_FALL:
actor->temp_data[1] = sectp->int_ceilingz();
actor->temp_pos.Z = sectp->ceilingz;
actor->temp_data[2] = actor->spr.hitag;
if (actor->int_ang() != 1536) sectp->setceilingz(actor->spr.pos.Z);
if (actor->spr.intangle != 1536) sectp->setceilingz(actor->spr.pos.Z);
for (auto& wal : wallsofsector(sectp))
if (wal.hitag == 0) wal.hitag = 9999;