mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 04:24:39 +00:00
- floatified handle_se21
This commit is contained in:
parent
b0b5dbc55b
commit
a9c7a5e62f
1 changed files with 5 additions and 5 deletions
|
@ -4171,18 +4171,18 @@ void handle_se20(DDukeActor* actor)
|
||||||
void handle_se21(DDukeActor* actor)
|
void handle_se21(DDukeActor* actor)
|
||||||
{
|
{
|
||||||
auto sc = actor->sector();
|
auto sc = actor->sector();
|
||||||
int lp;
|
double lp;
|
||||||
|
|
||||||
if (actor->temp_data[0] == 0) return;
|
if (actor->temp_data[0] == 0) return;
|
||||||
|
|
||||||
if (actor->int_ang() == 1536)
|
if (actor->spr.intangle == 1536)
|
||||||
lp = sc->int_ceilingz();
|
lp = sc->ceilingz;
|
||||||
else
|
else
|
||||||
lp = sc->int_floorz();
|
lp = sc->floorz;
|
||||||
|
|
||||||
if (actor->temp_data[0] == 1) //Decide if the sector should go up or down
|
if (actor->temp_data[0] == 1) //Decide if the sector should go up or down
|
||||||
{
|
{
|
||||||
actor->set_int_zvel(Sgn(actor->int_pos().Z - lp) * (actor->spr.yint << 4));
|
actor->vel.Z = (Sgn(actor->spr.pos.Z - lp) * (actor->spr.yint << 4) * zmaptoworld);
|
||||||
actor->temp_data[0]++;
|
actor->temp_data[0]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue