- add_int_ang

This commit is contained in:
Christoph Oelckers 2022-08-16 23:26:39 +02:00
parent c2f4fa8bb5
commit 2d51058de8
18 changed files with 70 additions and 70 deletions

View file

@ -3462,7 +3462,7 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector)
sourceactor->set_int_ang(nnExtRandom(-kAng360, kAng360) & 2047);
}
}
else if (sourceactor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD) sourceactor->spr.__int_angle += sourceactor->xspr.data4;
else if (sourceactor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD) sourceactor->add_int_ang(sourceactor->xspr.data4);
else if (sourceactor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE) sourceactor->spr.__int_angle -= sourceactor->xspr.data4;
else if (sourceactor->xspr.sysData1 == 0)
{

View file

@ -1423,7 +1423,7 @@ bool rat(DDukeActor* actor, bool makesound)
if (ssp(actor, CLIPMASK0))
{
if (makesound && (krand() & 255) == 0) S_PlayActorSound(RATTY, actor);
actor->spr.__int_angle += (krand() & 31) - 15 + bsin(actor->temp_data[0] << 8, -11);
actor->add_int_ang((krand() & 31) - 15 + bsin(actor->temp_data[0] << 8, -11));
}
else
{
@ -1437,7 +1437,7 @@ bool rat(DDukeActor* actor, bool makesound)
}
if (actor->spr.xvel < 128)
actor->spr.xvel += 2;
actor->spr.__int_angle += (krand() & 3) - 6;
actor->add_int_ang((krand() & 3) - 6);
return true;
}
@ -1638,7 +1638,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
actor->temp_data[2]++;
if ((actor->temp_data[2] & 3) == 0) spawn(actor, explosion);
getglobalz(actor);
actor->spr.__int_angle += 96;
actor->add_int_ang(96);
actor->spr.xvel = 128;
int j = ssp(actor, CLIPMASK0);
if (j != 1 || actor->spr.pos.Z > actor->floorz)
@ -1710,7 +1710,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
fi.shoot(actor, firelaser);
}
}
actor->spr.__int_angle += getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 2;
actor->add_int_ang(getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 2);
}
if (actor->temp_data[0] != 2 && actor->temp_data[0] != 3 && Owner)
@ -1770,7 +1770,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
}
actor->temp_data[3] = getincangle(actor->int_ang(), a);
actor->spr.__int_angle += actor->temp_data[3] >> 3;
actor->add_int_ang(actor->temp_data[3] >> 3);
if (actor->spr.pos.Z < Owner->spr.pos.Z - 2)
actor->spr.pos.Z += 2;
@ -1984,7 +1984,7 @@ void camera(DDukeActor *actor)
if (actor->int_ang() == minimum || actor->int_ang() == maximum)
{
increment = -increment;
actor->spr.__int_angle += increment;
actor->add_int_ang(increment);
}
else if (actor->int_ang() + increment < minimum)
{
@ -1996,7 +1996,7 @@ void camera(DDukeActor *actor)
}
else
{
actor->spr.__int_angle += increment;
actor->add_int_ang(increment);
}
}
}
@ -2038,7 +2038,7 @@ void forcesphereexplode(DDukeActor *actor)
}
actor->spr.pos = Owner->spr.pos;;
actor->spr.__int_angle += Owner->temp_data[0];
actor->add_int_ang(Owner->temp_data[0]);
if (l > 64) l = 64;
else if (l < 1) l = 1;
@ -2649,7 +2649,7 @@ void handle_se00(DDukeActor* actor)
}
}
actor->spr.__int_angle += (l * q);
actor->add_int_ang((l * q));
actor->temp_data[2] += (l * q);
}
else
@ -2668,7 +2668,7 @@ void handle_se00(DDukeActor* actor)
actor->temp_data[3] = ldist(actor, Owner);
actor->spr.xvel = actor->temp_data[3];
actor->copyXY(Owner);
actor->spr.__int_angle += (l * q);
actor->add_int_ang((l * q));
actor->temp_data[2] += (l * q);
}
@ -2708,7 +2708,7 @@ void handle_se00(DDukeActor* actor)
continue;
}
act2->spr.__int_angle += (l * q);
act2->add_int_ang((l * q));
act2->spr.__int_angle &= 2047;
act2->add_int_z(zchange);
@ -2795,7 +2795,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
int q = getincangle(actor->int_ang(), x) >> 3;
actor->temp_data[2] += q;
actor->spr.__int_angle += q;
actor->add_int_ang(q);
bool statstate = (!checkstat || ((sc->floorstat & CSTAT_SECTOR_SKY) == 0 && (sc->ceilingstat & CSTAT_SECTOR_SKY) == 0));
if (actor->spr.xvel == sc->extra)
@ -2897,7 +2897,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
pos.Y += x;
a2->set_int_pos(pos);
a2->spr.__int_angle += q;
a2->add_int_ang(q);
if (numplayers > 1)
{
@ -2999,7 +2999,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
actor->spr.xvel = 0;
operateactivators(actor->spr.hitag + (short)actor->temp_data[3], -1);
actor->SetOwner(nullptr);
actor->spr.__int_angle += 1024;
actor->add_int_ang(1024);
actor->temp_data[4] = 0;
fi.operateforcefields(actor, actor->spr.hitag);
}
@ -3361,7 +3361,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
x = getangle(Owner->spr.pos.XY() - actor->spr.pos.XY());
int q = getincangle(actor->int_ang(), x) >> 3;
actor->spr.__int_angle += q;
actor->add_int_ang(q);
if (rnd(32))
{
@ -4327,7 +4327,7 @@ void handle_se27(DDukeActor* actor)
{
ud.cameraactor = actor;
actor->temp_data[0] = 999;
actor->spr.__int_angle += getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3;
actor->add_int_ang(getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3);
actor->spr.yvel = 100 + int((actor->spr.pos.Z - ps[p].pos.Z) * (256. / 257.));
}
@ -4535,7 +4535,7 @@ void handle_se35(DDukeActor *actor, int SMALLSMOKE, int EXPLOSION2)
if (sc->int_ceilingz() > actor->int_pos().Z)
for (int j = 0; j < 8; j++)
{
actor->spr.__int_angle += krand() & 511;
actor->add_int_ang(krand() & 511);
auto spawned = spawn(actor, SMALLSMOKE);
if (spawned)
{
@ -4631,7 +4631,7 @@ void handle_se130(DDukeActor *actor, int countmax, int EXPLOSION2)
{
k->spr.xrepeat = k->spr.yrepeat = 2 + (krand() & 7);
k->set_int_z(sc->int_floorz() - (krand() % x));
k->spr.__int_angle += 256 - (krand() % 511);
k->add_int_ang(256 - (krand() % 511));
k->spr.xvel = krand() & 127;
ssp(k, CLIPMASK0);
}
@ -5039,7 +5039,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
if (abs(angdif) < 256)
{
j = 128 - (krand() & 256);
actor->spr.__int_angle += j;
actor->add_int_ang(j);
if (hits(actor) < 844)
actor->spr.__int_angle -= j;
}
@ -5047,7 +5047,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
else if (ticselapsed > 18 && ticselapsed < 26) // choose
{
if (abs(angdif >> 2) < 128) actor->set_int_ang(goalang);
else actor->spr.__int_angle += angdif >> 2;
else actor->add_int_ang(angdif >> 2);
}
}
else actor->set_int_ang(goalang);

View file

@ -485,7 +485,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
if (dasectp == nullptr) dasectp = &sector[0];
return result.setSector(dasectp);
}
if ((result.type == kHitWall || result.type == kHitSprite) && (actor->cgg == 0)) actor->spr.__int_angle += 768;
if ((result.type == kHitWall || result.type == kHitSprite) && (actor->cgg == 0)) actor->add_int_ang(768);
}
else
{
@ -2382,8 +2382,8 @@ static void greenslime(DDukeActor *actor)
if (actor->spr.xvel < 32) actor->spr.xvel += 4;
actor->spr.xvel = 64 - bcos(actor->temp_data[1], -9);
actor->spr.__int_angle += getincangle(actor->int_ang(),
getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3;
actor->add_int_ang(
getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3);
// TJR
}
@ -3513,11 +3513,11 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
else goalang = getangle(ps[playernum].pos.XY() - actor->spr.pos.XY());
angdif = getincangle(actor->int_ang(), goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
if (a & spin)
actor->spr.__int_angle += bsin(actor->temp_data[0] << 3, -6);
actor->add_int_ang(bsin(actor->temp_data[0] << 3, -6));
if (a & face_player_slow)
{
@ -3530,7 +3530,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
angdif = 0;
actor->set_int_ang(goalang);
}
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
@ -3547,7 +3547,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
goalang = getangle(newx - actor->spr.pos.X, newy - actor->spr.pos.Y);
angdif = getincangle(actor->int_ang(), goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
if (actor->temp_data[1] == 0 || a == 0)

View file

@ -401,7 +401,7 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un
if (dasectp == nullptr) dasectp = &sector[0];
return result.setSector(dasectp);
}
if ((result.type == kHitWall || result.type == kHitSprite) && (actor->cgg == 0)) actor->spr.__int_angle += 768;
if ((result.type == kHitWall || result.type == kHitSprite) && (actor->cgg == 0)) actor->add_int_ang(768);
}
else
{
@ -941,7 +941,7 @@ static void chickenarrow(DDukeActor* actor)
if (ang2 < 100)
{
if (ang3 > 1023)
actor->spr.__int_angle += 51;
actor->add_int_ang(51);
else
actor->spr.__int_angle -= 51;
}
@ -950,7 +950,7 @@ static void chickenarrow(DDukeActor* actor)
if (ang3 > 1023)
actor->spr.__int_angle -= 51;
else
actor->spr.__int_angle += 51;
actor->add_int_ang(51);
}
else
actor->set_int_ang(ang);
@ -3496,11 +3496,11 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
else goalang = getangle(ps[pnum].pos.XY() - actor->spr.pos.XY());
angdif = getincangle(actor->int_ang(), goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
if (a & spin)
actor->spr.__int_angle += bsin(actor->temp_data[0] << 3, -6);
actor->add_int_ang(bsin(actor->temp_data[0] << 3, -6));
if (a & face_player_slow)
{
@ -3513,7 +3513,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
angdif = 0;
actor->set_int_ang(goalang);
}
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
if (isRRRA())
@ -3529,7 +3529,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
angdif = 0;
actor->set_int_ang(goalang);
}
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
if ((a & jumptoplayer) == jumptoplayer)
@ -3591,7 +3591,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
goalang = getangle(newx - actor->spr.pos.X, newy - actor->spr.pos.Y);
angdif = getincangle(actor->int_ang(), goalang) >> 2;
if (angdif > -8 && angdif < 0) angdif = 0;
actor->spr.__int_angle += angdif;
actor->add_int_ang(angdif);
}
if (actor->temp_data[1] == 0 || a == 0)

View file

@ -1416,14 +1416,14 @@ static int ifcanshoottarget(DDukeActor *actor, int g_p, int g_x)
j = 0;
else
{
actor->spr.__int_angle += angdif; j = hitasprite(actor, &hit); actor->spr.__int_angle -= angdif;
actor->add_int_ang(angdif); j = hitasprite(actor, &hit); actor->spr.__int_angle -= angdif;
if (j > sclip)
{
if (hit != nullptr && hit->spr.picnum == actor->spr.picnum)
j = 0;
else
{
actor->spr.__int_angle -= angdif; j = hitasprite(actor, &hit); actor->spr.__int_angle += angdif;
actor->spr.__int_angle -= angdif; j = hitasprite(actor, &hit); actor->add_int_ang(angdif);
if (j > 768)
{
if (hit != nullptr && hit->spr.picnum == actor->spr.picnum)

View file

@ -442,7 +442,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
jib->spr.pos.Z += 4;
jib->spr.xvel = 16;
jib->spr.xrepeat = jib->spr.yrepeat = 24;
jib->spr.__int_angle += 64 - (krand() & 127);
jib->add_int_ang(64 - (krand() & 127));
}
}
else spawn(spark, SMALLSMOKE);
@ -651,7 +651,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
spawned->spr.xvel = 1024;
ssp(spawned, CLIPMASK0);
spawned->spr.xvel = l;
spawned->spr.__int_angle += 128 - (krand() & 255);
spawned->add_int_ang(128 - (krand() & 255));
}
}
@ -770,7 +770,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i
}
spawned->add_int_pos({ xoffs, yoffs, 0 });
spawned->spr.__int_angle += aoffs;
spawned->add_int_ang(aoffs);
spawned->spr.xrepeat = 42;
spawned->spr.yrepeat = 42;
@ -804,7 +804,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i
else if ((isWW2GI() && aplWeaponWorksLike(ps[p].curr_weapon, p) == DEVISTATOR_WEAPON) || (!isWW2GI() && ps[p].curr_weapon == DEVISTATOR_WEAPON))
{
spawned->spr.extra >>= 2;
spawned->spr.__int_angle += 16 - (krand() & 31);
spawned->add_int_ang(16 - (krand() & 31));
spawned->spr.zvel += 256 - (krand() & 511);
if (ps[p].hbomb_hold_delay)
@ -2219,7 +2219,7 @@ static void operateweapon(int snum, ESyncBits actions)
k = hits(pact);
if (k < 512)
{
spawned->spr.__int_angle += 1024;
spawned->add_int_ang(1024);
spawned->spr.zvel /= 3;
spawned->spr.xvel /= 3;
}
@ -2347,9 +2347,9 @@ static void operateweapon(int snum, ESyncBits actions)
auto j = spawn(pact, SHOTGUNSHELL);
if (j)
{
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
ssp(j, CLIPMASK0);
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
}
p->kickback_pic++;
break;
@ -2375,7 +2375,7 @@ static void operateweapon(int snum, ESyncBits actions)
auto j = spawn(pact, SHELL);
if (j)
{
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
j->spr.__int_angle &= 2047;
j->spr.xvel += 32;
j->spr.pos.Z += 3;

View file

@ -337,7 +337,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
l->spr.pos.Z += 4;
l->spr.xvel = 16;
l->spr.xrepeat = l->spr.yrepeat = 24;
l->spr.__int_angle += 64 - (krand() & 127);
l->add_int_ang(64 - (krand() & 127));
}
}
else spawn(spark, SMALLSMOKE);
@ -717,7 +717,7 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
else if (ps[p].curr_weapon == TIT_WEAPON)
{
spawned->spr.extra >>= 2;
spawned->spr.__int_angle += 16 - (krand() & 31);
spawned->add_int_ang(16 - (krand() & 31));
spawned->spr.zvel += 256 - (krand() & 511);
if (ps[p].hbomb_hold_delay)
@ -2761,7 +2761,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
k = hits(p->GetActor());
if (k < 512)
{
spawned->spr.__int_angle += 1024;
spawned->add_int_ang(1024);
spawned->spr.zvel /= 3;
spawned->spr.xvel /= 3;
}
@ -2977,7 +2977,7 @@ static void operateweapon(int snum, ESyncBits actions, sectortype* psectp)
if (j)
{
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
j->spr.__int_angle &= 2047;
j->spr.xvel += 32;
j->spr.pos.Z += 3;

View file

@ -117,15 +117,15 @@ void DoSpawn(player_struct *p, int snum)
if((aplWeaponFlags(p->curr_weapon, snum) & WEAPON_FLAG_SPAWNTYPE2 ) )
{
// like shotgun shells
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
ssp(j,CLIPMASK0);
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
// p->kickback_pic++;
}
else if((aplWeaponFlags(p->curr_weapon, snum) & WEAPON_FLAG_SPAWNTYPE3 ) )
{
// like chaingun shells
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
j->spr.__int_angle &= 2047;
j->spr.xvel += 32;
j->add_int_z(3<<8);
@ -367,7 +367,7 @@ void operateweapon_ww(int snum, ESyncBits actions)
k = hits(p->GetActor());
if (k < 512)
{
j->spr.__int_angle += 1024;
j->add_int_ang(1024);
j->spr.zvel /= 3;
j->spr.xvel /= 3;
}

View file

@ -927,7 +927,7 @@ static void handle_st25(sectortype* sptr, DDukeActor* actor)
if (act3->spr.lotag == 15)
{
act3->sector()->lotag ^= 0x8000; // Toggle the open or close
act3->spr.__int_angle += 1024;
act3->add_int_ang(1024;
if (act3->temp_data[4]) callsound(act3->sector(), act3);
callsound(act3->sector(), act3);
if (act3->sector()->lotag & 0x8000) act3->temp_data[4] = 1;

View file

@ -1190,7 +1190,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
for (j = 0; j < 48; j++)
{
fi.shoot(targ, BLOODSPLAT1);
targ->spr.__int_angle += 333;
targ->add_int_ang(333);
}
S_PlayActorSound(GLASS_HEAVYBREAK, targ);
S_PlayActorSound(SQUISHED, targ);
@ -1377,7 +1377,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
spawned->spr.pos.Z += 4;
spawned->spr.xvel = 16;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->spr.__int_angle += 32 - (krand() & 63);
spawned->add_int_ang(32 - (krand() & 63));
}
}

View file

@ -2333,7 +2333,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
spawned->spr.pos.Z += 4;
spawned->spr.xvel = 16;
spawned->spr.xrepeat = spawned->spr.yrepeat = 24;
spawned->spr.__int_angle += 32 - (krand() & 63);
spawned->add_int_ang(32 - (krand() & 63));
}
}

View file

@ -187,7 +187,7 @@ void BuildFish(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
void IdleFish(DExhumedActor* pActor, int edx)
{
pActor->spr.__int_angle += (256 - RandomSize(9)) + 1024;
pActor->add_int_ang((256 - RandomSize(9)) + 1024);
pActor->spr.__int_angle &= kAngleMask;
pActor->spr.xvel = bcos(pActor->int_ang(), -8);

View file

@ -624,7 +624,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
}
[[fallthrough]];
case kHitWall:
pActor->spr.__int_angle += (RandomSize(9) + 768);
pActor->add_int_ang((RandomSize(9) + 768);
pActor->spr.__int_angle &= kAngleMask;
pActor->spr.xvel = bcos(pActor->int_ang(), -3);
pActor->spr.yvel = bsin(pActor->int_ang(), -3);
@ -906,7 +906,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
runlist_DamageEnemy(pTarget, pActor, 10);
D3PlayFX(StaticSound[kSoundQTail] | 0x2000, pActor);
pActor->spr.__int_angle += RandomSize(9) + 768;
pActor->add_int_ang(RandomSize(9) + 768);
pActor->spr.__int_angle &= kAngleMask;
pActor->spr.zvel = (-20) - RandomSize(6);
@ -1303,7 +1303,7 @@ void AIQueen::Tick(RunListEvent* ev)
}
[[fallthrough]];
case 0x8000:
pActor->spr.__int_angle += 256;
pActor->add_int_ang(256);
pActor->spr.__int_angle &= kAngleMask;
SetQueenSpeed(pActor, si);

View file

@ -410,7 +410,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
if (mode == 0)
{
PlotCourseToSprite(pActor, pTarget);
pActor->spr.__int_angle += RandomSize(7) - 63;
pActor->add_int_ang(RandomSize(7) - 63);
pActor->spr.__int_angle &= kAngleMask;
pActor->spr.xvel = bcos(pActor->int_ang());

View file

@ -156,7 +156,7 @@ void AIWasp::Damage(RunListEvent* ev)
}
pActor->nAction = 1;
pActor->spr.__int_angle += RandomSize(9) + 768;
pActor->add_int_ang(RandomSize(9) + 768);
pActor->spr.__int_angle &= kAngleMask;
pActor->nVel = 3000;
@ -304,7 +304,7 @@ void AIWasp::Tick(RunListEvent* ev)
{
if (bVal)
{
pActor->spr.__int_angle += RandomSize(9) + 768;
pActor->add_int_ang(RandomSize(9) + 768);
pActor->spr.__int_angle &= kAngleMask;
pActor->spr.zvel = (-20) - RandomSize(6);

View file

@ -1201,7 +1201,7 @@ DSWActor* BunnyHatch2(DSWActor* actor)
actorNew->spr.xvel = 150 + RandomRange(1000);
actorNew->user.Health = 1; // Easy to pop. Like shootn' skeet.
actorNew->spr.__int_angle -= RandomRange(128);
actorNew->spr.__int_angle += RandomRange(128);
actorNew->add_int_ang(RandomRange(128));
}
else
PickJumpMaxSpeed(actorNew, -600);

View file

@ -2209,7 +2209,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
HelpMissileLateral(actorNew,1500);
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 128));
}
actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2);
actorNew->add_int_ang((RANDOM_P2(128<<5)>>5) - (128 / 2));
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
// Set the shell number
@ -2223,7 +2223,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 512));
HelpMissileLateral(actorNew,1300);
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 128 - 64));
actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2);
actorNew->add_int_ang((RANDOM_P2(128<<5)>>5) - (128 / 2));
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
// Set the shell number

View file

@ -15369,7 +15369,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
WeaponAutoAim(actor, actorNew, 64, false);
// a bit of randomness
actorNew->spr.__int_angle += RandomRange(30) - 15;
actorNew->add_int_ang(RandomRange(30) - 15);
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
@ -15544,7 +15544,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
WeaponAutoAim(actor, actorNew, 64, false);
// a bit of randomness
actorNew->spr.__int_angle += RandomRange(30) - 15;
actorNew->add_int_ang(RandomRange(30) - 15);
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());