diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 5ecd4630d..dda796b2b 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -2609,7 +2609,7 @@ void handle_se00(DDukeActor* actor) } else actor->tempang = 0; - double checkz = actor->temp_data[3] * zmaptoworld; + double checkz = actor->temp_pos.Z; if (sect->floorz > checkz) //z's are touching { sect->addfloorz(-2); @@ -2642,9 +2642,9 @@ void handle_se00(DDukeActor* actor) if (Owner->spr.angle.Normalized360() > DAngle180) direction = -1; else direction = 1; - if (actor->temp_data[3] == 0) - actor->temp_data[3] = ldist(actor, Owner); - actor->vel.X = actor->temp_data[3] * maptoworld; + if (actor->temp_pos.Y == 0) + actor->temp_pos.Y = (actor->spr.pos.XY() - Owner->spr.pos.XY()).Length(); + actor->vel.X = actor->temp_pos.Y; actor->spr.pos.XY() = Owner->spr.pos.XY(); actor->spr.angle += ang_amount * direction; actor->temp_angle += ang_amount * direction; diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index c80e96a74..09c15e30a 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -916,13 +916,13 @@ void spawneffector(DDukeActor* actor, TArray* actors) case SE_26://ESCELATOR case SE_30_TWO_WAY_TRAIN://No rotational subways { - if (actor->spr.lotag == 0) + if (actor->spr.lotag == SE_0_ROTATING_SECTOR) { - if (sectp->lotag == SE_30_TWO_WAY_TRAIN) + if (sectp->lotag == 30) { if (actor->spr.pal) actor->set_const_clipdist(1); else actor->set_const_clipdist(0); - actor->temp_data[3] = sectp->int_floorz(); + actor->temp_pos.Z = sectp->floorz; sectp->hitagactor = actor; }