diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 16b257ab5..c6f24ff16 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -2485,8 +2485,7 @@ void SpawnPlayerUnderSprite(PLAYER* pp) actor->spr.picnum = plActor->spr.picnum; actor->copy_clipdist(plActor); - actor->spr.xrepeat = plActor->spr.xrepeat; - actor->spr.yrepeat = plActor->spr.yrepeat; + actor->spr.CopyScale(&plActor->spr); } //--------------------------------------------------------------------------- diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index d699c90b4..d6fccb364 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -923,8 +923,8 @@ void SectorExp(DSWActor* actor, sectortype* sectp, double zh) auto exp = SpawnSectorExp(actor); if (!exp) return; - exp->spr.xrepeat += (RANDOM_P2(32<<8)>>8) - 16; - exp->spr.yrepeat += (RANDOM_P2(32<<8)>>8) - 16; + exp->spr.AddScaleX(((RANDOM_P2(32 << 8) >> 8) - 16) * REPEAT_SCALE); + exp->spr.AddScaleY(((RANDOM_P2(32 << 8) >> 8) - 16) * REPEAT_SCALE); exp->user.change.XY() = exp->spr.angle.ToVector(5.75); } diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 0ce7e252d..4f889e3d8 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -3419,8 +3419,8 @@ AutoShrap: case SHRAP_EXPLOSION: { auto spnum = SpawnLargeExp(parentActor); - short size = spnum->spr.xrepeat; - spnum->spr.xrepeat = spnum->spr.yrepeat = size + shrap_delta_size; + double size = spnum->spr.xrepeat + shrap_delta_size * REPEAT_SCALE; + spnum->spr.SetScale(size, size); return false; } @@ -3428,8 +3428,8 @@ AutoShrap: case SHRAP_LARGE_EXPLOSION: { auto spnum = SpawnLargeExp(parentActor); - short size = spnum->spr.xrepeat; - spnum->spr.xrepeat = spnum->spr.yrepeat = size + shrap_delta_size; + double size = spnum->spr.xrepeat + shrap_delta_size * REPEAT_SCALE; + spnum->spr.SetScale(size, size); InitPhosphorus(spnum); @@ -3753,8 +3753,7 @@ AutoShrap: } actor->spr.shade = int8_t(shrap_shade); - actor->spr.xrepeat = uint8_t(shrap_xsize); - actor->spr.yrepeat = uint8_t(shrap_ysize); + actor->spr.SetScale(shrap_xsize * REPEAT_SCALE, shrap_xsize* REPEAT_SCALE); actor->clipdist = 1; if (ShrapOwner != nullptr) @@ -3813,8 +3812,7 @@ int DoVomit(DSWActor* actor) actor->user.Counter = NORM_ANGLE(actor->user.Counter + (30*MISSILEMOVETICS)); // notreallypos auto v = actor->user.pos + mapangle(actor->user.Counter).ToVector() * 12; - actor->spr.xrepeat = int(v.X); - actor->spr.yrepeat = int(v.Y); + actor->spr.SetScale(v * REPEAT_SCALE); if (actor->user.Flags & (SPR_JUMPING)) { DoJump(actor);