- floatified all remaining add_int_pos calls.

This commit is contained in:
Christoph Oelckers 2022-09-15 17:48:51 +02:00
parent 6c0e2624e5
commit 61a45da964
3 changed files with 11 additions and 5 deletions

View file

@ -1080,7 +1080,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const DVector3& oldpo
}
if (proj->spr.extra <= 0)
{
proj->add_int_pos({ bcos(proj->int_ang(), -7), bsin(proj->int_ang(), -7), 0 });
proj->spr.pos += proj->spr.angle.ToVector() * 8;
auto Owner = proj->GetOwner();
if (!isRRRA() || !Owner || (Owner->spr.picnum != CHEER && Owner->spr.picnum != CHEERSTAYPUT))
{

View file

@ -116,13 +116,15 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
return act;
act->SetOwner(actj);
ChangeActorStat(act, STAT_MISC);
act->add_int_pos({ krand() % 512 - 256, krand() % 512 - 256, 0 });
act->spr.pos.X += krandf(32) - 16;
act->spr.pos.Y += krandf(32) - 16;
act->spr.xrepeat = 16;
act->spr.yrepeat = 16;
return act;
case WHISPYSMOKE:
ChangeActorStat(act, STAT_MISC);
act->add_int_pos({ krand() % 256 - 128, krand() % 256 - 128, 0 });
act->spr.pos.X += krandf(16) - 8;
act->spr.pos.Y += krandf(16) - 8;
act->spr.xrepeat = 20;
act->spr.yrepeat = 20;
return act;
@ -639,7 +641,9 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.picnum == ONFIRE)
{
act->add_int_pos({ krand() % 256 - 128, krand() % 256 - 128, -(krand() % 10240) });
act->spr.pos.X += krandf(32) - 16;
act->spr.pos.Y += krandf(32) - 16;
act->spr.pos.Z -= krandf(40);
act->spr.cstat |= CSTAT_SPRITE_YCENTER;
}

View file

@ -903,7 +903,9 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
act->spr.yrepeat = 64;
act->spr.cstat = CSTAT_SPRITE_TRANSLUCENT;
act->spr.cstat |= CSTAT_SPRITE_TRANS_FLIP;
act->add_int_pos({ (krand() & 2047) - 1024, (krand() & 2047) - 1024, (krand() & 2047) - 1024 });
act->spr.pos.X += krandf(128) - 64;
act->spr.pos.Y += krandf(128) - 64;
act->spr.pos.Z += krandf(8) - 4;
break;
case MAMA:
if (act->spr.pal == 30)