- handle several movesprite_ex calls.

This commit is contained in:
Christoph Oelckers 2022-09-03 18:41:25 +02:00
parent 4f9ffc9437
commit 7dab26f04d
2 changed files with 10 additions and 27 deletions

View file

@ -224,10 +224,7 @@ int ssp(DDukeActor* const actor, unsigned int cliptype) //The set sprite functio
{ {
Collision c; Collision c;
return movesprite_ex(actor, return movesprite_ex(actor, DVector3(actor->spr.angle.ToVector() * actor->vel.X, actor->vel.Z), cliptype, c) == kHitNone;
MulScale(actor->int_xvel(), bcos(actor->int_ang()), 14),
MulScale(actor->int_xvel(), bsin(actor->int_ang()), 14), actor->int_zvel(),
cliptype, c) == kHitNone;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------

View file

@ -1724,8 +1724,7 @@ void movetransports_r(void)
ChangeActorSect(act2, Owner->sector()); ChangeActorSect(act2, Owner->sector());
movesprite_ex(act2, MulScale(act2->int_xvel(), bcos(act2->int_ang()), 14), movesprite_ex(act2, DVector3(act2->spr.angle.ToVector() * act2->vel.X, 0), CLIPMASK1, coll);
MulScale(act2->int_xvel(), bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
break; break;
case 161: case 161:
@ -1736,8 +1735,7 @@ void movetransports_r(void)
ChangeActorSect(act2, Owner->sector()); ChangeActorSect(act2, Owner->sector());
movesprite_ex(act2, MulScale(act2->int_xvel(), bcos(act2->int_ang()), 14), movesprite_ex(act2, DVector3(act2->spr.angle.ToVector() * act2->vel.X, 0), CLIPMASK1, coll);
MulScale(act2->int_xvel(), bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
break; break;
} }
@ -2678,10 +2676,7 @@ void moveactors_r(void)
} }
if (sectp->lotag == 903) if (sectp->lotag == 903)
makeitfall(act); makeitfall(act);
movesprite_ex(act, movesprite_ex(act, DVector3(act->spr.angle.ToVector() * act->vel.X, act->vel.Z), CLIPMASK0, coll);
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
act->int_zvel(),CLIPMASK0, coll);
switch (sectp->lotag) switch (sectp->lotag)
{ {
case 901: case 901:
@ -2719,10 +2714,7 @@ void moveactors_r(void)
continue; continue;
} }
makeitfall(act); makeitfall(act);
movesprite_ex(act, movesprite_ex(act, DVector3(act->spr.angle.ToVector() * act->vel.X, act->vel.Z), CLIPMASK0, coll);
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
act->int_zvel(),CLIPMASK0, coll);
if (coll.type > kHitSector) if (coll.type > kHitSector)
{ {
deletesprite(act); deletesprite(act);
@ -2750,10 +2742,7 @@ void moveactors_r(void)
continue; continue;
} }
makeitfall(act); makeitfall(act);
movesprite_ex(act, movesprite_ex(act, DVector3(act->spr.angle.ToVector() * act->vel.X, act->vel.Z), CLIPMASK0, coll);
MulScale(act->int_xvel(), bcos(act->int_ang()), 14),
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
act->int_zvel(),CLIPMASK0, coll);
if (act->spr.pos.Z >= sectp->floorz - 8) if (act->spr.pos.Z >= sectp->floorz - 8)
{ {
if (sectp->lotag == 1) if (sectp->lotag == 1)
@ -2766,7 +2755,7 @@ void moveactors_r(void)
} }
break; break;
case BOWLINGBALL: case BOWLINGBALL:
if (act->int_xvel()) if (act->vel.X != 0)
{ {
if(!S_CheckSoundPlaying(356)) if(!S_CheckSoundPlaying(356))
S_PlayActorSound(356,act); S_PlayActorSound(356,act);
@ -2847,13 +2836,10 @@ void moveactors_r(void)
case POWDERKEG: case POWDERKEG:
if (!isRRRA() || (sectp->lotag != 1 && sectp->lotag != 160)) if (!isRRRA() || (sectp->lotag != 1 && sectp->lotag != 160))
if (act->int_xvel()) if (act->vel.X != 0)
{ {
movesprite_ex(act, movesprite_ex(act, DVector3(act->spr.angle.ToVector()* act->vel.X, act->vel.Z), CLIPMASK0, coll);
MulScale(act->int_xvel(), bcos(act->int_ang()), 14), act->vel.X -= 1. / 16.;
MulScale(act->int_xvel(), bsin(act->int_ang()), 14),
act->int_zvel(),CLIPMASK0, coll);
act->add_int_xvel(-1);
} }
break; break;