- remaining add_int_ang calls.

This commit is contained in:
Christoph Oelckers 2022-09-15 18:12:09 +02:00
parent 62d9a80379
commit 8d99277b87
7 changed files with 11 additions and 11 deletions

View file

@ -1417,7 +1417,7 @@ bool rat(DDukeActor* actor, bool makesound)
if (ssp(actor, CLIPMASK0))
{
if (makesound && (krand() & 255) == 0) S_PlayActorSound(RATTY, actor);
actor->add_int_ang((krand() & 31) - 15 + bsin(actor->temp_data[0] << 8, -11));
actor->spr.angle += mapangle((krand() & 31) - 15 + BobVal(actor->temp_data[0] << 8) * 8);
}
else
{

View file

@ -3500,7 +3500,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
}
if (a & spin)
actor->add_int_ang(bsin(actor->temp_data[0] << 3, -6));
actor->spr.angle += DAngle45 * BobVal(actor->temp_data[0] << 3);
if (a & face_player_slow)
{

View file

@ -3457,7 +3457,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
}
if (a & spin)
actor->add_int_ang(bsin(actor->temp_data[0] << 3, -6));
actor->spr.angle += DAngle45 * BobVal(actor->temp_data[0] << 3);
if (a & face_player_slow)
{

View file

@ -189,7 +189,7 @@ void resetpins(sectortype* sect)
{
spawned->set_native_clipdist((1 + (krand() % 1)) * 16 + 32);
}
spawned->add_int_ang(-(((krand() & 32) - (krand() & 64)) & 2047));
spawned->spr.angle -= DAngle22_5 * 0.125 * (((krand() & 32) - (krand() & 64)) >> 5); // weird formula to preserve number of krand calls.
}
}
if (a2->spr.picnum == 280)

View file

@ -64,7 +64,7 @@ static int ccmd_spawn(CCmdFuncPtr parm)
set |= 8;
[[fallthrough]];
case 4: // ang
ang = DAngle::fromDeg(atol(parm->parms[3])); set |= 4;
ang = DAngle::fromDeg(atoi(parm->parms[3])); set |= 4;
[[fallthrough]];
case 3: // cstat
cstat = ESpriteFlags::FromInt(atol(parm->parms[2])); set |= 2;
@ -98,7 +98,7 @@ static int ccmd_spawn(CCmdFuncPtr parm)
{
if (set & 1) spawned->spr.pal = (uint8_t)pal;
if (set & 2) spawned->spr.cstat = ESpriteFlags::FromInt(cstat);
if (set & 4) spawned->set_int_ang(ang);
if (set & 4) spawned->spr.angle = ang;
if (set & 8) SetActor(spawned, DVector3( x, y, z ));
if (spawned->sector() == nullptr)

View file

@ -150,8 +150,8 @@ void animatewalls_d(void)
if (wal->cstat & CSTAT_WALL_ANY_EXCEPT_BLOCK)
{
wal->addxpan(-t / 4096.f); // bcos(t, -12);
wal->addypan(-t / 4096.f); // bsin(t, -12);
wal->addxpan(-t / 4096.f);
wal->addypan(-t / 4096.f);
if (wal->extra == 1)
{

View file

@ -265,8 +265,8 @@ void animatewalls_r(void)
if (wal->cstat & CSTAT_WALL_ANY_EXCEPT_BLOCK)
{
wal->addxpan(-t / 4096.f); // bcos(t, -12);
wal->addypan(-t / 4096.f); // bsin(t, -12);
wal->addxpan(-t / 4096.f);
wal->addypan(-t / 4096.f);
if (wal->extra == 1)
{
@ -2343,7 +2343,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
spawned->spr.pos.Z += 4;
spawned->vel.X = 1;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->add_int_ang(32 - (krand() & 63));
spawned->spr.angle = DAngle22_5/4 - randomAngle(22.5/2);
}
}