- some MOVExy replacements.

This commit is contained in:
Christoph Oelckers 2022-08-31 22:55:59 +02:00
parent 05ad1e38e9
commit 35d74c7f9f
5 changed files with 5 additions and 11 deletions

View file

@ -939,7 +939,6 @@ struct USER
void set_int_change_z(int x) { change.Z = x * zinttoworld; }
void add_int_change_x(int x) { change.X += x * inttoworld; }
void add_int_change_y(int x) { change.Y += x * inttoworld; }
void add_int_change_z(int x) { change.Z += x * zinttoworld; }
// frequently repeated patterns
void addCounterToChange() { change.Z += Counter * zinttoworld; }

View file

@ -1172,8 +1172,7 @@ int SpawnRadiationCloud(DSWActor* actor)
if (actor->user.ID == MUSHROOM_CLOUD || actor->user.ID == 3121)
{
actorNew->user.Radius = 2000;
actorNew->user.set_int_change_x((MOVEx(actorNew->spr.xvel>>2, actorNew->int_ang())));
actorNew->user.set_int_change_y((MOVEy(actorNew->spr.xvel>>2, actorNew->int_ang())));
actorNew->user.change.XY() = MOVExy(actorNew->spr.xvel >> 2, actorNew->spr.angle);
actorNew->spr.zvel = Z(1) + RANDOM_P2(Z(2));
}
else

View file

@ -856,8 +856,7 @@ void SectorExp(DSWActor* actor, sectortype* sectp, double zh)
exp->spr.xrepeat += (RANDOM_P2(32<<8)>>8) - 16;
exp->spr.yrepeat += (RANDOM_P2(32<<8)>>8) - 16;
exp->user.set_int_change_x(MOVEx(92, exp->int_ang()));
exp->user.set_int_change_y(MOVEy(92, exp->int_ang()));
exp->user.change.XY() = MOVExy(92, exp->spr.angle);
}

View file

@ -38,8 +38,7 @@ public:
inline void UpdateChangeXY(DSWActor* actor)
{
actor->user.set_int_change_x(MOVEx(actor->spr.xvel, actor->int_ang()));
actor->user.set_int_change_y(MOVEy(actor->spr.xvel, actor->int_ang()));
actor->user.change.XY() = MOVExy(actor->spr.xvel, actor->spr.angle);
}
inline void UpdateChange(DSWActor* actor, double zfactor = 1.0)

View file

@ -9891,8 +9891,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang)
//ang = RANDOM_P2(2048);
int32_t const vel = (2048+128) + RandomRange(2048);
expActor->user.set_int_change_x(MOVEx(vel, ang));
expActor->user.set_int_change_y(MOVEy(vel, ang));
expActor->user.change.XY() = MOVExy(vel, DAngle::fromBuild(ang));
expActor->user.Radius = 200; // was NUKE_RADIUS
expActor->user.coll = move_missile(expActor, DVector3(expActor->user.change.XY(), 0),
expActor->user.ceiling_dist,expActor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
@ -10152,8 +10151,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang)
//ang = RANDOM_P2(2048);
vel = (1024+512) + RandomRange(1024);
expActor->user.set_int_change_x(MOVEx(vel, ang));
expActor->user.set_int_change_y(MOVEy(vel, ang));
expActor->user.change.XY() = MOVExy(vel, DAngle::fromBuild(ang));
expActor->user.coll = move_missile(expActor, DVector3(expActor->user.change.XY(), 0),
expActor->user.ceiling_dist,expActor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);