diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 594fbe29f..e1ae01343 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -1083,13 +1083,12 @@ CLEAR_THE_BOLT2: } if ((actor->spr.ScaleX() == 0 && actor->spr.ScaleY()) == 0) { - actor->spr.xrepeat = actor->temp_data[0]; - actor->spr.yrepeat = actor->temp_data[1]; + actor->spr.SetScale(actor->temp_pos.X, actor->temp_pos.Y); } if ((krand() & 8) == 0) { - actor->temp_data[0] = actor->spr.xrepeat; - actor->temp_data[1] = actor->spr.yrepeat; + actor->temp_pos.X = actor->spr.ScaleX(); + actor->temp_pos.Y = actor->spr.ScaleY(); actor->temp_data[2] = global_random & 4; actor->spr.SetScale(0, 0); goto CLEAR_THE_BOLT2; @@ -1129,13 +1128,12 @@ CLEAR_THE_BOLT: } if (actor->spr.ScaleX() == 0 && actor->spr.ScaleY() == 0) { - actor->spr.xrepeat = actor->temp_data[0]; - actor->spr.yrepeat = actor->temp_data[1]; + actor->spr.SetScale(actor->temp_pos.X, actor->temp_pos.Y); } else if ((krand() & 8) == 0) { - actor->temp_data[0] = actor->spr.xrepeat; - actor->temp_data[1] = actor->spr.yrepeat; + actor->temp_pos.X = actor->spr.ScaleX(); + actor->temp_pos.Y = actor->spr.ScaleY(); actor->temp_data[2] = global_random & 4; actor->spr.SetScale(0, 0); goto CLEAR_THE_BOLT; @@ -1143,7 +1141,7 @@ CLEAR_THE_BOLT: actor->spr.picnum++; int l = global_random & 7; - actor->spr.xrepeat = l + 8; + actor->spr.SetScaleX(0.125 + l * REPEAT_SCALE); if (l & 1) actor->spr.cstat ^= CSTAT_SPRITE_TRANSLUCENT; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index a7dacc678..2dc03dfe5 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -763,15 +763,14 @@ CLEAR_THE_BOLT: sectp->ceilingshade = 20; return; } - if ((actor->spr.xrepeat | actor->spr.yrepeat) == 0) + if (actor->spr.ScaleX() == 0 && actor->spr.ScaleY() == 0) { - actor->spr.xrepeat = actor->temp_data[0]; - actor->spr.yrepeat = actor->temp_data[1]; + actor->spr.SetScale(actor->temp_pos.X, actor->temp_pos.Y); } else if ((krand() & 8) == 0) { - actor->temp_data[0] = actor->spr.xrepeat; - actor->temp_data[1] = actor->spr.yrepeat; + actor->temp_pos.X = actor->spr.ScaleX(); + actor->temp_pos.Y = actor->spr.ScaleY(); actor->temp_data[2] = global_random & 4; actor->spr.SetScale(0, 0); goto CLEAR_THE_BOLT; @@ -779,7 +778,7 @@ CLEAR_THE_BOLT: actor->spr.picnum++; int l = global_random & 7; - actor->spr.xrepeat = l + 8; + actor->spr.SetScaleX(0.125 + l * REPEAT_SCALE); if (l & 1) actor->spr.cstat ^= CSTAT_SPRITE_TRANSLUCENT; diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index f450fc0ed..b43c03ed6 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -746,21 +746,21 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray* case SIDEBOLT1 + 1: case SIDEBOLT1 + 2: case SIDEBOLT1 + 3: - act->temp_data[0] = act->spr.xrepeat; - act->temp_data[1] = act->spr.yrepeat; + act->temp_pos.X = act->spr.ScaleX(); + act->temp_pos.Y = act->spr.ScaleY(); [[fallthrough]]; case MASTERSWITCH: if (act->spr.picnum == MASTERSWITCH) act->spr.cstat |= CSTAT_SPRITE_INVISIBLE; act->spr.yint = 0; - ChangeActorStat(act, 6); + ChangeActorStat(act, STAT_STANDABLE); break; case TARGET: case DUCK: case LETTER: act->spr.extra = 1; act->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL; - ChangeActorStat(act, 1); + ChangeActorStat(act, STAT_ACTOR); break; case OCTABRAINSTAYPUT: case LIZTROOPSTAYPUT: diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index fc1dc77e8..cd292bed8 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -708,14 +708,14 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray* case BOLT1 + 1: case BOLT1 + 2: case BOLT1 + 3: - act->temp_data[0] = act->spr.xrepeat; - act->temp_data[1] = act->spr.yrepeat; + act->temp_pos.X = act->spr.ScaleX(); + act->temp_pos.Y = act->spr.ScaleY(); [[fallthrough]]; case MASTERSWITCH: if (act->spr.picnum == MASTERSWITCH) act->spr.cstat |= CSTAT_SPRITE_INVISIBLE; act->spr.yint = 0; - ChangeActorStat(act, 6); + ChangeActorStat(act, STAT_STANDABLE); break; // this is not really nice...