- use int_ang().

This commit is contained in:
Christoph Oelckers 2022-08-16 23:15:49 +02:00
parent 735b9a8fed
commit 33d5b54ce0
81 changed files with 790 additions and 790 deletions

View file

@ -69,8 +69,8 @@ static inline void get_floorspr_points(DCoreActor *spr, int32_t px, int32_t py,
int32_t *y1, int32_t *y2, int32_t *y3, int32_t *y4, int heinum = 0)
{
const int32_t tilenum = spr->spr.picnum;
const int32_t cosang = bcos(spr->spr.__int_angle);
const int32_t sinang = bsin(spr->spr.__int_angle);
const int32_t cosang = bcos(spr->int_ang());
const int32_t sinang = bsin(spr->int_ang());
vec2_t const span = { tileWidth(tilenum), tileHeight(tilenum)};
vec2_t const repeat = { spr->spr.xrepeat, spr->spr.yrepeat };
@ -141,7 +141,7 @@ static int32_t spriteGetZOfSlope(DCoreActor* actor, int32_t dax, int32_t day)
if (heinum == 0)
return actor->int_pos().Z;
int const j = DMulScale(bsin(actor->spr.__int_angle + 1024), day - actor->int_pos().Y, -bsin(actor->spr.__int_angle + 512), dax - actor->int_pos().X, 4);
int const j = DMulScale(bsin(actor->int_ang() + 1024), day - actor->int_pos().Y, -bsin(actor->int_ang() + 512), dax - actor->int_pos().X, 4);
return actor->int_pos().Z + MulScale(heinum, j, 18);
}
@ -642,8 +642,8 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
if (clipinsideboxline(cent.X, cent.Y, p1.X, p1.Y, p2.X, p2.Y, rad) != 0)
{
vec2_t v = { MulScale(bcos(actor->spr.__int_angle + 256), walldist, 14),
MulScale(bsin(actor->spr.__int_angle + 256), walldist, 14) };
vec2_t v = { MulScale(bcos(actor->int_ang() + 256), walldist, 14),
MulScale(bsin(actor->int_ang() + 256), walldist, 14) };
if ((p1.X-pos->X) * (p2.Y-pos->Y) >= (p2.X-pos->X) * (p1.Y-pos->Y)) // Front
addclipline(p1.X+v.X, p1.Y+v.Y, p2.X+v.Y, p2.Y-v.X, obj, false);
@ -692,8 +692,8 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
get_floorspr_points(actor, 0, 0, &rxi[0], &rxi[1], &rxi[2], &rxi[3],
&ryi[0], &ryi[1], &ryi[2], &ryi[3], heinum);
vec2_t v = { MulScale(bcos(actor->spr.__int_angle - 256), walldist, 14),
MulScale(bsin(actor->spr.__int_angle - 256), walldist, 14) };
vec2_t v = { MulScale(bcos(actor->int_ang() - 256), walldist, 14),
MulScale(bsin(actor->int_ang() - 256), walldist, 14) };
if ((rxi[0]-pos->X) * (ryi[1]-pos->Y) < (rxi[1]-pos->X) * (ryi[0]-pos->Y))
{
@ -723,8 +723,8 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
// the rest is for slope sprites only.
const int32_t tilenum = actor->spr.picnum;
const int32_t cosang = bcos(actor->spr.__int_angle);
const int32_t sinang = bsin(actor->spr.__int_angle);
const int32_t cosang = bcos(actor->int_ang());
const int32_t sinang = bsin(actor->int_ang());
vec2_t const span = { tileWidth(tilenum), tileHeight(tilenum) };
vec2_t const repeat = { actor->spr.xrepeat, actor->spr.yrepeat };
vec2_t adjofs = { tileLeftOffset(tilenum), tileTopOffset(tilenum) };
@ -752,8 +752,8 @@ CollisionBase clipmove_(vec3_t * const pos, int * const sectnum, int32_t xvect,
int32_t x2 = x1 - MulScale(sinang, rspanx, 16);
int32_t y2 = y1 + MulScale(cosang, rspanx, 16);
vec2_t const v = { MulScale(bcos(actor->spr.__int_angle - 256), walldist, 14),
MulScale(bsin(actor->spr.__int_angle - 256), walldist, 14) };
vec2_t const v = { MulScale(bcos(actor->int_ang() - 256), walldist, 14),
MulScale(bsin(actor->int_ang() - 256), walldist, 14) };
if (clipinsideboxline(cent.X, cent.Y, x1, y1, x2, y2, rad) != 0)
{
@ -1202,8 +1202,8 @@ void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBas
get_floorspr_points(actor, pos.X, pos.Y, &v1.X, &v2.X, &v3.X, &v4.X,
&v1.Y, &v2.Y, &v3.Y, &v4.Y, spriteGetSlope(actor));
vec2_t const da = { MulScale(bcos(actor->spr.__int_angle - 256), walldist + 4, 14),
MulScale(bsin(actor->spr.__int_angle - 256), walldist + 4, 14) };
vec2_t const da = { MulScale(bcos(actor->int_ang() - 256), walldist + 4, 14),
MulScale(bsin(actor->int_ang() - 256), walldist + 4, 14) };
v1.X += da.X; v2.X -= da.Y; v3.X -= da.X; v4.X += da.Y;
v1.Y += da.Y; v2.Y += da.X; v3.Y -= da.Y; v4.Y -= da.X;
@ -1512,8 +1512,8 @@ int hitscan(const vec3_t& start, const sectortype* startsect, const vec3_t& dire
{
int32_t x3, y3, x4, y4;
int32_t const heinum = spriteGetSlope(actor);
int32_t const dax = (heinum * sintable[(actor->spr.__int_angle + 1024) & 2047]) << 1;
int32_t const day = (heinum * sintable[(actor->spr.__int_angle + 512) & 2047]) << 1;
int32_t const dax = (heinum * sintable[(actor->int_ang() + 1024) & 2047]) << 1;
int32_t const day = (heinum * sintable[(actor->int_ang() + 512) & 2047]) << 1;
int32_t const j = (vz << 8) - DMulScale(dax, vy, -day, vx, 15);
if (j == 0) continue;
if ((cstat & 64) != 0)

View file

@ -104,7 +104,7 @@ bool calcChaseCamPos(int* px, int* py, int* pz, DCoreActor* act, sectortype** ps
else
{
// same as wall calculation.
daang = buildang(act->spr.__int_angle - 512);
daang = buildang(act->int_ang() - 512);
newdist = nx * daang.bsin() + ny * -daang.bcos();
if (abs(nx) > abs(ny))
@ -356,8 +356,8 @@ void TGetFlatSpritePosition(const spritetypebase* spr, vec2_t pos, vec2_t* out,
int sprcenterx = (width >> 1) + leftofs;
int sprcentery = (height >> 1) + topofs;
int cosang = bcos(spr->__int_angle);
int sinang = bsin(spr->__int_angle);
int cosang = bcos(spr->int_ang());
int sinang = bsin(spr->int_ang());
int cosangslope = DivScale(cosang, ratio, 12);
int sinangslope = DivScale(sinang, ratio, 12);

View file

@ -339,7 +339,7 @@ inline int32_t tspriteGetZOfSlope(const tspritetype* tspr, int dax, int day)
int heinum = tspriteGetSlope(tspr);
if (heinum == 0) return tspr->int_pos().Z;
int const j = DMulScale(bsin(tspr->__int_angle + 1024), day - tspr->int_pos().Y, -bsin(tspr->__int_angle + 512), dax - tspr->int_pos().X, 4);
int const j = DMulScale(bsin(tspr->int_ang() + 1024), day - tspr->int_pos().Y, -bsin(tspr->int_ang() + 512), dax - tspr->int_pos().X, 4);
return tspr->int_pos().Z + MulScale(heinum, j, 18);
}

View file

@ -459,7 +459,7 @@ bool HWSprite::ProcessVoxel(HWDrawInfo* di, voxmodel_t* vox, tspritetype* spr, s
visibility = sectorVisibility(sector);
voxel = vox;
auto ang = spr->__int_angle + ownerActor->sprext.angoff;
auto ang = spr->int_ang() + ownerActor->sprext.angoff;
if ((spr->clipdist & TSPR_MDLROTATE) || rotate)
{
int myclock = (PlayClock << 3) + MulScale(4 << 3, (int)di->Viewpoint.TicFrac, 16);

View file

@ -2968,7 +2968,7 @@ static bool actKillModernDude(DBloodActor* actor, DAMAGE_TYPE damageType)
else
{
seqKill(actor);
DBloodActor* pEffect = gFX.fxSpawnActor((FX_ID)52, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle);
DBloodActor* pEffect = gFX.fxSpawnActor((FX_ID)52, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang());
if (pEffect != nullptr)
{
pEffect->spr.cstat = CSTAT_SPRITE_ALIGNMENT_FACING;
@ -4101,8 +4101,8 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
static void actKickObject(DBloodActor* kicker, DBloodActor* kicked)
{
int nSpeed = ClipLow(approxDist(kicker->vel.X, kicker->vel.Y) * 2, 0xaaaaa);
kicked->vel.X = MulScale(nSpeed, Cos(kicker->spr.__int_angle + Random2(85)), 30);
kicked->vel.Y = MulScale(nSpeed, Sin(kicker->spr.__int_angle + Random2(85)), 30);
kicked->vel.X = MulScale(nSpeed, Cos(kicker->int_ang() + Random2(85)), 30);
kicked->vel.Y = MulScale(nSpeed, Sin(kicker->int_ang() + Random2(85)), 30);
kicked->vel.Z = MulScale(nSpeed, -0x2000, 14);
kicked->spr.flags = 7;
}
@ -5967,8 +5967,8 @@ static void actCheckTraps()
x += (dx / 2) >> 12;
y += (dy / 2) >> 12;
}
dy = bsin(actor->spr.__int_angle);
dx = bcos(actor->spr.__int_angle);
dy = bsin(actor->int_ang());
dx = bcos(actor->int_ang());
gVectorData[kVectorTchernobogBurn].maxDist = actor->xspr.data1 << 9;
actFireVector(actor, 0, 0, dx, dy, Random2(0x8888), kVectorTchernobogBurn);
}
@ -6407,8 +6407,8 @@ DBloodActor* actSpawnThing(sectortype* pSector, int x, int y, int z, int nThingT
DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingType, int a6)
{
assert(thingType >= kThingBase && thingType < kThingMax);
int x = actor->int_pos().X + MulScale(a2, Cos(actor->spr.__int_angle + 512), 30);
int y = actor->int_pos().Y + MulScale(a2, Sin(actor->spr.__int_angle + 512), 30);
int x = actor->int_pos().X + MulScale(a2, Cos(actor->int_ang() + 512), 30);
int y = actor->int_pos().Y + MulScale(a2, Sin(actor->int_ang() + 512), 30);
int z = actor->int_pos().Z + a3;
x += MulScale(actor->spr.clipdist, Cos(actor->spr.__int_angle), 28);
y += MulScale(actor->spr.clipdist, Sin(actor->spr.__int_angle), 28);
@ -6519,8 +6519,8 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
assert(nType >= kMissileBase && nType < kMissileMax);
bool impact = false;
const MissileType* pMissileInfo = &missileInfo[nType - kMissileBase];
int x = actor->int_pos().X + MulScale(a2, Cos(actor->spr.__int_angle + 512), 30);
int y = actor->int_pos().Y + MulScale(a2, Sin(actor->spr.__int_angle + 512), 30);
int x = actor->int_pos().X + MulScale(a2, Cos(actor->int_ang() + 512), 30);
int y = actor->int_pos().Y + MulScale(a2, Sin(actor->int_ang() + 512), 30);
int z = actor->int_pos().Z + a3;
int clipdist = pMissileInfo->clipDist + actor->spr.clipdist;
x += MulScale(clipdist, Cos(actor->spr.__int_angle), 28);
@ -6551,7 +6551,7 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
spawned->spr.xrepeat = pMissileInfo->xrepeat;
spawned->spr.yrepeat = pMissileInfo->yrepeat;
spawned->spr.picnum = pMissileInfo->picnum;
spawned->spr.__int_angle = (actor->spr.__int_angle + pMissileInfo->angleOfs) & 2047;
spawned->spr.__int_angle = (actor->int_ang() + pMissileInfo->angleOfs) & 2047;
spawned->vel.X = MulScale(pMissileInfo->velocity, a4, 14);
spawned->vel.Y = MulScale(pMissileInfo->velocity, a5, 14);
spawned->vel.Z = MulScale(pMissileInfo->velocity, a6, 14);

View file

@ -251,8 +251,8 @@ void aiChooseDirection(DBloodActor* actor, int a3)
{
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
int vc = ((a3 + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -260,30 +260,30 @@ void aiChooseDirection(DBloodActor* actor, int a3)
int v8 = 341;
if (vc < 0)
v8 = -341;
if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + vc, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + vc;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + vc / 2, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle - vc / 2, vsi))
actor->xspr.goalAng = actor->spr.__int_angle - vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + v8, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + v8;
if (CanMove(actor, actor->GetTarget(), actor->int_ang() + vc, vsi))
actor->xspr.goalAng = actor->int_ang() + vc;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() + vc / 2, vsi))
actor->xspr.goalAng = actor->int_ang() + vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - vc / 2, vsi))
actor->xspr.goalAng = actor->int_ang() - vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() + v8, vsi))
actor->xspr.goalAng = actor->int_ang() + v8;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle, vsi))
actor->xspr.goalAng = actor->spr.__int_angle;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle - v8, vsi))
actor->xspr.goalAng = actor->spr.__int_angle - v8;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
actor->xspr.goalAng = actor->int_ang() - v8;
//else if (actor->spr.flags&2)
//actor->xspr.goalAng = actor->spr.__int_angle+341;
else // Weird..
actor->xspr.goalAng = actor->spr.__int_angle + 341;
actor->xspr.goalAng = actor->int_ang() + 341;
if (Chance(0x8000))
actor->xspr.dodgeDir = 1;
else
actor->xspr.dodgeDir = -1;
if (!CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + actor->xspr.dodgeDir * 512, 512))
if (!CanMove(actor, actor->GetTarget(), actor->int_ang() + actor->xspr.dodgeDir * 512, 512))
{
actor->xspr.dodgeDir = -actor->xspr.dodgeDir;
if (!CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + actor->xspr.dodgeDir * 512, 512))
if (!CanMove(actor, actor->GetTarget(), actor->int_ang() + actor->xspr.dodgeDir * 512, 512))
actor->xspr.dodgeDir = 0;
}
}
@ -300,7 +300,7 @@ void aiMoveForward(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (abs(nAng) > 341)
return;
actor->vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->spr.__int_angle), 30);
@ -319,7 +319,7 @@ void aiMoveTurn(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
}
//---------------------------------------------------------------------------
@ -334,11 +334,11 @@ void aiMoveDodge(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (actor->xspr.dodgeDir)
{
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);

View file

@ -65,8 +65,8 @@ void batBiteSeqCallback(int, DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto pTarget = actor->GetTarget();
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
DUDEINFO* pDudeInfoT = getDudeInfo(pTarget->spr.type);
@ -141,7 +141,7 @@ static void batThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &batSearch);
batThinkTarget(actor);
}
@ -205,9 +205,9 @@ static void batMoveDodgeUp(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -228,11 +228,11 @@ static void batMoveDodgeDown(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (actor->xspr.dodgeDir == 0)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -312,19 +312,19 @@ static void batMoveForward(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if ((unsigned int)Random(64) < 32 && nDist <= 0x200)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -343,11 +343,11 @@ static void batMoveSwoop(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -355,8 +355,8 @@ static void batMoveSwoop(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x200)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -373,11 +373,11 @@ static void batMoveFly(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->spr.__int_angle = (actor->spr.__int_angle + 512) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -385,8 +385,8 @@ static void batMoveFly(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x200)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -66,8 +66,8 @@ void SlashSeqCallback(int, DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
// Correct ?
int dz = actor->int_pos().Z - target->int_pos().Z;
dx += Random3(4000 - 700 * gGameOptions.nDifficulty);
@ -80,8 +80,8 @@ void SlashSeqCallback(int, DBloodActor* actor)
void StompSeqCallback(int, DBloodActor* actor)
{
int angx = bcos(actor->spr.__int_angle);
int angy = bsin(actor->spr.__int_angle);
int angx = bcos(actor->int_ang());
int angy = bsin(actor->int_ang());
int x = actor->int_pos().X;
int y = actor->int_pos().Y;
int z = actor->int_pos().Z;
@ -184,7 +184,7 @@ static void beastThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &beastSwimSearch);
@ -335,7 +335,7 @@ static void beastThinkSwimGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &beastSwimSearch);
aiThinkTarget(actor);
}
@ -400,7 +400,7 @@ static void beastMoveForward(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (abs(nAng) > 341)
return;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -418,19 +418,19 @@ static void sub_628A0(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if (Random(64) < 32 && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -453,11 +453,11 @@ static void sub_62AE0(DBloodActor* actor)
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -466,8 +466,8 @@ static void sub_62AE0(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -488,11 +488,11 @@ static void sub_62D7C(DBloodActor* actor)
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->spr.__int_angle = (actor->spr.__int_angle + 512) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -501,8 +501,8 @@ static void sub_62D7C(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -77,8 +77,8 @@ void eelBiteSeqCallback(int, DBloodActor* actor)
}
auto target = actor->GetTarget();
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
@ -155,7 +155,7 @@ static void eelThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &eelSearch);
eelThinkTarget(actor);
}
@ -219,9 +219,9 @@ static void eelMoveDodgeUp(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -242,11 +242,11 @@ static void eelMoveDodgeDown(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (actor->xspr.dodgeDir == 0)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -322,19 +322,19 @@ static void eelMoveForward(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if (nDist <= 0x399)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -353,7 +353,7 @@ static void eelMoveSwoop(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
if (abs(nAng) > 341)
return;
@ -362,8 +362,8 @@ static void eelMoveSwoop(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x8000) && nDist <= 0x399)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -380,7 +380,7 @@ static void eelMoveAscend(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
if (abs(nAng) > 341)
return;
@ -389,8 +389,8 @@ static void eelMoveAscend(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x399)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -89,7 +89,7 @@ static void burnThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
{
switch (actor->spr.type)
{

View file

@ -59,8 +59,8 @@ AISTATE tinycaleb139698 = { kAiStateOther, 8, -1, 120, NULL, aiMoveTurn, NULL, &
void SeqAttackCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int dz = actor->dudeSlope;
dx += Random2(1500);
dy += Random2(1500);
@ -99,7 +99,7 @@ static void calebThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &tinycalebSwimSearch);
@ -217,7 +217,7 @@ static void calebThinkSwimGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &tinycalebSwimSearch);
aiThinkTarget(actor);
}
@ -278,19 +278,19 @@ static void sub_65D04(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if (Random(64) < 32 && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -314,11 +314,11 @@ static void sub_65F44(DBloodActor* actor)
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -327,8 +327,8 @@ static void sub_65F44(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -350,11 +350,11 @@ static void sub_661E0(DBloodActor* actor)
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->spr.__int_angle = (actor->spr.__int_angle + 512) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -363,8 +363,8 @@ static void sub_661E0(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -57,8 +57,8 @@ AISTATE cerberus1398AC = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &c
void cerberusBiteSeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) {
Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax");
return;
@ -82,8 +82,8 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
int z = height; // ???
TARGETTRACK tt1 = { 0x10000, 0x10000, 0x100, 0x55, 0x1aaaaa };
Aim aim;
aim.dx = bcos(actor->spr.__int_angle);
aim.dy = bsin(actor->spr.__int_angle);
aim.dx = bcos(actor->int_ang());
aim.dy = bsin(actor->int_ang());
aim.dz = actor->dudeSlope;
int nClosest = 0x7fffffff;
BloodStatIterator it(kStatDude);
@ -119,7 +119,7 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
if (nDist2 < nClosest)
{
int nAngle = getangle(x2 - x, y2 - y);
int nDeltaAngle = ((nAngle - actor->spr.__int_angle + 1024) & 2047) - 1024;
int nDeltaAngle = ((nAngle - actor->int_ang() + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt1.at8)
{
int tz1 = actor2->int_pos().Z - actor->int_pos().Z;
@ -158,8 +158,8 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
TARGETTRACK tt1 = { 0x10000, 0x10000, 0x100, 0x55, 0x1aaaaa };
Aim aim;
int ax, ay, az;
aim.dx = ax = bcos(actor->spr.__int_angle);
aim.dy = ay = bsin(actor->spr.__int_angle);
aim.dx = ax = bcos(actor->int_ang());
aim.dy = ay = bsin(actor->int_ang());
aim.dz = actor->dudeSlope;
az = 0;
int nClosest = 0x7fffffff;
@ -196,7 +196,7 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
if (nDist2 < nClosest)
{
int nAngle = getangle(x2 - x, y2 - y);
int nDeltaAngle = ((nAngle - actor->spr.__int_angle + 1024) & 2047) - 1024;
int nDeltaAngle = ((nAngle - actor->int_ang() + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt1.at8)
{
DUDEINFO* pDudeInfo2 = getDudeInfo(actor2->spr.type);
@ -301,7 +301,7 @@ static void cerberusThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
{
switch (actor->spr.type) {
case kDudeCerberusTwoHead:

View file

@ -75,8 +75,8 @@ AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &culti
void TommySeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int dz = actor->dudeSlope;
dx += Random3((5 - gGameOptions.nDifficulty) * 1000);
dy += Random3((5 - gGameOptions.nDifficulty) * 1000);
@ -89,8 +89,8 @@ void TeslaSeqCallback(int, DBloodActor* actor)
{
if (Chance(gCultTeslaFireChance[gGameOptions.nDifficulty]))
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int dz = actor->dudeSlope;
dx += Random3((5 - gGameOptions.nDifficulty) * 1000);
dy += Random3((5 - gGameOptions.nDifficulty) * 1000);
@ -102,8 +102,8 @@ void TeslaSeqCallback(int, DBloodActor* actor)
void ShotSeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int dz = actor->dudeSlope;
dx += Random2((5 - gGameOptions.nDifficulty) * 1000 - 500);
dy += Random2((5 - gGameOptions.nDifficulty) * 1000 - 500);
@ -199,7 +199,7 @@ static void cultThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 5120 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 5120 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
{
switch (actor->xspr.medium)
{

View file

@ -84,8 +84,8 @@ void SlashFSeqCallback(int, DBloodActor* actor)
int height = (actor->spr.yrepeat * pDudeInfo->eyeHeight) << 2;
int height2 = (target->spr.yrepeat * pDudeInfoT->eyeHeight) << 2;
int dz = height - height2;
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
actFireVector(actor, 0, 0, dx, dy, dz, kVectorGargSlash);
int r1 = Random(50);
int r2 = Random(50);
@ -111,8 +111,8 @@ void BlastSSeqCallback(int, DBloodActor* actor)
int z = height;
TARGETTRACK tt = { 0x10000, 0x10000, 0x100, 0x55, 0x1aaaaa };
Aim aim;
aim.dx = bcos(actor->spr.__int_angle);
aim.dy = bsin(actor->spr.__int_angle);
aim.dx = bcos(actor->int_ang());
aim.dy = bsin(actor->int_ang());
aim.dz = actor->dudeSlope;
int nClosest = 0x7fffffff;
BloodStatIterator it(kStatDude);
@ -148,7 +148,7 @@ void BlastSSeqCallback(int, DBloodActor* actor)
if (nDist2 < nClosest)
{
int nAngle = getangle(x2 - x, y2 - y);
int nDeltaAngle = ((nAngle - actor->spr.__int_angle + 1024) & 2047) - 1024;
int nDeltaAngle = ((nAngle - actor->int_ang() + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt.at8)
{
int tz1 = actor2->int_pos().Z - actor->int_pos().Z;
@ -267,7 +267,7 @@ static void gargThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &gargoyleFSearch);
aiThinkTarget(actor);
}
@ -281,9 +281,9 @@ static void gargMoveDodgeUp(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -307,11 +307,11 @@ static void gargMoveDodgeDown(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (actor->xspr.dodgeDir == 0)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -525,19 +525,19 @@ static void gargMoveForward(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if ((unsigned int)Random(64) < 32 && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -559,11 +559,11 @@ static void gargMoveSlow(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -571,8 +571,8 @@ static void gargMoveSlow(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -600,11 +600,11 @@ static void gargMoveSwoop(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -612,8 +612,8 @@ static void gargMoveSwoop(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -640,11 +640,11 @@ static void gargMoveFly(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->spr.__int_angle = (actor->spr.__int_angle + 512) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -652,8 +652,8 @@ static void gargMoveFly(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -69,8 +69,8 @@ void ghostSlashSeqCallback(int, DBloodActor* actor)
int height = (actor->spr.yrepeat * pDudeInfo->eyeHeight) << 2;
int height2 = (target->spr.yrepeat * pDudeInfoT->eyeHeight) << 2;
int dz = height - height2;
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
sfxPlay3DSound(actor, 1406, 0, 0);
actFireVector(actor, 0, 0, dx, dy, dz, kVectorGhost);
int r1 = Random(50);
@ -97,8 +97,8 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
int z = height;
TARGETTRACK tt = { 0x10000, 0x10000, 0x100, 0x55, 0x1aaaaa };
Aim aim;
aim.dx = bcos(actor->spr.__int_angle);
aim.dy = bsin(actor->spr.__int_angle);
aim.dx = bcos(actor->int_ang());
aim.dy = bsin(actor->int_ang());
aim.dz = actor->dudeSlope;
int nClosest = 0x7fffffff;
BloodStatIterator it(kStatDude);
@ -134,7 +134,7 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
if (nDist2 < nClosest)
{
int nAngle = getangle(x2 - x, y2 - y);
int nDeltaAngle = ((nAngle - actor->spr.__int_angle + 1024) & 2047) - 1024;
int nDeltaAngle = ((nAngle - actor->int_ang() + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt.at8)
{
int tz1 = actor2->int_pos().Z - actor->int_pos().Z;
@ -246,7 +246,7 @@ static void ghostThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &ghostSearch);
aiThinkTarget(actor);
}
@ -260,9 +260,9 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -286,11 +286,11 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (actor->xspr.dodgeDir == 0)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int dx = actor->vel.X;
int dy = actor->vel.Y;
int t1 = DMulScale(dx, nCos, dy, nSin, 30);
@ -421,19 +421,19 @@ static void ghostMoveForward(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if ((unsigned int)Random(64) < 32 && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -455,11 +455,11 @@ static void ghostMoveSlow(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -467,8 +467,8 @@ static void ghostMoveSlow(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -493,11 +493,11 @@ static void ghostMoveSwoop(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -505,8 +505,8 @@ static void ghostMoveSwoop(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -530,11 +530,11 @@ static void ghostMoveFly(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
{
actor->spr.__int_angle = (actor->spr.__int_angle + 512) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -542,8 +542,8 @@ static void ghostMoveFly(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -61,8 +61,8 @@ void GillBiteSeqCallback(int, DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int dz = actor->int_pos().Z - target->int_pos().Z;
dx += Random3(2000);
dy += Random3(2000);
@ -90,7 +90,7 @@ static void gillThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
{
if (pXSector && pXSector->Underwater)
aiNewState(actor, &gillBeastSwimSearch);
@ -204,7 +204,7 @@ static void gillThinkSwimGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &gillBeastSwimSearch);
aiThinkTarget(actor);
}
@ -268,19 +268,19 @@ static void sub_6CB00(DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if (Random(64) < 32 && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -303,11 +303,11 @@ static void sub_6CD74(DBloodActor* actor)
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
if (abs(nAng) > 341)
{
actor->xspr.goalAng = (actor->spr.__int_angle + 512) & 2047;
actor->xspr.goalAng = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -316,8 +316,8 @@ static void sub_6CD74(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x600) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -338,11 +338,11 @@ static void sub_6D03C(DBloodActor* actor)
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
if (abs(nAng) > 341)
{
actor->spr.__int_angle = (actor->spr.__int_angle + 512) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 512) & 2047;
return;
}
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
@ -351,8 +351,8 @@ static void sub_6D03C(DBloodActor* actor)
int nDist = approxDist(dx, dy);
if (Chance(0x4000) && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);

View file

@ -71,7 +71,7 @@ static void handThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &handSearch);
aiThinkTarget(actor);
}

View file

@ -44,8 +44,8 @@ AISTATE houndBurn = { kAiStateChase, 7, nHoundBurnClient, 60, NULL, NULL, NULL,
void houndBiteSeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
if (!(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax)) {
Printf(PRINT_HIGH, "actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax");
return;
@ -86,7 +86,7 @@ static void houndThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &houndSearch);
aiThinkTarget(actor);
}

View file

@ -55,7 +55,7 @@ static void innocThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &innocentSearch);
aiThinkTarget(actor);
}

View file

@ -144,7 +144,7 @@ static void aiPodMove(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery) {
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery) {
switch (actor->spr.type) {
case kDudePodGreen:
case kDudePodFire:

View file

@ -43,8 +43,8 @@ AISTATE ratBite = { kAiStateChase, 6, nRatBiteClient, 120, NULL, NULL, NULL, &ra
void ratBiteSeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -67,7 +67,7 @@ static void ratThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &ratSearch);
aiThinkTarget(actor);
}

View file

@ -59,8 +59,8 @@ static void spidBlindEffect(DBloodActor* actor, int nBlind, int max)
void SpidBiteSeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
dx += Random2(2000);
dy += Random2(2000);
int dz = Random2(2000);
@ -107,8 +107,8 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
void SpidJumpSeqCallback(int, DBloodActor* actor)
{
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
dx += Random2(200);
dy += Random2(200);
int dz = Random2(200);
@ -144,11 +144,11 @@ void SpidBirthSeqCallback(int, DBloodActor* actor)
DBloodActor* spawned = nullptr;
if (target->IsPlayerActor() && pDudeExtraE->birthCounter < 10)
{
if (nDist < 0x1a00 && nDist > 0x1400 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 0x1a00 && nDist > 0x1400 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
spawned = actSpawnDude(actor, kDudeSpiderRed, actor->spr.clipdist, 0);
else if (nDist < 0x1400 && nDist > 0xc00 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
else if (nDist < 0x1400 && nDist > 0xc00 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->spr.clipdist, 0);
else if (nDist < 0xc00 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
else if (nDist < 0xc00 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
spawned = actSpawnDude(actor, kDudeSpiderBrown, actor->spr.clipdist, 0);
if (spawned)
@ -176,7 +176,7 @@ static void spidThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &spidSearch);
aiThinkTarget(actor);
}

View file

@ -66,8 +66,8 @@ void sub_71BD4(int, DBloodActor* actor)
int z = height;
TARGETTRACK tt = { 0x10000, 0x10000, 0x100, 0x55, 0x100000 };
Aim aim;
aim.dx = bcos(actor->spr.__int_angle);
aim.dy = bsin(actor->spr.__int_angle);
aim.dx = bcos(actor->int_ang());
aim.dy = bsin(actor->int_ang());
aim.dz = actor->dudeSlope;
int nClosest = 0x7fffffff;
BloodStatIterator it(kStatDude);
@ -103,7 +103,7 @@ void sub_71BD4(int, DBloodActor* actor)
if (nDist2 < nClosest)
{
int nAngle = getangle(x2 - x, y2 - y);
int nDeltaAngle = ((nAngle - actor->spr.__int_angle + 1024) & 2047) - 1024;
int nDeltaAngle = ((nAngle - actor->int_ang() + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt.at8)
{
int tz1 = actor2->int_pos().Z - actor->int_pos().Z;
@ -130,8 +130,8 @@ void sub_720AC(int, DBloodActor* actor)
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
int height = actor->spr.yrepeat * pDudeInfo->eyeHeight;
int ax, ay, az;
ax = bcos(actor->spr.__int_angle);
ay = bsin(actor->spr.__int_angle);
ax = bcos(actor->int_ang());
ay = bsin(actor->int_ang());
int x = actor->int_pos().X;
int y = actor->int_pos().Y;
int z = height;
@ -175,7 +175,7 @@ void sub_720AC(int, DBloodActor* actor)
if (nDist2 < nClosest)
{
int nAngle = getangle(x2 - x, y2 - y);
int nDeltaAngle = ((nAngle - actor->spr.__int_angle + 1024) & 2047) - 1024;
int nDeltaAngle = ((nAngle - actor->int_ang() + 1024) & 2047) - 1024;
if (abs(nDeltaAngle) <= tt.at8)
{
int tz1 = actor2->int_pos().Z - actor->int_pos().Z;
@ -268,7 +268,7 @@ static void sub_72850(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &tchernobogSearch);
aiThinkTarget(actor);
}

View file

@ -198,8 +198,8 @@ void punchCallback(int, DBloodActor* actor)
if (target->IsDudeActor())
nZOffset2 = getDudeInfo(target->spr.type)->eyeHeight * target->spr.yrepeat << 2;
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int dz = nZOffset1 - nZOffset2;
if (!playGenDudeSound(actor, kGenDudeSndAttackMelee))
@ -229,7 +229,7 @@ void genDudeAttack1(int, DBloodActor* actor)
if (pExtra->weaponType == kGenDudeWeaponHitscan)
{
dx = bcos(actor->spr.__int_angle); dy = bsin(actor->spr.__int_angle); dz = actor->dudeSlope;
dx = bcos(actor->int_ang()); dy = bsin(actor->int_ang()); dz = actor->dudeSlope;
// dispersal modifiers here in case if non-melee enemy
if (!dudeIsMelee(actor))
{
@ -266,7 +266,7 @@ void genDudeAttack1(int, DBloodActor* actor)
}
else if (pExtra->weaponType == kGenDudeWeaponMissile)
{
dx = bcos(actor->spr.__int_angle); dy = bsin(actor->spr.__int_angle); dz = actor->dudeSlope;
dx = bcos(actor->int_ang()); dy = bsin(actor->int_ang()); dz = actor->dudeSlope;
// dispersal modifiers here
dx += Random3(dispersion); dy += Random3(dispersion); dz += Random3(dispersion >> 1);
@ -426,7 +426,7 @@ static void unicultThinkGoto(DBloodActor* actor)
aiChooseDirection(actor, nAngle);
// if reached target, change to search mode
if (approxDist(dx, dy) < 5120 && abs(actor->spr.__int_angle - nAngle) < getDudeInfo(actor->spr.type)->periphery)
if (approxDist(dx, dy) < 5120 && abs(actor->int_ang() - nAngle) < getDudeInfo(actor->spr.type)->periphery)
{
if (spriteIsUnderwater(actor, false)) aiGenDudeNewState(actor, &genDudeSearchW);
else aiGenDudeNewState(actor, &genDudeSearchL);
@ -1116,19 +1116,19 @@ void aiGenDudeMoveForward(DBloodActor* actor)
{
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
int nAccel = pDudeInfo->frontSpeed << 2;
if (abs(nAng) > 341)
return;
if (actor->GetTarget() == nullptr)
actor->spr.__int_angle = (actor->spr.__int_angle + 256) & 2047;
actor->spr.__int_angle = (actor->int_ang() + 256) & 2047;
int dx = actor->xspr.TargetPos.X - actor->int_pos().X;
int dy = actor->xspr.TargetPos.Y - actor->int_pos().Y;
int nDist = approxDist(dx, dy);
if ((unsigned int)Random(64) < 32 && nDist <= 0x400)
return;
int nCos = Cos(actor->spr.__int_angle);
int nSin = Sin(actor->spr.__int_angle);
int nCos = Cos(actor->int_ang());
int nSin = Sin(actor->int_ang());
int vx = actor->vel.X;
int vy = actor->vel.Y;
int t1 = DMulScale(vx, nCos, vy, nSin, 30);
@ -1143,14 +1143,14 @@ void aiGenDudeMoveForward(DBloodActor* actor)
else
{
int dang = ((kAng180 + actor->xspr.goalAng - actor->spr.__int_angle) & 2047) - kAng180;
actor->spr.__int_angle = ((actor->spr.__int_angle + ClipRange(dang, -maxTurn, maxTurn)) & 2047);
actor->spr.__int_angle = ((actor->int_ang() + ClipRange(dang, -maxTurn, maxTurn)) & 2047);
// don't move forward if trying to turn around
if (abs(dang) > kAng60)
return;
int sin = Sin(actor->spr.__int_angle);
int cos = Cos(actor->spr.__int_angle);
int sin = Sin(actor->int_ang());
int cos = Cos(actor->int_ang());
int frontSpeed = actor->genDudeExtra.moveSpeed;
actor->vel.X += MulScale(cos, frontSpeed, 30);
@ -1178,27 +1178,27 @@ void aiGenDudeChooseDirection(DBloodActor* actor, int a3, int xvel, int yvel)
int t1 = DMulScale(xvel, Cos(actor->spr.__int_angle), yvel, Sin(actor->spr.__int_angle), 30);
int vsi = ((t1 * 15) >> 12) / 2; int v8 = (vc >= 0) ? 341 : -341;
if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + vc, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + vc;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + vc / 2, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle - vc / 2, vsi))
actor->xspr.goalAng = actor->spr.__int_angle - vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + v8, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + v8;
if (CanMove(actor, actor->GetTarget(), actor->int_ang() + vc, vsi))
actor->xspr.goalAng = actor->int_ang() + vc;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() + vc / 2, vsi))
actor->xspr.goalAng = actor->int_ang() + vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - vc / 2, vsi))
actor->xspr.goalAng = actor->int_ang() - vc / 2;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() + v8, vsi))
actor->xspr.goalAng = actor->int_ang() + v8;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle, vsi))
actor->xspr.goalAng = actor->spr.__int_angle;
else if (CanMove(actor, actor->GetTarget(), actor->spr.__int_angle - v8, vsi))
actor->xspr.goalAng = actor->spr.__int_angle - v8;
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
actor->xspr.goalAng = actor->int_ang() - v8;
else
actor->xspr.goalAng = actor->spr.__int_angle + 341;
actor->xspr.goalAng = actor->int_ang() + 341;
actor->xspr.dodgeDir = (Chance(0x8000)) ? 1 : -1;
if (!CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + actor->xspr.dodgeDir * 512, 512))
if (!CanMove(actor, actor->GetTarget(), actor->int_ang() + actor->xspr.dodgeDir * 512, 512))
{
actor->xspr.dodgeDir = -actor->xspr.dodgeDir;
if (!CanMove(actor, actor->GetTarget(), actor->spr.__int_angle + actor->xspr.dodgeDir * 512, 512))
if (!CanMove(actor, actor->GetTarget(), actor->int_ang() + actor->xspr.dodgeDir * 512, 512))
actor->xspr.dodgeDir = 0;
}
}
@ -1404,7 +1404,7 @@ void removeLeech(DBloodActor* actLeech, bool delSprite)
{
if (actLeech != nullptr)
{
auto effectactor = gFX.fxSpawnActor((FX_ID)52, actLeech->sector(), actLeech->int_pos().X, actLeech->int_pos().Y, actLeech->int_pos().Z, actLeech->spr.__int_angle);
auto effectactor = gFX.fxSpawnActor((FX_ID)52, actLeech->sector(), actLeech->int_pos().X, actLeech->int_pos().Y, actLeech->int_pos().Z, actLeech->int_ang());
if (effectactor != nullptr)
{
effectactor->spr.cstat = CSTAT_SPRITE_ALIGNMENT_FACING;
@ -1802,8 +1802,8 @@ void dudeLeechOperate(DBloodActor* actor, const EVENT& event)
y += (actTarget->vel.Y * t) >> 12;
int angBak = actor->spr.__int_angle;
actor->spr.__int_angle = getangle(x - actor->int_pos().X, y - actor->int_pos().Y);
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int tz = actTarget->int_pos().Z - (actTarget->spr.yrepeat * pDudeInfo->aimHeight) * 4;
int dz = DivScale(tz - top - 256, nDist, 10);
int nMissileType = kMissileLifeLeechAltNormal + (actor->xspr.data3 ? 1 : 0);

View file

@ -96,7 +96,7 @@ static void zombaThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 921 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 921 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &zombieASearch);
aiThinkTarget(actor);
}

View file

@ -95,7 +95,7 @@ static void zombfThinkGoto(DBloodActor* actor)
int nAngle = getangle(dx, dy);
int nDist = approxDist(dx, dy);
aiChooseDirection(actor, nAngle);
if (nDist < 512 && abs(actor->spr.__int_angle - nAngle) < pDudeInfo->periphery)
if (nDist < 512 && abs(actor->int_ang() - nAngle) < pDudeInfo->periphery)
aiNewState(actor, &zombieFSearch);
aiThinkTarget(actor);
}

View file

@ -507,7 +507,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
auto& nVoxel = voxelIndex[nTile];
if (cl_showweapon == 2 && r_voxels && nVoxel != -1)
{
pNSprite->__int_angle = (gView->actor->spr.__int_angle + 512) & 2047; // always face viewer
pNSprite->__int_angle = (gView->actor->int_ang() + 512) & 2047; // always face viewer
pNSprite->cstat |= CSTAT_SPRITE_ALIGNMENT_SLAB;
pNSprite->cstat &= ~CSTAT_SPRITE_YFLIP;
pNSprite->picnum = nVoxel;
@ -517,7 +517,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
pNSprite->add_int_y(MulScale(128, Sin(gView->actor->spr.__int_angle), 30));
}
if ((pPlayer->curWeapon == kWeapLifeLeech) || (pPlayer->curWeapon == kWeapVoodooDoll)) // make lifeleech/voodoo doll always face viewer like sprite
pNSprite->__int_angle = (pNSprite->__int_angle + 512) & 2047; // offset angle 90 degrees
pNSprite->__int_angle = (pNSprite->int_ang() + 512) & 2047; // offset angle 90 degrees
}
break;
}
@ -610,7 +610,7 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
}
int dX = cX - pTSprite->int_pos().X;
int dY = cY - pTSprite->int_pos().Y;
RotateVector(&dX, &dY, 128 - pTSprite->__int_angle);
RotateVector(&dX, &dY, 128 - pTSprite->int_ang());
nAnim = GetOctant(dX, dY);
if (nAnim <= 4)
{
@ -632,7 +632,7 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
}
int dX = cX - pTSprite->int_pos().X;
int dY = cY - pTSprite->int_pos().Y;
RotateVector(&dX, &dY, 128 - pTSprite->__int_angle);
RotateVector(&dX, &dY, 128 - pTSprite->int_ang());
nAnim = GetOctant(dX, dY);
break;
}
@ -979,7 +979,7 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
{
int dX = cX - pTSprite->int_pos().X;
int dY = cY - pTSprite->int_pos().Y;
RotateVector(&dX, &dY, 128 - pTSprite->__int_angle);
RotateVector(&dX, &dY, 128 - pTSprite->int_ang());
nAnim = GetOctant(dX, dY);
if (nAnim <= 4)
{
@ -996,7 +996,7 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
{
int dX = cX - pTSprite->int_pos().X;
int dY = cY - pTSprite->int_pos().Y;
RotateVector(&dX, &dY, 128 - pTSprite->__int_angle);
RotateVector(&dX, &dY, 128 - pTSprite->int_ang());
nAnim = GetOctant(dX, dY);
break;
}

View file

@ -237,8 +237,8 @@ void fxDynPuff(DBloodActor* actor, sectortype*) // 8
if (actor->vel.Z)
{
int nDist = (actor->spr.xrepeat * (tileWidth(actor->spr.picnum) / 2)) >> 2;
int x = actor->int_pos().X + MulScale(nDist, Cos(actor->spr.__int_angle - 512), 30);
int y = actor->int_pos().Y + MulScale(nDist, Sin(actor->spr.__int_angle - 512), 30);
int x = actor->int_pos().X + MulScale(nDist, Cos(actor->int_ang() - 512), 30);
int y = actor->int_pos().Y + MulScale(nDist, Sin(actor->int_ang() - 512), 30);
int z = actor->int_pos().Z;
auto pFX = gFX.fxSpawnActor(FX_7, actor->sector(), x, y, z, 0);
if (pFX)

View file

@ -324,15 +324,15 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
{
int x = actor->int_pos().X + MulScale(actor->spr.clipdist - 4, Cos(actor->spr.__int_angle), 28);
int y = actor->int_pos().Y + MulScale(actor->spr.clipdist - 4, Sin(actor->spr.__int_angle), 28);
x += MulScale(a3, Cos(actor->spr.__int_angle + 512), 30);
y += MulScale(a3, Sin(actor->spr.__int_angle + 512), 30);
x += MulScale(a3, Cos(actor->int_ang() + 512), 30);
y += MulScale(a3, Sin(actor->int_ang() + 512), 30);
auto pBrass = gFX.fxSpawnActor((FX_ID)(FX_37 + Random(3)), actor->sector(), x, y, z, 0);
if (pBrass)
{
if (!VanillaMode())
pBrass->spr.__int_angle = Random(2047);
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
int nAngle = actor->spr.__int_angle + Random2(56) + 512;
int nAngle = actor->int_ang() + Random2(56) + 512;
pBrass->vel.X = MulScale(nDist, Cos(nAngle), 30);
pBrass->vel.Y = MulScale(nDist, Sin(nAngle), 30);
pBrass->vel.Z = actor->vel.Z - (0x20000 + (Random2(40) << 18) / 120);
@ -349,15 +349,15 @@ void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4)
{
int x = actor->int_pos().X + MulScale(actor->spr.clipdist - 4, Cos(actor->spr.__int_angle), 28);
int y = actor->int_pos().Y + MulScale(actor->spr.clipdist - 4, Sin(actor->spr.__int_angle), 28);
x += MulScale(a3, Cos(actor->spr.__int_angle + 512), 30);
y += MulScale(a3, Sin(actor->spr.__int_angle + 512), 30);
x += MulScale(a3, Cos(actor->int_ang() + 512), 30);
y += MulScale(a3, Sin(actor->int_ang() + 512), 30);
auto pShell = gFX.fxSpawnActor((FX_ID)(FX_40 + Random(3)), actor->sector(), x, y, z, 0);
if (pShell)
{
if (!VanillaMode())
pShell->spr.__int_angle = Random(2047);
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
int nAngle = actor->spr.__int_angle + Random2(56) + 512;
int nAngle = actor->int_ang() + Random2(56) + 512;
pShell->vel.X = MulScale(nDist, Cos(nAngle), 30);
pShell->vel.Y = MulScale(nDist, Sin(nAngle), 30);
pShell->vel.Z = actor->vel.Z - (0x20000 + (Random2(20) << 18) / 120);

View file

@ -435,8 +435,8 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
int nNum = 256;
gHitInfo.clearObj();
int x1 = actor->int_pos().X + MulScale(nOffset, Cos(actor->spr.__int_angle + 512), 30);
int y1 = actor->int_pos().Y + MulScale(nOffset, Sin(actor->spr.__int_angle + 512), 30);
int x1 = actor->int_pos().X + MulScale(nOffset, Cos(actor->int_ang() + 512), 30);
int y1 = actor->int_pos().Y + MulScale(nOffset, Sin(actor->int_ang() + 512), 30);
int z1 = actor->int_pos().Z + nZOffset;
auto bakCstat = actor->spr.cstat;
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;

View file

@ -1364,7 +1364,7 @@ void nnExtProcessSuperSprites()
if (debrisactor->vel.Z > 0x100) debrisBubble(debrisactor);
if (ang == debrisactor->xspr.goalAng)
{
debrisactor->xspr.goalAng = (debrisactor->spr.__int_angle + Random3(kAng60)) & 2047;
debrisactor->xspr.goalAng = (debrisactor->int_ang() + Random3(kAng60)) & 2047;
debrisBubble(debrisactor);
}
}
@ -2791,7 +2791,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
// set random goal ang for swimming so they start turning
if ((flags & kPhysDebrisSwim) && !targetactor->vel.X && !targetactor->vel.Y && !targetactor->vel.Z)
targetactor->xspr.goalAng = (targetactor->spr.__int_angle + Random3(kAng45)) & 2047;
targetactor->xspr.goalAng = (targetactor->int_ang() + Random3(kAng45)) & 2047;
if (targetactor->xspr.physAttr & kPhysDebrisVector)
targetactor->spr.cstat |= CSTAT_SPRITE_BLOCK_HITSCAN;
@ -3299,7 +3299,7 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
if (sourceactor->xspr.data3 & kModernTypeFlag2)
{
int vAng = getVelocityAngle(actor);
RotatePoint(&actor->vel.X, &actor->vel.Y, (sourceactor->spr.__int_angle - vAng) & 2047, actor->int_pos().X, actor->int_pos().Y);
RotatePoint(&actor->vel.X, &actor->vel.Y, (sourceactor->spr.int_ang() - vAng) & 2047, actor->int_pos().X, actor->int_pos().Y);
}
if (sourceactor->xspr.data3 & kModernTypeFlag4)
@ -3307,7 +3307,7 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
}
if (sourceactor->xspr.data2 == 1)
changeSpriteAngle(actor, sourceactor->spr.__int_angle);
changeSpriteAngle(actor, sourceactor->int_ang());
viewBackupSpriteLoc(actor);
@ -6537,8 +6537,8 @@ void useUniMissileGen(DBloodActor* sourceactor, DBloodActor* actor)
}
else
{
dx = bcos(actor->spr.__int_angle);
dy = bsin(actor->spr.__int_angle);
dx = bcos(actor->int_ang());
dy = bsin(actor->int_ang());
dz = sourceactor->xspr.data3 << 6; // add slope controlling
if (dz > 0x10000) dz = 0x10000;
else if (dz < -0x10000) dz = -0x10000;
@ -7750,27 +7750,27 @@ void nnExtAiSetDirection(DBloodActor* actor, int a3)
if (vc < 0)
v8 = -341;
if (nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle + vc, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + vc;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle + vc / 2, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + vc / 2;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle - vc / 2, vsi))
actor->xspr.goalAng = actor->spr.__int_angle - vc / 2;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle + v8, vsi))
actor->xspr.goalAng = actor->spr.__int_angle + v8;
if (nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() + vc, vsi))
actor->xspr.goalAng = actor->int_ang() + vc;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() + vc / 2, vsi))
actor->xspr.goalAng = actor->int_ang() + vc / 2;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() - vc / 2, vsi))
actor->xspr.goalAng = actor->int_ang() - vc / 2;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() + v8, vsi))
actor->xspr.goalAng = actor->int_ang() + v8;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle, vsi))
actor->xspr.goalAng = actor->spr.__int_angle;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle - v8, vsi))
actor->xspr.goalAng = actor->spr.__int_angle - v8;
else if (nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
actor->xspr.goalAng = actor->int_ang() - v8;
else
actor->xspr.goalAng = actor->spr.__int_angle + 341;
actor->xspr.goalAng = actor->int_ang() + 341;
if (actor->xspr.dodgeDir)
{
if (!nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle + actor->xspr.dodgeDir * 512, 512))
if (!nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() + actor->xspr.dodgeDir * 512, 512))
{
actor->xspr.dodgeDir = -actor->xspr.dodgeDir;
if (!nnExtCanMove(actor, actor->GetTarget(), actor->spr.__int_angle + actor->xspr.dodgeDir * 512, 512))
if (!nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() + actor->xspr.dodgeDir * 512, 512))
actor->xspr.dodgeDir = 0;
}
}
@ -8144,7 +8144,7 @@ void aiPatrolRandGoalAng(DBloodActor* actor)
if (Chance(0x8000))
goal = -goal;
actor->xspr.goalAng = (actor->spr.__int_angle + goal) & 2047;
actor->xspr.goalAng = (actor->int_ang() + goal) & 2047;
}
//---------------------------------------------------------------------------
@ -8157,7 +8157,7 @@ void aiPatrolTurn(DBloodActor* actor)
{
int nTurnRange = (getDudeInfo(actor->spr.type)->angSpeed << 1) >> 4;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
}
@ -8205,7 +8205,7 @@ void aiPatrolMove(DBloodActor* actor)
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
actor->spr.__int_angle = (actor->spr.__int_angle + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
if (abs(nAng) > goalAng || ((targetactor->xspr.waitTime > 0 || targetactor->xspr.data1 == targetactor->xspr.data2) && aiPatrolMarkerReached(actor)))
{
@ -8917,7 +8917,7 @@ void aiPatrolThink(DBloodActor* actor)
// take marker's angle
if (!(markeractor->spr.flags & kModernTypeFlag4))
{
actor->xspr.goalAng = ((!(markeractor->spr.flags & kModernTypeFlag8) && actor->xspr.unused2) ? markeractor->spr.__int_angle + kAng180 : markeractor->spr.__int_angle) & 2047;
actor->xspr.goalAng = ((!(markeractor->spr.flags & kModernTypeFlag8) && actor->xspr.unused2) ? markeractor->int_ang() + kAng180 : markeractor->spr.__int_angle) & 2047;
if ((int)actor->spr.__int_angle != (int)actor->xspr.goalAng) // let the enemy play move animation while turning
return;
}
@ -9235,7 +9235,7 @@ void callbackUniMissileBurst(DBloodActor* actor, sectortype*) // 22
burstactor->spr.flags = actor->spr.flags;
burstactor->spr.xrepeat = actor->spr.xrepeat / 2;
burstactor->spr.yrepeat = actor->spr.yrepeat / 2;
burstactor->spr.__int_angle = ((actor->spr.__int_angle + missileInfo[actor->spr.type - kMissileBase].angleOfs) & 2047);
burstactor->spr.__int_angle = ((actor->int_ang() + missileInfo[actor->spr.type - kMissileBase].angleOfs) & 2047);
burstactor->SetOwner(actor);
actBuildMissile(burstactor, actor);

View file

@ -810,7 +810,7 @@ void playerStart(int nPlayer, int bNewLevel)
actor->add_int_z(-(bottom - actor->int_pos().Z));
actor->spr.pal = 11 + (pPlayer->teamId & 3);
actor->spr.__int_angle = pStartZone->ang;
pPlayer->angle.ang = buildang(actor->spr.__int_angle);
pPlayer->angle.ang = buildang(actor->int_ang());
actor->spr.type = kDudePlayer1 + nPlayer;
actor->spr.clipdist = pDudeInfo->clipdist;
actor->spr.flags = 15;
@ -1421,8 +1421,8 @@ int ActionScan(PLAYER* pPlayer, HitInfo* out)
{
auto plActor = pPlayer->actor;
*out = {};
int x = bcos(plActor->spr.__int_angle);
int y = bsin(plActor->spr.__int_angle);
int x = bcos(plActor->int_ang());
int y = bsin(plActor->int_ang());
int z = pPlayer->slope;
int hit = HitScan(pPlayer->actor, pPlayer->zView, x, y, z, 0x10000040, 128);
int hitDist = approxDist(plActor->int_pos().X - gHitInfo.hitpos.X, plActor->int_pos().Y - gHitInfo.hitpos.Y) >> 4;
@ -1593,8 +1593,8 @@ void ProcessInput(PLAYER* pPlayer)
}
if (pPlayer->posture == 1)
{
int x = Cos(actor->spr.__int_angle);
int y = Sin(actor->spr.__int_angle);
int x = Cos(actor->int_ang());
int y = Sin(actor->int_ang());
if (pInput->fvel)
{
int forward = pInput->fvel;
@ -1618,8 +1618,8 @@ void ProcessInput(PLAYER* pPlayer)
int speed = 0x10000;
if (actor->xspr.height > 0)
speed -= DivScale(actor->xspr.height, 256, 16);
int x = Cos(actor->spr.__int_angle);
int y = Sin(actor->spr.__int_angle);
int x = Cos(actor->int_ang());
int y = Sin(actor->int_ang());
if (pInput->fvel)
{
int forward = pInput->fvel;
@ -1763,9 +1763,9 @@ void ProcessInput(PLAYER* pPlayer)
auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->spr.clipdist << 1, 0);
if (spawned)
{
spawned->spr.__int_angle = (pPlayer->actor->spr.__int_angle + 1024) & 2047;
int x = bcos(pPlayer->actor->spr.__int_angle);
int y = bsin(pPlayer->actor->spr.__int_angle);
spawned->spr.__int_angle = (pPlayer->actor->int_ang() + 1024) & 2047;
int x = bcos(pPlayer->actor->int_ang());
int y = bsin(pPlayer->actor->int_ang());
spawned->vel.X = pPlayer->actor->vel.X + MulScale(0x155555, x, 14);
spawned->vel.Y = pPlayer->actor->vel.Y + MulScale(0x155555, y, 14);
spawned->vel.Z = pPlayer->actor->vel.Z;

View file

@ -278,8 +278,8 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
y += (target->vel.Y * t) >> 12;
int angBak = actor->spr.__int_angle;
actor->spr.__int_angle = getangle(x - actor->int_pos().X, y - actor->int_pos().Y);
int dx = bcos(actor->spr.__int_angle);
int dy = bsin(actor->spr.__int_angle);
int dx = bcos(actor->int_ang());
int dy = bsin(actor->int_ang());
int tz = target->int_pos().Z - (target->spr.yrepeat * pDudeInfo->aimHeight) * 4;
int dz = DivScale(tz - top - 256, nDist, 10);
int nMissileType = kMissileLifeLeechAltNormal + (actor->xspr.data3 ? 1 : 0);
@ -936,7 +936,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
if (ang)
RotatePoint(&x, &y, ang, a4, a5);
viewBackupSpriteLoc(actor);
actor->spr.__int_angle = (actor->spr.__int_angle + v14) & 2047;
actor->spr.__int_angle = (actor->int_ang() + v14) & 2047;
actor->set_int_xy(x + vc - a4, y + v8 - a5);
}
else if (actor->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
@ -944,7 +944,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
if (ang)
RotatePoint((int*)&x, (int*)&y, -ang, a4, sprDy);
viewBackupSpriteLoc(actor);
actor->spr.__int_angle = (actor->spr.__int_angle - v14) & 2047;
actor->spr.__int_angle = (actor->int_ang() - v14) & 2047;
actor->set_int_xy(x - vc + a4, y - v8 + a5);
}
else if (pXSector->Drag)
@ -961,7 +961,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
RotatePoint(&pos.X, &pos.Y, v14, v20, v24);
actor->set_int_pos(pos);
}
actor->spr.__int_angle = (actor->spr.__int_angle + v14) & 2047;
actor->spr.__int_angle = (actor->int_ang() + v14) & 2047;
actor->add_int_pos({ v28, v2c, 0 });
}
}
@ -988,7 +988,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
if (ang)
RotatePoint(&x, &y, ang, a4, a5);
viewBackupSpriteLoc(ac);
ac->spr.__int_angle = (ac->spr.__int_angle + v14) & 2047;
ac->spr.__int_angle = (ac->int_ang() + v14) & 2047;
ac->set_int_xy(x + vc - a4, y + v8 - a5);
}
else if (ac->spr.cstat & CSTAT_SPRITE_MOVE_REVERSE)
@ -996,7 +996,7 @@ void TranslateSector(sectortype* pSector, int a2, int a3, int a4, int a5, int a6
if (ang)
RotatePoint(&x, &y, -ang, a4, sprDy);
viewBackupSpriteLoc(ac);
ac->spr.__int_angle = (ac->spr.__int_angle - v14) & 2047;
ac->spr.__int_angle = (ac->int_ang() - v14) & 2047;
ac->set_int_xy(x + vc - a4, y + v8 - a5);
}
}

View file

@ -427,8 +427,8 @@ void UpdateAimVector(PLAYER* pPlayer)
int y = plActor->int_pos().Y;
int z = pPlayer->zWeapon;
Aim aim;
aim.dx = bcos(plActor->spr.__int_angle);
aim.dy = bsin(plActor->spr.__int_angle);
aim.dx = bcos(plActor->int_ang());
aim.dy = bsin(plActor->int_ang());
aim.dz = pPlayer->slope;
WEAPONTRACK* pWeaponTrack = &gWeaponTrack[pPlayer->curWeapon];
DBloodActor* targetactor = nullptr;
@ -470,7 +470,7 @@ void UpdateAimVector(PLAYER* pPlayer)
if (lz - zRange > bottom || lz + zRange < top)
continue;
int angle = getangle(x2 - x, y2 - y);
if (abs(((angle - plActor->spr.__int_angle + 1024) & 2047) - 1024) > pWeaponTrack->angleRange)
if (abs(((angle - plActor->int_ang() + 1024) & 2047) - 1024) > pWeaponTrack->angleRange)
continue;
if (pPlayer->aimTargetsCount < 16 && cansee(x, y, z, plActor->sector(), x2, y2, z2, actor->sector()))
pPlayer->aimTargets[pPlayer->aimTargetsCount++] = actor;
@ -520,7 +520,7 @@ void UpdateAimVector(PLAYER* pPlayer)
if (lz - zRange > bottom || lz + zRange < top)
continue;
int angle = getangle(dx, dy);
if (abs(((angle - plActor->spr.__int_angle + 1024) & 2047) - 1024) > pWeaponTrack->thingAngle)
if (abs(((angle - plActor->int_ang() + 1024) & 2047) - 1024) > pWeaponTrack->thingAngle)
continue;
if (pPlayer->aimTargetsCount < 16 && cansee(x, y, z, plActor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector()))
pPlayer->aimTargets[pPlayer->aimTargetsCount++] = actor;
@ -544,13 +544,13 @@ void UpdateAimVector(PLAYER* pPlayer)
}
Aim aim2;
aim2 = aim;
RotateVector((int*)&aim2.dx, (int*)&aim2.dy, -plActor->spr.__int_angle);
RotateVector((int*)&aim2.dx, (int*)&aim2.dy, -plActor->int_ang());
aim2.dz -= pPlayer->slope;
pPlayer->relAim.dx = interpolatedvalue(pPlayer->relAim.dx, aim2.dx, pWeaponTrack->aimSpeedHorz);
pPlayer->relAim.dy = interpolatedvalue(pPlayer->relAim.dy, aim2.dy, pWeaponTrack->aimSpeedHorz);
pPlayer->relAim.dz = interpolatedvalue(pPlayer->relAim.dz, aim2.dz, pWeaponTrack->aimSpeedVert);
pPlayer->aim = pPlayer->relAim;
RotateVector((int*)&pPlayer->aim.dx, (int*)&pPlayer->aim.dy, plActor->spr.__int_angle);
RotateVector((int*)&pPlayer->aim.dx, (int*)&pPlayer->aim.dy, plActor->int_ang());
pPlayer->aim.dz += pPlayer->slope;
pPlayer->aimTarget = targetactor;
}

View file

@ -704,7 +704,7 @@ void movecrane(DDukeActor *actor, int crane)
actor->SetActiveCrane(true);
ps[p].on_crane = actor;
S_PlayActorSound(isRR() ? 390 : DUKE_GRUNT, ps[p].GetActor());
ps[p].angle.settarget(buildang(actor->spr.__int_angle + 1024));
ps[p].angle.settarget(buildang(actor->int_ang() + 1024));
}
else
{
@ -1975,8 +1975,8 @@ void camera(DDukeActor *actor)
if (setupflag != 1)
{
increment = 8;
minimum = actor->spr.__int_angle - actor->spr.hitag - increment;
maximum = actor->spr.__int_angle + actor->spr.hitag - increment;
minimum = actor->int_ang() - actor->spr.hitag - increment;
maximum = actor->int_ang() + actor->spr.hitag - increment;
setupflag = 1;
}
@ -1986,11 +1986,11 @@ void camera(DDukeActor *actor)
increment = -increment;
actor->spr.__int_angle += increment;
}
else if (actor->spr.__int_angle + increment < minimum)
else if (actor->int_ang() + increment < minimum)
{
actor->spr.__int_angle = minimum;
}
else if (actor->spr.__int_angle + increment > maximum)
else if (actor->int_ang() + increment > maximum)
{
actor->spr.__int_angle = maximum;
}
@ -4906,8 +4906,8 @@ int dodge(DDukeActor* actor)
bx = ac->int_pos().X - mx;
by = ac->int_pos().Y - my;
bxvect = bcos(ac->spr.__int_angle);
byvect = bsin(ac->spr.__int_angle);
bxvect = bcos(ac->int_ang());
byvect = bsin(ac->int_ang());
if (bcos(actor->spr.__int_angle) * bx + bsin(actor->spr.__int_angle) * by >= 0)
if (bxvect * bx + byvect * by < 0)
@ -4939,9 +4939,9 @@ int furthestangle(DDukeActor *actor, int angs)
angincs = 2048 / angs;
if (!actor->isPlayer())
if ((actor->temp_data[0] & 63) > 2) return(actor->spr.__int_angle + 1024);
if ((actor->temp_data[0] & 63) > 2) return(actor->int_ang() + 1024);
for (j = actor->spr.__int_angle; j < (2048 + actor->spr.__int_angle); j += angincs)
for (j = actor->spr.__int_angle; j < (2048 + actor->int_ang()); j += angincs)
{
hitscan({ actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (8 << 8) }, actor->sector(), { bcos(j), bsin(j), 0 }, hit, CLIPMASK1);
@ -4974,7 +4974,7 @@ int furthestcanseepoint(DDukeActor *actor, DDukeActor* tosee, int* dax, int* day
angincs = 2048 / 2;
else angincs = 2048 / (1 + (krand() & 1));
for (j = tosee->spr.__int_angle; j < (2048 + tosee->spr.__int_angle); j += (angincs - (krand() & 511)))
for (j = tosee->spr.__int_angle; j < (2048 + tosee->int_ang()); j += (angincs - (krand() & 511)))
{
hitscan({ tosee->int_pos().X, tosee->int_pos().Y, tosee->int_pos().Z - (16 << 8) }, tosee->sector(), { bcos(j), bsin(j), 16384 - (krand() & 32767) }, hit, CLIPMASK1);

View file

@ -1797,7 +1797,7 @@ void movetransports_d(void)
ps[k].GetActor()->spr.extra = 0;
}
ps[p].angle.ang = buildang(Owner->spr.__int_angle);
ps[p].angle.ang = buildang(Owner->int_ang());
if (Owner->GetOwner() != Owner)
{

View file

@ -1097,7 +1097,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
j->spr.xrepeat = 8;
j->spr.yrepeat = 8;
j->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL;
j->spr.__int_angle = (j->spr.__int_angle + 512) & 2047;
j->spr.__int_angle = (j->int_ang() + 512) & 2047;
j->spr.clipdist = MulScale(proj->spr.xrepeat, tileWidth(proj->spr.picnum), 7);
}
}
@ -1447,7 +1447,7 @@ void movetransports_r(void)
ps[k].GetActor()->spr.extra = 0;
}
ps[p].angle.ang = buildang(Owner->spr.__int_angle);
ps[p].angle.ang = buildang(Owner->int_ang());
if (Owner->GetOwner() != Owner)
{
@ -2292,7 +2292,7 @@ void rr_specialstats()
{
if (act2->spr.picnum == RRTILE297)
{
ps[p].angle.ang = buildang(act2->spr.__int_angle);
ps[p].angle.ang = buildang(act2->int_ang());
ps[p].getposfromactor(act2, -36);
ps[p].backupxyz();
ps[p].setbobpos();

View file

@ -84,7 +84,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
}
k = (((t->__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((t->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -261,7 +261,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -280,8 +280,8 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
if (h->temp_data[0] < 4)
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
else k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
else k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
@ -372,7 +372,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
else
{
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -495,12 +495,12 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
else switch (l)
{
case 2:
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 8) & 1;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 1;
break;
case 3:
case 4:
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 7) & 7;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 7) & 7;
if (k > 3)
{
t->cstat |= CSTAT_SPRITE_XFLIP;
@ -511,7 +511,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case 5:
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - k) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -521,7 +521,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case 7:
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -530,7 +530,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
else t->cstat &= ~CSTAT_SPRITE_XFLIP;
break;
case 8:
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
t->cstat &= ~CSTAT_SPRITE_XFLIP;
break;
default:
@ -662,7 +662,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
else
{
k = (((t->__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((t->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -719,7 +719,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
}
k = (((t->__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((t->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;

View file

@ -62,7 +62,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case CHAIR3:
k = (((t->__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((t->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -255,7 +255,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
else if (OwnerAc->spr.picnum == MAMA)
{
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - k) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -273,7 +273,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case EMPTYBIKE:
if (!isRRRA()) goto default_case;
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -285,7 +285,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case EMPTYBOAT:
if (!isRRRA()) goto default_case;
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -296,7 +296,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case RPG:
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -308,7 +308,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case RPG2:
if (!isRRRA()) goto default_case;
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -322,8 +322,8 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
if (h->temp_data[0] < 4)
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
else k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
else k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
@ -416,7 +416,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
t->cstat &= ~CSTAT_SPRITE_XFLIP;
} else
{
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -479,7 +479,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
else if (ps[p].OnMotorcycle)
{
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - a) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -505,7 +505,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
else if (ps[p].OnBoat)
{
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - a) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -627,12 +627,12 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
else switch (l)
{
case 2:
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 8) & 1;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 1;
break;
case 3:
case 4:
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 7) & 7;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 7) & 7;
if (k > 3)
{
t->cstat |= CSTAT_SPRITE_XFLIP;
@ -643,7 +643,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case 5:
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - k) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -653,7 +653,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case 7:
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) / 170);
k = (((h->int_ang() + 3072 + 128 - k) & 2047) / 170);
if (k > 6)
{
k = 12 - k;
@ -662,7 +662,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
else t->cstat &= ~CSTAT_SPRITE_XFLIP;
break;
case 8:
k = (((h->spr.__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
t->cstat &= ~CSTAT_SPRITE_XFLIP;
break;
default:
@ -670,7 +670,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (bg && h->spr.statnum == 2 && h->spr.extra > 0)
{
k = getangle(h->int_pos().X - x, h->int_pos().Y - y);
k = (((h->spr.__int_angle + 3072 + 128 - k) & 2047) >> 8) & 7;
k = (((h->int_ang() + 3072 + 128 - k) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -892,7 +892,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
break;
case PLAYERONWATER:
k = (((t->__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((t->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;
@ -946,7 +946,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
case CAMERA1:
case RAT:
k = (((t->__int_angle + 3072 + 128 - a) & 2047) >> 8) & 7;
k = (((t->int_ang() + 3072 + 128 - a) & 2047) >> 8) & 7;
if (k > 4)
{
k = 8 - k;

View file

@ -1601,10 +1601,10 @@ int ParseState::parse(void)
switch (krand() & 1)
{
case 0:
g_ac->spr.__int_angle = (+512 + g_ac->spr.__int_angle + (krand() & 511)) & 2047;
g_ac->spr.__int_angle = (+512 + g_ac->int_ang() + (krand() & 511)) & 2047;
break;
case 1:
g_ac->spr.__int_angle = (-512 + g_ac->spr.__int_angle - (krand() & 511)) & 2047;
g_ac->spr.__int_angle = (-512 + g_ac->int_ang() - (krand() & 511)) & 2047;
break;
}
insptr++;

View file

@ -174,7 +174,7 @@ static void shootflamethrowerflame(DDukeActor* actor, int p, int sx, int sy, int
zvel = ((ps[j].player_int_opos().Z - sz) * vel) / l;
if (badguy(actor) && (actor->spr.hitag & face_player_smart) != 0)
sa = (short)(actor->spr.__int_angle + (krand() & 31) - 16);
sa = (short)(actor->int_ang() + (krand() & 31) - 16);
if (actor->sector()->lotag == 2 && (krand() % 5) == 0)
spawned = spawn(actor, WATERBUBBLE);
@ -658,7 +658,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
spawned->spr.cstat = CSTAT_SPRITE_YCENTER;
spawned->spr.clipdist = 4;
sa = actor->spr.__int_angle + 32 - (krand() & 63);
sa = actor->int_ang() + 32 - (krand() & 63);
zvel = oldzvel + 512 - (krand() & 1023);
scount--;
@ -724,7 +724,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i
zvel = ((ps[j].player_int_opos().Z - sz) * vel) / l;
if (badguy(actor) && (actor->spr.hitag & face_player_smart))
sa = actor->spr.__int_angle + (krand() & 31) - 16;
sa = actor->int_ang() + (krand() & 31) - 16;
}
if (p < 0) aimed = nullptr;

View file

@ -489,8 +489,8 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
sz -= (4 << 7);
if (actor->spr.picnum == 4649)
{
sx += bcos(actor->spr.__int_angle + 256, -6);
sy += bsin(actor->spr.__int_angle + 256, -6);
sx += bcos(actor->int_ang() + 256, -6);
sy += bsin(actor->int_ang() + 256, -6);
sz += (12 << 8);
}
if (actor->spr.picnum == VIXEN)
@ -503,8 +503,8 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
{
auto aimed = aim(actor, AUTO_AIM_ANGLE);
sx += bcos(actor->spr.__int_angle + 160, -7);
sy += bsin(actor->spr.__int_angle + 160, -7);
sx += bcos(actor->int_ang() + 160, -7);
sy += bsin(actor->int_ang() + 160, -7);
if (aimed)
{
@ -578,7 +578,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
j->spr.cstat = CSTAT_SPRITE_YCENTER;
j->spr.clipdist = 4;
sa = actor->spr.__int_angle + 32 - (krand() & 63);
sa = actor->int_ang() + 32 - (krand() & 63);
zvel = oldzvel + 512 - (krand() & 1023);
if (atwith == FIRELASER)
@ -657,7 +657,7 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
zvel = ((ps[j].player_int_opos().Z - sz) * vel) / l;
if (badguy(actor) && (actor->spr.hitag & face_player_smart))
sa = actor->spr.__int_angle + (krand() & 31) - 16;
sa = actor->int_ang() + (krand() & 31) - 16;
}
if (p < 0) aimed = nullptr;
@ -809,7 +809,7 @@ static void shootwhip(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
j->spr.cstat = CSTAT_SPRITE_YCENTER;
j->spr.clipdist = 4;
sa = actor->spr.__int_angle + 32 - (krand() & 63);
sa = actor->int_ang() + 32 - (krand() & 63);
zvel = oldzvel + 512 - (krand() & 1023);
scount--;
@ -4048,7 +4048,7 @@ void OnMotorcycle(player_struct *p, DDukeActor* motosprite)
{
p->pos.X = motosprite->spr.pos.X;
p->pos.Y = motosprite->spr.pos.Y;
p->angle.ang = buildang(motosprite->spr.__int_angle);
p->angle.ang = buildang(motosprite->int_ang());
p->ammo_amount[MOTORCYCLE_WEAPON] = motosprite->saved_ammo;
deletesprite(motosprite);
}
@ -4128,7 +4128,7 @@ void OnBoat(player_struct *p, DDukeActor* boat)
{
p->pos.X = boat->spr.pos.X;
p->pos.Y = boat->spr.pos.Y;
p->angle.ang = buildang(boat->spr.__int_angle);
p->angle.ang = buildang(boat->int_ang());
p->ammo_amount[BOAT_WEAPON] = boat->saved_ammo;
deletesprite(boat);
}

View file

@ -661,7 +661,7 @@ void resetpspritevars(int g)
ps[j].backupxyz();
ps[j].setbobpos();
act->backuppos();
ps[j].angle.oang = ps[j].angle.ang = buildang(act->spr.__int_angle);
ps[j].angle.oang = ps[j].angle.ang = buildang(act->int_ang());
updatesector(act->int_pos().X, act->int_pos().Y, &ps[j].cursector);

View file

@ -1395,7 +1395,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
if (targ->spr.picnum != TANK && !bossguy(targ) && targ->spr.picnum != RECON && targ->spr.picnum != ROTATEGUN)
{
if ((targ->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == 0)
targ->spr.__int_angle = (proj->spr.__int_angle + 1024) & 2047;
targ->spr.__int_angle = (proj->int_ang() + 1024) & 2047;
targ->spr.xvel = -(proj->spr.extra << 2);
auto sp = targ->sector();
pushmove(targ, &sp, 128L, (4 << 8), (4 << 8), CLIPMASK0);

View file

@ -938,7 +938,7 @@ static void lotsofpopcorn(DDukeActor *actor, walltype* wal, int n)
{
for (j = n - 1; j >= 0; j--)
{
a = actor->spr.__int_angle - 256 + (krand() & 511) + 1024;
a = actor->int_ang() - 256 + (krand() & 511) + 1024;
EGS(actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, POPCORN, -32, 36, 36, a, 32 + (krand() & 63), 1024 - (krand() & 1023), actor, 5);
}
return;
@ -968,7 +968,7 @@ static void lotsofpopcorn(DDukeActor *actor, walltype* wal, int n)
z = sect->int_floorz() - (krand() & (abs(sect->int_ceilingz() - sect->int_floorz())));
if (z < -(32 << 8) || z >(32 << 8))
z = actor->int_pos().Z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = actor->spr.__int_angle - 1024;
a = actor->int_ang() - 1024;
EGS(actor->sector(), x1, y1, z, POPCORN, -32, 36, 36, a, 32 + (krand() & 63), -(krand() & 1023), actor, 5);
}
}
@ -2085,14 +2085,14 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
{
proj->spr.xvel = (targ->spr.xvel >> 1) + (targ->spr.xvel >> 2);
proj->spr.__int_angle -= ((targ->spr.__int_angle << 1) + krand()) & 64;
targ->spr.__int_angle = (targ->spr.__int_angle + krand()) & 16;
targ->spr.__int_angle = (targ->int_ang() + krand()) & 16;
S_PlayActorSound(355, targ);
}
else if (proj->spr.picnum == HENSTAND || proj->spr.picnum == HENSTAND + 1)
{
proj->spr.xvel = (targ->spr.xvel >> 1) + (targ->spr.xvel >> 2);
proj->spr.__int_angle -= ((targ->spr.__int_angle << 1) + krand()) & 16;
targ->spr.__int_angle = (targ->spr.__int_angle + krand()) & 16;
targ->spr.__int_angle = (targ->int_ang() + krand()) & 16;
S_PlayActorSound(355, targ);
}
else

View file

@ -1088,7 +1088,7 @@ void lotsofglass(DDukeActor *actor, walltype* wal, int n)
{
for (j = n - 1; j >= 0; j--)
{
a = actor->spr.__int_angle - 256 + (krand() & 511) + 1024;
a = actor->int_ang() - 256 + (krand() & 511) + 1024;
EGS(actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), 1024 - (krand() & 1023), actor, 5);
}
return;
@ -1113,7 +1113,7 @@ void lotsofglass(DDukeActor *actor, walltype* wal, int n)
z = sect->int_floorz() - (krand() & (abs(sect->int_ceilingz() - sect->int_floorz())));
if (z < -(32 << 8) || z >(32 << 8))
z = actor->int_pos().Z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = actor->spr.__int_angle - 1024;
a = actor->int_ang() - 1024;
EGS(actor->sector(), x1, y1, z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), -(krand() & 1023), actor, 5);
}
}
@ -1202,7 +1202,7 @@ void lotsofcolourglass(DDukeActor* actor, walltype* wal, int n)
z = sect->int_floorz() - (krand() & (abs(sect->int_ceilingz() - sect->int_floorz())));
if (z < -(32 << 8) || z >(32 << 8))
z = actor->int_pos().Z - (32 << 8) + (krand() & ((64 << 8) - 1));
a = actor->spr.__int_angle - 1024;
a = actor->int_ang() - 1024;
auto k = EGS(actor->sector(), x1, y1, z, TILE_GLASSPIECES + (j % 3), -32, 36, 36, a, 32 + (krand() & 63), -(krand() & 2047), actor, 5);
if (k) k->spr.pal = krand() & 7;
}

View file

@ -197,7 +197,7 @@ void AIAnubis::Tick(RunListEvent* ev)
}
case kHitWall:
{
ap->spr.__int_angle = (ap->spr.__int_angle + 256) & kAngleMask;
ap->spr.__int_angle = (ap->int_ang() + 256) & kAngleMask;
ap->spr.xvel = bcos(ap->spr.__int_angle, -2);
ap->spr.yvel = bsin(ap->spr.__int_angle, -2);
break;

View file

@ -229,7 +229,7 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo
if (nStat == kStatAnubisDrum)
{
int nAngle = (pActor->spr.__int_angle + 256) - RandomSize(9);
int nAngle = (pActor->int_ang() + 256) - RandomSize(9);
pHitActor->spr.xvel = bcos(nAngle, 1);
pHitActor->spr.yvel = bsin(nAngle, 1);
@ -501,7 +501,7 @@ HITSPRITE:
{
if (pHitWall != nullptr)
{
BackUpBullet(&x2, &y2, pActor->spr.__int_angle);
BackUpBullet(&x2, &y2, pActor->int_ang());
if (nType != 3 || RandomSize(2) == 0)
{

View file

@ -322,7 +322,7 @@ void AIGrenade::Tick(RunListEvent* ev)
}
else if (nMov.type == kHitSprite)
{
BounceGrenade(pActor, nMov.actor()->spr.__int_angle);
BounceGrenade(pActor, nMov.actor()->int_ang());
}
pActor->nHealth = 0;

View file

@ -809,7 +809,7 @@ loc_flag:
// only autoaim if target is in front of the player.
assert(t->sector());
int angletotarget = bvectangbam(t->int_pos().X - pPlayerActor->int_pos().X, t->int_pos().Y - pPlayerActor->int_pos().Y).asbuild();
int anglediff = (pPlayerActor->spr.__int_angle - angletotarget) & 2047;
int anglediff = (pPlayerActor->int_ang() - angletotarget) & 2047;
if (anglediff < 512 || anglediff > 1536)
{
target = t;

View file

@ -635,7 +635,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
}
case 88:
{
AddFlow(pActor->sector(), nSpeed, 0, pActor->spr.__int_angle);
AddFlow(pActor->sector(), nSpeed, 0, pActor->int_ang());
DeleteActor(pActor);
return;
@ -650,7 +650,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
}
case 78:
{
AddFlow(pActor->sector(), nSpeed, 1, pActor->spr.__int_angle);
AddFlow(pActor->sector(), nSpeed, 1, pActor->int_ang());
auto pSector = pActor->sector();
pSector->Flag |= 0x8000;

View file

@ -265,8 +265,8 @@ void AILavaDude::Tick(RunListEvent* ev)
PlotCourseToSprite(pActor, pTarget);
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
if (pTarget && !RandomSize(1))
{
@ -290,9 +290,9 @@ void AILavaDude::Tick(RunListEvent* ev)
ChangeActorSect(pActor, pSector);
pActor->set_int_pos({ x, y, z });
pActor->spr.__int_angle = (pActor->spr.__int_angle + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.__int_angle = (pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
break;
}
@ -302,9 +302,9 @@ void AILavaDude::Tick(RunListEvent* ev)
if (coll.type == kHitWall)
{
pActor->spr.__int_angle = (pActor->spr.__int_angle + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.__int_angle = (pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
break;
}
else if (coll.type == kHitSprite)

View file

@ -170,7 +170,7 @@ void AILion::Damage(RunListEvent* ev)
PlotCourseToSprite(pActor, pTarget);
pActor->nAction = 5;
pActor->nCount = RandomSize(3);
pActor->spr.__int_angle = (pActor->spr.__int_angle - (RandomSize(1) << 8)) + (RandomSize(1) << 8); // NOTE: no angle mask in original code
pActor->spr.__int_angle = (pActor->int_ang() - (RandomSize(1) << 8)) + (RandomSize(1) << 8); // NOTE: no angle mask in original code
}
else
{
@ -293,7 +293,7 @@ void AILion::Tick(RunListEvent* ev)
if (nMov.type == kHitWall)
{
// loc_378FA:
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
break;
@ -325,7 +325,7 @@ void AILion::Tick(RunListEvent* ev)
else
{
// loc_378FA:
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
break;
@ -389,7 +389,7 @@ void AILion::Tick(RunListEvent* ev)
int nCheckDist = 0x7FFFFFFF;
int nAngle = pActor->spr.__int_angle;
int nScanAngle = (pActor->spr.__int_angle - 512) & kAngleMask;
int nScanAngle = (pActor->int_ang() - 512) & kAngleMask;
for (int i = 0; i < 5; i++)
{
@ -454,7 +454,7 @@ void AILion::Tick(RunListEvent* ev)
else
{
// loc_378FA:
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
break;
@ -477,7 +477,7 @@ void AILion::Tick(RunListEvent* ev)
}
else
{
pActor->spr.__int_angle = (RandomSize(9) + (pActor->spr.__int_angle + 768)) & kAngleMask;
pActor->spr.__int_angle = (RandomSize(9) + (pActor->int_ang() + 768)) & kAngleMask;
}
pActor->spr.zvel = -1000;

View file

@ -644,7 +644,7 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
ChangeActorSect(pActor, pSectorPre);
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
Collision c;

View file

@ -264,7 +264,7 @@ void AIMummy::Tick(RunListEvent* ev)
{
case kHitWall:
{
pActor->spr.__int_angle = (pActor->spr.__int_angle + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
return;

View file

@ -1315,7 +1315,7 @@ void AITrap::Tick(RunListEvent* ev)
{
if (nType == 15)
{
pBullet->spr.__int_angle = (pBullet->spr.__int_angle - 512) & kAngleMask;
pBullet->spr.__int_angle = (pBullet->int_ang() - 512) & kAngleMask;
D3PlayFX(StaticSound[kSound32], pBullet);
}
else
@ -1382,7 +1382,7 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
}
else
{
int nAngle = (pActor->spr.__int_angle + 256) - RandomSize(9);
int nAngle = (pActor->int_ang() + 256) - RandomSize(9);
if (nVal)
{

View file

@ -1017,7 +1017,7 @@ void AIPlayer::Tick(RunListEvent* ev)
{
if ((sect->hitag == 45) && bTouchFloor)
{
int nDiff = AngleDiff(nNormal, (pPlayerActor->spr.__int_angle + 1024) & kAngleMask);
int nDiff = AngleDiff(nNormal, (pPlayerActor->int_ang() + 1024) & kAngleMask);
if (nDiff < 0) {
nDiff = -nDiff;
@ -2182,7 +2182,7 @@ sectdone:
ChangeActorStat(pActorB, 899);
}
SetSavePoint(nPlayer, pPlayerActor->int_pos().X, pPlayerActor->int_pos().Y, pPlayerActor->int_pos().Z, pPlayerActor->sector(), pPlayerActor->spr.__int_angle);
SetSavePoint(nPlayer, pPlayerActor->int_pos().X, pPlayerActor->int_pos().Y, pPlayerActor->int_pos().Z, pPlayerActor->sector(), pPlayerActor->int_ang());
break;
}
@ -2737,7 +2737,7 @@ DEFINE_ACTION_FUNCTION(_ExhumedPlayer, IsUnderwater)
DEFINE_ACTION_FUNCTION(_ExhumedPlayer, GetAngle)
{
PARAM_SELF_STRUCT_PROLOGUE(Player);
ACTION_RETURN_INT(self->pActor->spr.__int_angle);
ACTION_RETURN_INT(self->pActor->int_ang());
}

View file

@ -466,8 +466,8 @@ void BuildQueenEgg(int nQueen, int nVal)
{
pActor2->spr.xrepeat = 30;
pActor2->spr.yrepeat = 30;
pActor2->spr.xvel = bcos(pActor2->spr.__int_angle);
pActor2->spr.yvel = bsin(pActor2->spr.__int_angle);
pActor2->spr.xvel = bcos(pActor2->int_ang());
pActor2->spr.yvel = bsin(pActor2->int_ang());
pActor2->spr.zvel = -6000;
pActor2->spr.cstat = 0;
}

View file

@ -289,7 +289,7 @@ void AIRex::Tick(RunListEvent* ev)
}
case kHitWall:
{
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
pActor->nAction = 1;
@ -321,7 +321,7 @@ void AIRex::Tick(RunListEvent* ev)
SetQuake(pActor, 25);
pActor->nCount = 60;
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
pActor->nAction = 1;

View file

@ -281,13 +281,13 @@ void AIRoach::Tick(RunListEvent* ev)
}
else
{
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
GoRoach(pActor);
}
}
else if (nMov.type == kHitWall)
{
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
GoRoach(pActor);
}
else

View file

@ -220,8 +220,8 @@ void AIScorp::Tick(RunListEvent* ev)
D3PlayFX(StaticSound[kSound41], pActor);
pActor->nFrame = 0;
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
pActor->nAction = 1;
pActor->pTarget = pTarget;
@ -305,8 +305,8 @@ void AIScorp::Tick(RunListEvent* ev)
{
pActor->nAction = 1;
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
pActor->nFrame = 0;
return;
@ -367,7 +367,7 @@ void AIScorp::Tick(RunListEvent* ev)
return;
}
auto pSpiderActor = BuildSpider(nullptr, pActor->int_pos().X, pActor->int_pos().Y, pActor->int_pos().Z, pActor->sector(), pActor->spr.__int_angle);
auto pSpiderActor = BuildSpider(nullptr, pActor->int_pos().X, pActor->int_pos().Y, pActor->int_pos().Z, pActor->sector(), pActor->int_ang());
if (pSpiderActor)
{
pSpiderActor->spr.__int_angle = RandomSize(11);
@ -413,8 +413,8 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
pActor->spr.__int_angle += RandomSize(7) - 63;
pActor->spr.__int_angle &= kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
}
if (mode <= 1)
{

View file

@ -481,7 +481,7 @@ int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal)
tspritetype* pTSprite = mytspriteArray->get(nSprite);
int nAngle = GetMyAngle(nCamerax - pTSprite->int_pos().X, nCameray - pTSprite->int_pos().Y);
int nSeqOffset = ((((pTSprite->__int_angle + 512) - nAngle) + 128) & kAngleMask) >> 8;
int nSeqOffset = ((((pTSprite->int_ang() + 512) - nAngle) + 128) & kAngleMask) >> 8;
int16_t nFrame = SeqBase[nSeqOffset + nSeq] + nVal;
@ -538,7 +538,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
}
else
{
val = (((pTSprite->__int_angle - nAngle) + 128) & kAngleMask) >> 8;
val = (((pTSprite->int_ang() - nAngle) + 128) & kAngleMask) >> 8;
}
int eax = SeqBase[edx] + nFrame;

View file

@ -420,7 +420,7 @@ void AISet::Tick(RunListEvent* ev)
}
}
pActor->spr.__int_angle = (pActor->spr.__int_angle + 256) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
break;
@ -524,8 +524,8 @@ void AISet::Tick(RunListEvent* ev)
pActor->nAction = 8;
pActor->nFrame = 0;
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
}
return;
}

View file

@ -144,8 +144,8 @@ void AISpider::Tick(RunListEvent* ev)
spp->nFrame = 0;
spp->pTarget = pTarget;
spp->spr.xvel = bcos(spp->spr.__int_angle);
spp->spr.yvel = bsin(spp->spr.__int_angle);
spp->spr.xvel = bcos(spp->int_ang());
spp->spr.yvel = bsin(spp->int_ang());
return;
}
}
@ -195,8 +195,8 @@ void AISpider::Tick(RunListEvent* ev)
if (RandomSize(3))
{
spp->spr.xvel = bcos(spp->spr.__int_angle);
spp->spr.yvel = bsin(spp->spr.__int_angle);
spp->spr.xvel = bcos(spp->int_ang());
spp->spr.yvel = bsin(spp->int_ang());
}
else
{
@ -301,9 +301,9 @@ void AISpider::Tick(RunListEvent* ev)
{
case kHitWall:
{
spp->spr.__int_angle = (spp->spr.__int_angle + 256) & 0x7EF;
spp->spr.xvel = bcos(spp->spr.__int_angle);
spp->spr.yvel = bsin(spp->spr.__int_angle);
spp->spr.__int_angle = (spp->int_ang() + 256) & 0x7EF;
spp->spr.xvel = bcos(spp->int_ang());
spp->spr.yvel = bsin(spp->int_ang());
return;
}
case kHitSprite:

View file

@ -211,7 +211,7 @@ void DrawView(double smoothRatio, bool sceneonly)
playerY = pActor->int_pos().Y;
playerZ = pActor->int_pos().Z;
pSector = pActor->sector();
nAngle = buildang(pActor->spr.__int_angle);
nAngle = buildang(pActor->int_ang());
rotscrnang = buildang(0);
SetGreenPal();

View file

@ -36,8 +36,8 @@ static actionSeq WaspSeq[] = {
void SetWaspVel(DExhumedActor* pActor)
{
pActor->spr.xvel = bcos(pActor->spr.__int_angle);
pActor->spr.yvel = bsin(pActor->spr.__int_angle);
pActor->spr.xvel = bcos(pActor->int_ang());
pActor->spr.yvel = bsin(pActor->int_ang());
}
DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, int nAngle, bool bEggWasp)
@ -170,7 +170,7 @@ void AIWasp::Damage(RunListEvent* ev)
pActor->nFrame = 0;
pActor->spr.cstat = 0;
pActor->spr.__int_angle = (pActor->spr.__int_angle + 1024) & kAngleMask;
pActor->spr.__int_angle = (pActor->int_ang() + 1024) & kAngleMask;
SetWaspVel(pActor);

View file

@ -127,7 +127,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
actor->user.RotNum = 0;
actor->spr.xvel <<= 1;
actor->user.ActorActionFunc = nullptr;
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
break;
case NINJA_RUN_R0:
@ -451,7 +451,7 @@ int DoFireFly(DSWActor* actor)
actor->spr.clipdist = 256>>2;
if (!move_actor(actor, nx, ny, 0L))
{
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
actor->user.WaitTics = (actor->user.WaitTics + (ACTORMOVETICS << 1)) & 2047;
@ -738,7 +738,7 @@ int DoActorStopFall(DSWActor* actor)
if (actor->user.lowActor && !(actor->user.lowActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR))
{
//actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (RANDOM_P2(64<<8)>>8) - 32);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024 + (RANDOM_P2(512<<8)>>8));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024 + (RANDOM_P2(512<<8)>>8));
actor->user.jump_speed = -350;
DoActorBeginJump(actor);

View file

@ -838,7 +838,7 @@ int DoBunnyBeginJumpAttack(DSWActor* actor)
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
if (coll.type != kHitNone)
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024) + (RANDOM_NEG(256, 6) >> 6);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6);
else
actor->spr.__int_angle = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6));
@ -1026,7 +1026,7 @@ int DoBunnyQuickJump(DSWActor* actor)
actor->copyXY(hitActor);
actor->spr.__int_angle = hitActor->spr.__int_angle;
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
HelpMissileLateral(actor, 2000);
actor->spr.__int_angle = hitActor->spr.__int_angle;
actor->user.Vis = actor->spr.__int_angle; // Remember angles for later

View file

@ -707,7 +707,7 @@ int DoCoolgCircle(DSWActor* actor)
{
int nx,ny,bound;
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + actor->user.Counter2);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + actor->user.Counter2);
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);

View file

@ -104,7 +104,7 @@ int GetRotation(tspriteArray& tsprites, int tSpriteNum, int viewx, int viewy)
// Get which of the 8 angles of the sprite to draw (0-7)
// rotation ranges from 0-7
angle2 = getangle(tsp->int_pos().X - viewx, tsp->int_pos().Y - viewy);
rotation = ((tsp->__int_angle + 3072 + 128 - angle2) & 2047);
rotation = ((tsp->int_ang() + 3072 + 128 - angle2) & 2047);
rotation = (rotation >> 8) & 7;
if (ownerActor->user.RotNum == 5)
@ -353,7 +353,7 @@ void DoMotionBlur(tspriteArray& tsprites, tspritetype const * const tsp)
int xrepeat, yrepeat, repeat_adj = 0;
int z_amt_per_pixel;
ang = NORM_ANGLE(tsp->__int_angle + 1024);
ang = NORM_ANGLE(tsp->int_ang() + 1024);
if (!ownerActor->hasU() || tsp->xvel == 0)
{
@ -669,7 +669,7 @@ void analyzesprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, int
{
tsp->picnum = DART_PIC;
tsp->__int_angle = NORM_ANGLE(tsp->__int_angle - 512 - 24);
tsp->__int_angle = NORM_ANGLE(tsp->int_ang() - 512 - 24);
tsp->xrepeat = tsp->yrepeat = DART_REPEAT;
tsp->cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL);
}
@ -733,7 +733,7 @@ void analyzesprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, int
if (tsp->statnum == STAT_STAR_QUEUE)
{
tsp->picnum = DART_PIC;
tsp->__int_angle = NORM_ANGLE(tsp->__int_angle - 512);
tsp->__int_angle = NORM_ANGLE(tsp->int_ang() - 512);
tsp->xrepeat = tsp->yrepeat = DART_REPEAT;
tsp->cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL);
}
@ -764,8 +764,8 @@ void analyzesprites(tspriteArray& tsprites, int viewx, int viewy, int viewz, int
{
// move sprite forward some so he looks like he's
// climbing
pos.X = pp->si.X + MOVEx(128 + 80, tsp->__int_angle);
pos.Y = pp->si.Y + MOVEy(128 + 80, tsp->__int_angle);
pos.X = pp->si.X + MOVEx(128 + 80, tsp->int_ang());
pos.Y = pp->si.Y + MOVEy(128 + 80, tsp->int_ang());
}
else
{
@ -1073,7 +1073,7 @@ void PrintSpriteInfo(PLAYER* pp)
Printf("POSX:%d, ", actor->int_pos().X);
Printf("POSY:%d, ", actor->int_pos().Y);
Printf("POSZ:%d,", actor->int_pos().Z);
Printf("ANG:%d\n", actor->spr.__int_angle);
Printf("ANG:%d\n", actor->int_ang());
}
}
}
@ -1448,7 +1448,7 @@ void drawscreen(PLAYER* pp, double smoothratio, bool sceneonly)
{
DSWActor* ractor = pp->remoteActor;
if (TEST_BOOL1(ractor))
tang = buildang(ractor->spr.__int_angle);
tang = buildang(ractor->int_ang());
else
tang = bvectangbam(pp->sop_remote->pmid.X - tx, pp->sop_remote->pmid.Y - ty);
}

View file

@ -438,7 +438,7 @@ int DoHornetCircle(DSWActor* actor)
{
int nx,ny,bound;
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + actor->user.Counter2);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + actor->user.Counter2);
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
@ -449,7 +449,7 @@ int DoHornetCircle(DSWActor* actor)
// try moving in the opposite direction
actor->user.Counter2 = -actor->user.Counter2;
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);

View file

@ -391,9 +391,9 @@ int DoBloodSpray(DSWActor* actor)
if ((hitActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
{
wall_ang = NORM_ANGLE(hitActor->spr.__int_angle);
wall_ang = NORM_ANGLE(hitActor->int_ang());
SpawnMidSplash(actor);
QueueWallBlood(actor, hitActor->spr.__int_angle);
QueueWallBlood(actor, hitActor->int_ang());
WallBounce(actor, wall_ang);
ScaleSpriteVector(actor, 32000);
}
@ -401,7 +401,7 @@ int DoBloodSpray(DSWActor* actor)
{
actor->user.change.X = actor->user.change.Y = 0;
SpawnMidSplash(actor);
QueueWallBlood(actor, hitActor->spr.__int_angle);
QueueWallBlood(actor, hitActor->int_ang());
KillActor(actor);
return true;
}
@ -582,7 +582,7 @@ int DoPhosphorus(DSWActor* actor)
if ((hitActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
{
wall_ang = NORM_ANGLE(hitActor->spr.__int_angle);
wall_ang = NORM_ANGLE(hitActor->int_ang());
WallBounce(actor, wall_ang);
ScaleSpriteVector(actor, 32000);
}
@ -789,7 +789,7 @@ int DoChemBomb(DSWActor* actor)
if ((hitActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
{
wall_ang = NORM_ANGLE(hitActor->spr.__int_angle);
wall_ang = NORM_ANGLE(hitActor->int_ang());
WallBounce(actor, wall_ang);
ScaleSpriteVector(actor, 32000);
}
@ -1014,7 +1014,7 @@ int DoCaltrops(DSWActor* actor)
if ((hitActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_WALL))
{
wall_ang = NORM_ANGLE(hitActor->spr.__int_angle);
wall_ang = NORM_ANGLE(hitActor->int_ang());
WallBounce(actor, wall_ang);
ScaleSpriteVector(actor, 10000);
}
@ -1204,8 +1204,8 @@ int SpawnRadiationCloud(DSWActor* actor)
}
else
{
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->spr.zvel = Z(4) + RANDOM_P2(Z(4));
actorNew->user.Radius = 4000;
}
@ -1286,8 +1286,8 @@ int PlayerInitChemBomb(PLAYER* pp)
plActor->spr.clipdist = uint8_t(oclipdist);
actorNew->spr.clipdist = 80L >> 2;
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel >> 1;
// adjust xvel according to player velocity
@ -1333,8 +1333,8 @@ int InitSpriteChemBomb(DSWActor* actor)
actorNew->spr.clipdist = 80L >> 2;
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel >> 1;
// Smoke will come out for this many seconds
@ -1388,8 +1388,8 @@ int InitChemBomb(DSWActor* actor)
}
else
{
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel >> 1;
// Smoke will come out for this many seconds
actorNew->user.WaitTics = 3*120;
@ -1658,8 +1658,8 @@ int PlayerInitCaltrops(PLAYER* pp)
plActor->spr.clipdist = uint8_t(oclipdist);
actorNew->spr.clipdist = 80L >> 2;
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel >> 1;
// adjust xvel according to player velocity
@ -1703,8 +1703,8 @@ int InitCaltrops(DSWActor* actor)
// spawnedActor->spr.clipdist = 80L>>2;
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel >> 1;
SetupSpriteForBreak(actorNew); // Put Caltrops in the break queue
@ -1752,8 +1752,8 @@ int InitPhosphorus(DSWActor* actor)
actorNew->spr.zvel = short(-RandomRange(100) * HORIZ_MULT);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = (actorNew->spr.zvel >> 1);
return 0;
@ -1825,8 +1825,8 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
actorNew->spr.zvel = short((-10 - RandomRange(50)) * HORIZ_MULT);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel >> 1;
if (!GlobalSkipZrange)
@ -1920,7 +1920,7 @@ int DoCarryFlag(DSWActor* actor)
{
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) };
SetActorZ(actor, &pos);
actor->spr.__int_angle = NORM_ANGLE(attached->spr.__int_angle + 1536);
actor->spr.__int_angle = NORM_ANGLE(attached->int_ang() + 1536);
}
// not activated yet
@ -2069,7 +2069,7 @@ int DoCarryFlagNoDet(DSWActor* actor)
{
vec3_t pos = { attached->int_pos().X, attached->int_pos().Y, ActorZOfMiddle(attached) };
SetActorZ(actor, &pos);
actor->spr.__int_angle = NORM_ANGLE(attached->spr.__int_angle + 1536);
actor->spr.__int_angle = NORM_ANGLE(attached->int_ang() + 1536);
actor->set_int_z(attached->int_pos().Z - (ActorSizeZ(attached) >> 1));
}
@ -2210,7 +2210,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-128);
}
actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang());
// Set the shell number
actorNew->user.ShellNum = ShellCount;
@ -2224,7 +2224,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
HelpMissileLateral(actorNew,1300);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-128-64);
actorNew->spr.__int_angle += (RANDOM_P2(128<<5)>>5) - (128 / 2);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle);
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang());
// Set the shell number
actorNew->user.ShellNum = ShellCount;
@ -2241,8 +2241,8 @@ int SpawnShell(DSWActor* actor, int ShellNum)
actorNew->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
actorNew->user.Flags &= ~(SPR_BOUNCE|SPR_UNDERWATER); // Make em' bounce
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->spr.__int_angle);
actorNew->user.change.X = MOVEx(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Y = MOVEy(actorNew->spr.xvel, actorNew->int_ang());
actorNew->user.change.Z = actorNew->spr.zvel;
actorNew->user.jump_speed = 200;

View file

@ -1297,8 +1297,8 @@ void DoSpawnTeleporterEffect(DSWActor* actor)
extern STATE s_TeleportEffect[];
int nx, ny;
nx = MOVEx(512, actor->spr.__int_angle);
ny = MOVEy(512, actor->spr.__int_angle);
nx = MOVEx(512, actor->int_ang());
ny = MOVEy(512, actor->int_ang());
nx += actor->int_pos().X;
ny += actor->int_pos().Y;
@ -1364,7 +1364,7 @@ void DoPlayerWarpTeleporter(PLAYER* pp)
default:
{
auto pos = act_warp->int_pos();
DoPlayerTeleportToSprite(pp, &pos, act_warp->spr.__int_angle);
DoPlayerTeleportToSprite(pp, &pos, act_warp->int_ang());
act_warp->set_int_pos(pos);
PlaySound(DIGI_TELEPORT, pp, v3df_none);
@ -2278,7 +2278,7 @@ void DoTankTreads(PLAYER* pp)
if (!TEST_BOOL2(actor))
{
SET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
}
else
@ -2286,7 +2286,7 @@ void DoTankTreads(PLAYER* pp)
if (TEST_BOOL2(actor))
{
RESET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
}
@ -2299,7 +2299,7 @@ void DoTankTreads(PLAYER* pp)
if (!TEST_BOOL2(actor))
{
SET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
}
else
@ -2307,7 +2307,7 @@ void DoTankTreads(PLAYER* pp)
if (TEST_BOOL2(actor))
{
RESET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
}
@ -2320,7 +2320,7 @@ void DoTankTreads(PLAYER* pp)
if (!TEST_BOOL2(actor))
{
SET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
}
else
@ -2328,7 +2328,7 @@ void DoTankTreads(PLAYER* pp)
if (TEST_BOOL2(actor))
{
RESET_BOOL2(actor);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
}
}
@ -3341,8 +3341,8 @@ void DoPlayerClimb(PLAYER* pp)
// determine where the player is supposed to be in relation to the ladder
// move out in front of the ladder
nx = MOVEx(100, lActor->spr.__int_angle);
ny = MOVEy(100, lActor->spr.__int_angle);
nx = MOVEx(100, lActor->int_ang());
ny = MOVEy(100, lActor->int_ang());
// set ladder sector
pp->LadderSector = near.hitWall->twoSided()? near.hitWall->nextSector() : near.hitWall->sectorp();
@ -3353,7 +3353,7 @@ void DoPlayerClimb(PLAYER* pp)
pp->LadderPosition.X = lActor->int_pos().X + nx * 5;
pp->LadderPosition.Y = lActor->int_pos().Y + ny * 5;
pp->angle.settarget(buildang(lActor->spr.__int_angle + 1024));
pp->angle.settarget(buildang(lActor->int_ang() + 1024));
}
}
}
@ -3724,8 +3724,8 @@ bool PlayerOnLadder(PLAYER* pp)
// determine where the player is supposed to be in relation to the ladder
// move out in front of the ladder
nx = MOVEx(100, lActor->spr.__int_angle);
ny = MOVEy(100, lActor->spr.__int_angle);
nx = MOVEx(100, lActor->int_ang());
ny = MOVEy(100, lActor->int_ang());
pp->LadderSector = near.hitWall->twoSided() ? near.hitWall->nextSector() : near.hitWall->sectorp();
@ -3735,7 +3735,7 @@ bool PlayerOnLadder(PLAYER* pp)
pp->LadderPosition.X = lActor->int_pos().X + nx * 5;
pp->LadderPosition.Y = lActor->int_pos().Y + ny * 5;
pp->angle.settarget(buildang(lActor->spr.__int_angle + 1024));
pp->angle.settarget(buildang(lActor->int_ang() + 1024));
return true;
}
@ -4518,8 +4518,8 @@ void DoPlayerDive(PLAYER* pp)
if (bubble != nullptr)
{
// back it up a bit to get it out of your face
nx = MOVEx((128+64), NORM_ANGLE(bubble->spr.__int_angle + 1024));
ny = MOVEy((128+64), NORM_ANGLE(bubble->spr.__int_angle + 1024));
nx = MOVEx((128+64), NORM_ANGLE(bubble->int_ang() + 1024));
ny = MOVEy((128+64), NORM_ANGLE(bubble->int_ang() + 1024));
move_sprite(bubble, nx, ny, 0L, plActor->user.ceiling_dist, plActor->user.floor_dist, 0, synctics);
}
@ -5121,7 +5121,7 @@ void DoPlayerStopOperate(PLAYER* pp)
{
DSWActor* rsp = pp->remoteActor;
if (TEST_BOOL1(rsp))
pp->angle.ang = pp->angle.oang = buildang(rsp->spr.__int_angle);
pp->angle.ang = pp->angle.oang = buildang(rsp->int_ang());
else
pp->angle.ang = pp->angle.oang = bvectangbam(pp->sop_remote->pmid.X - pp->pos.X, pp->sop_remote->pmid.Y - pp->pos.Y);
}
@ -5894,7 +5894,7 @@ void DoPlayerDeathMoveHead(PLAYER* pp)
break;
wall_ang = NORM_ANGLE(hitActor->spr.__int_angle);
wall_ang = NORM_ANGLE(hitActor->int_ang());
dang = getincangle(wall_ang, plActor->user.slide_ang);
plActor->user.slide_ang = NORM_ANGLE(wall_ang + 1024 - dang);
@ -6865,7 +6865,7 @@ void PlayerSpawnPosition(PLAYER* pp)
ASSERT(spawn_sprite != nullptr);
pp->pos = pp->opos = spawn_sprite->int_pos();
pp->angle.ang = pp->angle.oang = buildang(spawn_sprite->spr.__int_angle);
pp->angle.ang = pp->angle.oang = buildang(spawn_sprite->int_ang());
pp->setcursector(spawn_sprite->sector());
getzsofslopeptr(pp->cursector, pp->pos.X, pp->pos.Y, &cz, &fz);

View file

@ -927,7 +927,7 @@ int InitRipperHang(DSWActor* actor)
for (dang = 0; dang < 2048; dang += 128)
{
tang = NORM_ANGLE(actor->spr.__int_angle + dang);
tang = NORM_ANGLE(actor->int_ang() + dang);
FAFhitscan(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ActorSizeZ(actor), actor->sector(), // Start position
bcos(tang), // X vector of 3D ang
@ -1051,7 +1051,7 @@ int DoRipperBeginJumpAttack(DSWActor* actor)
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
if (coll.type != kHitNone)
actor->spr.__int_angle = NORM_ANGLE((actor->spr.__int_angle + 1024) + (RANDOM_NEG(256, 6) >> 6));
actor->spr.__int_angle = NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6));
else
actor->spr.__int_angle = NORM_ANGLE(tang + (RANDOM_NEG(256, 6) >> 6));

View file

@ -936,7 +936,7 @@ int InitRipper2Hang(DSWActor* actor)
for (dang = 0; dang < 2048; dang += 128)
{
tang = NORM_ANGLE(actor->spr.__int_angle + dang);
tang = NORM_ANGLE(actor->int_ang() + dang);
FAFhitscan(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ActorSizeZ(actor), actor->sector(), // Start position
bcos(tang), // X vector of 3D ang
@ -1072,7 +1072,7 @@ int DoRipper2BeginJumpAttack(DSWActor* actor)
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
if (coll.type != kHitNone)
actor->spr.__int_angle = NORM_ANGLE((actor->spr.__int_angle + 1024) + (RANDOM_NEG(256, 6) >> 6));
actor->spr.__int_angle = NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6));
else
actor->spr.__int_angle = NORM_ANGLE(tang);

View file

@ -849,8 +849,8 @@ void SectorExp(DSWActor* actor, sectortype* sectp, short orig_ang, int zh)
exp->spr.xrepeat += (RANDOM_P2(32<<8)>>8) - 16;
exp->spr.yrepeat += (RANDOM_P2(32<<8)>>8) - 16;
exp->user.change.X = MOVEx(92, exp->spr.__int_angle);
exp->user.change.Y = MOVEy(92, exp->spr.__int_angle);
exp->user.change.X = MOVEx(92, exp->int_ang());
exp->user.change.Y = MOVEy(92, exp->int_ang());
}

View file

@ -254,8 +254,8 @@ int DoSkullMove(DSWActor* actor)
{
int32_t dax, day, daz;
dax = MOVEx(actor->spr.xvel, actor->spr.__int_angle);
day = MOVEy(actor->spr.xvel, actor->spr.__int_angle);
dax = MOVEx(actor->spr.xvel, actor->int_ang());
day = MOVEy(actor->spr.xvel, actor->int_ang());
daz = actor->spr.zvel;
actor->user.coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, ACTORMOVETICS);
@ -347,7 +347,7 @@ int DoSkullJump(DSWActor* actor)
if (actor->spr.xvel)
DoSkullMove(actor);
else
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (64 * ACTORMOVETICS));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS));
if (actor->user.Flags & (SPR_JUMPING))
{
@ -453,7 +453,7 @@ int DoSkullWait(DSWActor* actor)
else
// above the floor type
{
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (48 * ACTORMOVETICS));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (48 * ACTORMOVETICS));
DoSkullBob(actor);
@ -639,8 +639,8 @@ int DoBettyMove(DSWActor* actor)
{
int32_t dax, day, daz;
dax = MOVEx(actor->spr.xvel, actor->spr.__int_angle);
day = MOVEy(actor->spr.xvel, actor->spr.__int_angle);
dax = MOVEx(actor->spr.xvel, actor->int_ang());
day = MOVEy(actor->spr.xvel, actor->int_ang());
daz = actor->spr.zvel;
actor->user.coll = move_missile(actor, dax, day, daz, Z(16), Z(16), CLIPMASK_MISSILE, ACTORMOVETICS);
@ -692,7 +692,7 @@ int DoBettyBeginDeath(DSWActor* actor)
if (num_ord > 10) num_ord = 10;
for (i=0; i<num_ord; i++)
{
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (i*(2048/num_ord)));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (i*(2048/num_ord)));
InitSpriteGrenade(actor);
}
break;
@ -726,7 +726,7 @@ int DoBettyJump(DSWActor* actor)
if (actor->spr.xvel)
DoBettyMove(actor);
else
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (64 * ACTORMOVETICS));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (64 * ACTORMOVETICS));
if (actor->user.Flags & (SPR_JUMPING))
{
@ -825,7 +825,7 @@ int DoBettyWait(DSWActor* actor)
else
// above the floor type
{
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (48 * ACTORMOVETICS));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (48 * ACTORMOVETICS));
DoBettyBob(actor);

View file

@ -603,7 +603,7 @@ void GameInterface::UpdateSounds(void)
{
DSWActor* rsp = pp->remoteActor;
if (TEST_BOOL1(rsp))
tang = buildang(rsp->spr.__int_angle);
tang = buildang(rsp->int_ang());
else
tang = bvectangbam(pp->sop_remote->pmid.X - pp->pos.X, pp->sop_remote->pmid.Y - pp->pos.Y);
}

View file

@ -2491,7 +2491,7 @@ void SpriteSetup(void)
actorNew->spr.cstat = 0;
actorNew->spr.extra = 0;
actorNew->spr.pos = actor->spr.pos;
actorNew->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + 1024);
actorNew->spr.__int_angle = NORM_ANGLE(actor->int_ang() + 1024);
actorNew->spr.picnum = actor->spr.picnum;
actorNew->add_int_pos({ MOVEx(256 + 128, actor->spr.__int_angle), MOVEy(256 + 128, actor->spr.__int_angle), 0 });
@ -3500,8 +3500,8 @@ void SetupItemForJump(DSWActor* spawner, DSWActor* actor)
actor->spr.xvel = (int)SP_TAG7(spawner)<<2;
actor->spr.zvel = -(((int)SP_TAG8(spawner))<<5);
actor->user.change.X = MOVEx(actor->spr.xvel, actor->spr.__int_angle);
actor->user.change.Y = MOVEy(actor->spr.xvel, actor->spr.__int_angle);
actor->user.change.X = MOVEx(actor->spr.xvel, actor->int_ang());
actor->user.change.Y = MOVEy(actor->spr.xvel, actor->int_ang());
actor->user.change.Z = actor->spr.zvel;
}
}
@ -4367,8 +4367,8 @@ void getzrangepoint(int x, int y, int z, sectortype* sect,
// Calculate all 4 points of the floor sprite.
// (x1,y1),(x2,y2),(x3,y3),(x4,y4)
// These points will already have (x,y) subtracted from them
cosang = bcos(itActor->spr.__int_angle);
sinang = bsin(itActor->spr.__int_angle);
cosang = bcos(itActor->int_ang());
sinang = bsin(itActor->int_ang());
xspan = tileWidth(tilenum);
dax = ((xspan >> 1) + xoff) * itActor->spr.xrepeat;
yspan = tileHeight(tilenum);
@ -4577,8 +4577,8 @@ bool DropAhead(DSWActor* actor, int min_height)
// dax = actor->spr.x + MOVEx(128, actor->spr.__int_angle);
// day = actor->spr.y + MOVEy(128, actor->spr.__int_angle);
dax = actor->int_pos().X + MOVEx(256, actor->spr.__int_angle);
day = actor->int_pos().Y + MOVEy(256, actor->spr.__int_angle);
dax = actor->int_pos().X + MOVEx(256, actor->int_ang());
day = actor->int_pos().Y + MOVEy(256, actor->int_ang());
auto newsector = actor->sector();
updatesector(dax, day, &newsector);
@ -4736,7 +4736,7 @@ int DoGrating(DSWActor* actor)
int DoKey(DSWActor* actor)
{
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + (14 * ACTORMOVETICS));
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (14 * ACTORMOVETICS));
DoGet(actor);
return 0;

View file

@ -506,7 +506,7 @@ void QuickLadderSetup(short stat, short lotag, short type)
// add start point
start_sprite->spr.lotag = TRACK_START;
start_sprite->spr.hitag = 0;
start_sprite->add_int_pos({ MOVEx(256,start_sprite->spr.__int_angle + 1024), MOVEy(256,start_sprite->spr.__int_angle + 1024), 0 });
start_sprite->add_int_pos({ MOVEx(256,start_sprite->int_ang() + 1024), MOVEy(256,start_sprite->int_ang() + 1024), 0 });
TrackAddPoint(t, tp, start_sprite);
// add climb point
@ -1733,12 +1733,12 @@ PlayerPart:
if ((actor->sector()->firstWall()->extra & WALLFX_LOOP_REVERSE_SPIN))
{
rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, -delta_ang, &pos.vec2);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle - delta_ang);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() - delta_ang);
}
else
{
rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, delta_ang, &pos.vec2);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + delta_ang);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + delta_ang);
}
actor->set_int_pos(pos);
@ -1750,7 +1750,7 @@ PlayerPart:
// NOT part of a sector - independant of any sector
auto pos = actor->int_pos();
rotatepoint(sop->pmid.vec2, actor->int_pos().vec2, delta_ang, &pos.vec2);
actor->spr.__int_angle = NORM_ANGLE(actor->spr.__int_angle + delta_ang);
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + delta_ang);
actor->set_int_pos(pos);
}
@ -1760,7 +1760,7 @@ PlayerPart:
SetActorZ(sop->so_actors[i], actor->int_pos());
}
actor->user.oangdiff += getincangle(oldang, actor->spr.__int_angle);
actor->user.oangdiff += getincangle(oldang, actor->int_ang());
if ((actor->spr.extra & SPRX_BLADE))
{
@ -3312,12 +3312,12 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
// determine where the player is supposed to be in relation to the ladder
// move out in front of the ladder
nx = MOVEx(100, lActor->spr.__int_angle);
ny = MOVEy(100, lActor->spr.__int_angle);
nx = MOVEx(100, lActor->int_ang());
ny = MOVEy(100, lActor->int_ang());
actor->set_int_xy(lActor->int_pos().X + nx, lActor->int_pos().Y + ny);
actor->spr.__int_angle = NORM_ANGLE(lActor->spr.__int_angle + 1024);
actor->spr.__int_angle = NORM_ANGLE(lActor->int_ang() + 1024);
//
// Get the z height to climb

File diff suppressed because it is too large Load diff