diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 1da2a65bf..801a2006e 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -4248,7 +4248,7 @@ void handle_se26(DDukeActor* actor) actor->spr.shade++; if (actor->spr.shade > 7) { - actor->set_int_xy( actor->temp_data[3], actor->temp_data[4]); + actor->spr.pos.XY() = actor->temp_pos.XY(); sc->addfloorz(-((zvel * actor->spr.shade) - zvel)); actor->spr.shade = 0; } diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index df3a7f6dc..49f226630 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -871,7 +871,7 @@ static void movetripbomb(DDukeActor *actor) int16_t l = actor->int_ang(); actor->spr.angle = actor->temp_angle; - actor->temp_data[3] = actor->int_pos().X; actor->temp_data[4] = actor->int_pos().Y; + actor->temp_pos.XY() = actor->spr.pos.XY(); actor->spr.pos += actor->temp_angle.ToVector() * 2; actor->spr.pos.Z -= 3; @@ -923,7 +923,7 @@ static void movetripbomb(DDukeActor *actor) } actor->temp_data[0]++; - actor->set_int_xy(actor->temp_data[3], actor->temp_data[4]); + actor->spr.pos.XY() = actor->temp_pos.XY(); actor->spr.pos.Z += 3;// ChangeActorSect(actor, oldSect); actor->temp_data[3] = 0; @@ -939,15 +939,14 @@ static void movetripbomb(DDukeActor *actor) actor->temp_data[1]++; - actor->temp_data[3] = actor->int_pos().X; - actor->temp_data[4] = actor->int_pos().Y; + actor->temp_pos.XY() = actor->spr.pos.XY(); actor->spr.pos += actor->temp_angle.ToVector() * 2; actor->spr.pos.Z -= 3; SetActor(actor, actor->spr.pos); x = hitasprite(actor, nullptr); - actor->set_int_xy(actor->temp_data[3], actor->temp_data[4]); + actor->spr.pos.XY() = actor->temp_pos.XY(); actor->spr.pos.Z += 3; SetActor(actor, actor->spr.pos); diff --git a/source/games/duke/src/sectors_d.cpp b/source/games/duke/src/sectors_d.cpp index 51c794b7b..bca76c825 100644 --- a/source/games/duke/src/sectors_d.cpp +++ b/source/games/duke/src/sectors_d.cpp @@ -867,7 +867,7 @@ void checkhitwall_d(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw DukeStatIterator it(STAT_EFFECTOR); while (auto effector = it.Next()) { - if (effector->spr.hitag == wal->lotag && effector->spr.lotag == 3) + if (effector->spr.hitag == wal->lotag && effector->spr.lotag == SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT) { effector->temp_data[2] = j; effector->temp_data[3] = darkestwall; diff --git a/source/games/duke/src/sectors_r.cpp b/source/games/duke/src/sectors_r.cpp index 42cad6119..b367c458d 100644 --- a/source/games/duke/src/sectors_r.cpp +++ b/source/games/duke/src/sectors_r.cpp @@ -1353,7 +1353,7 @@ void checkhitwall_r(DDukeActor* spr, walltype* wal, const DVector3& pos, int atw DukeStatIterator it(STAT_EFFECTOR); while (auto act = it.Next()) { - if (act->spr.hitag == wal->lotag && act->spr.lotag == 3) + if (act->spr.hitag == wal->lotag && act->spr.lotag == SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT) { act->temp_data[2] = j; act->temp_data[3] = darkestwall; diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index e9e168e67..133dd7042 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -917,7 +917,7 @@ void spawneffector(DDukeActor* actor, TArray* actors) { if (actor->spr.lotag == 0) { - if (sectp->lotag == 30) + if (sectp->lotag == SE_30_TWO_WAY_TRAIN) { if (actor->spr.pal) actor->spr.clipdist = 1; else actor->spr.clipdist = 0; @@ -1003,8 +1003,7 @@ void spawneffector(DDukeActor* actor, TArray* actors) else if (actor->spr.lotag == SE_26) { - actor->temp_data[3] = actor->int_pos().X; - actor->temp_data[4] = actor->int_pos().Y; + actor->temp_pos.XY() = actor->spr.pos.XY(); if (actor->spr.shade == sectp->floorshade) //UP actor->spr.zvel = -256; else