mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- more int_ang()
This commit is contained in:
parent
33d5b54ce0
commit
f54e4b8a9a
101 changed files with 776 additions and 776 deletions
|
@ -41,7 +41,7 @@ static inline void get_wallspr_points(DCoreActor* actor, int32_t *x1, int32_t *x
|
|||
//These lines get the 2 points of the rotated sprite
|
||||
//Given: (x1, y1) starts out as the center point
|
||||
|
||||
const int32_t tilenum=actor->spr.picnum, ang=actor->spr.__int_angle;
|
||||
const int32_t tilenum=actor->spr.picnum, ang=actor->int_ang();
|
||||
const int32_t xrepeat = actor->spr.xrepeat;
|
||||
int32_t xoff = tileLeftOffset(tilenum) + actor->spr.xoffset;
|
||||
int32_t k, l, dax, day;
|
||||
|
|
|
@ -185,7 +185,7 @@ public:
|
|||
|
||||
int16_t interpolatedang(double const smoothratio)
|
||||
{
|
||||
return interpolatedangle(oang, spr.__int_angle, smoothratio, 16);
|
||||
return interpolatedangle(oang, int_ang(), smoothratio, 16);
|
||||
}
|
||||
|
||||
void backupx()
|
||||
|
@ -216,7 +216,7 @@ public:
|
|||
|
||||
void backupang()
|
||||
{
|
||||
oang = spr.__int_angle;
|
||||
oang = int_ang();
|
||||
}
|
||||
|
||||
void backuploc()
|
||||
|
|
|
@ -305,8 +305,8 @@ void GetWallSpritePosition(const tspritetype* spr, vec2_t pos, vec2_t* out, bool
|
|||
leftofs = ((int)tex->GetDisplayLeftOffset() + spr->xoffset);
|
||||
}
|
||||
|
||||
int x = bsin(spr->__int_angle) * spr->xrepeat;
|
||||
int y = -bcos(spr->__int_angle) * spr->xrepeat;
|
||||
int x = bsin(spr->int_ang()) * spr->xrepeat;
|
||||
int y = -bcos(spr->int_ang()) * spr->xrepeat;
|
||||
|
||||
int xoff = leftofs;
|
||||
if (spr->cstat & CSTAT_SPRITE_XFLIP) xoff = -xoff;
|
||||
|
@ -571,7 +571,7 @@ tspritetype* renderAddTsprite(tspriteArray& tsprites, DCoreActor* actor)
|
|||
tspr->yoffset = actor->spr.yoffset;
|
||||
tspr->sectp = actor->spr.sectp;
|
||||
tspr->statnum = actor->spr.statnum;
|
||||
tspr->__int_angle = actor->spr.__int_angle;
|
||||
tspr->__int_angle = actor->int_ang();
|
||||
tspr->xvel = actor->spr.xvel;
|
||||
tspr->yvel = actor->spr.yvel;
|
||||
tspr->zvel = actor->spr.zvel;
|
||||
|
|
|
@ -684,7 +684,7 @@ void BunchDrawer::ProcessSection(int sectionnum, bool portal)
|
|||
if ((actor->spr.cstat & (CSTAT_SPRITE_ONE_SIDE | CSTAT_SPRITE_ALIGNMENT_MASK)) != (CSTAT_SPRITE_ONE_SIDE | CSTAT_SPRITE_ALIGNMENT_WALL) ||
|
||||
(r_voxels && tiletovox[actor->spr.picnum] >= 0 && voxmodels[tiletovox[actor->spr.picnum]]) ||
|
||||
(r_voxels && gi->Voxelize(actor->spr.picnum) > -1) ||
|
||||
DMulScale(bcos(actor->spr.__int_angle), -sx, bsin(actor->spr.__int_angle), -sy, 6) > 0)
|
||||
DMulScale(bcos(actor->int_ang()), -sx, bsin(actor->int_ang()), -sy, 6) > 0)
|
||||
if (!renderAddTsprite(di->tsprites, actor))
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -318,13 +318,13 @@ void HWDrawInfo::DispatchSprites()
|
|||
|
||||
if (actor->sprext.renderflags & SPREXT_AWAY1)
|
||||
{
|
||||
tspr->add_int_x(bcos(tspr->__int_angle, -13));
|
||||
tspr->add_int_y(bsin(tspr->__int_angle, -13));
|
||||
tspr->add_int_x(bcos(tspr->int_ang(), -13));
|
||||
tspr->add_int_y(bsin(tspr->int_ang(), -13));
|
||||
}
|
||||
else if (actor->sprext.renderflags & SPREXT_AWAY2)
|
||||
{
|
||||
tspr->add_int_x(-bcos(tspr->__int_angle, -13));
|
||||
tspr->add_int_y(-bsin(tspr->__int_angle, -13));
|
||||
tspr->add_int_x(-bcos(tspr->int_ang(), -13));
|
||||
tspr->add_int_y(-bsin(tspr->int_ang(), -13));
|
||||
}
|
||||
|
||||
switch (tspr->cstat & CSTAT_SPRITE_ALIGNMENT_MASK)
|
||||
|
|
|
@ -63,13 +63,13 @@ static walltype* IsOnWall(tspritetype* tspr, int height, DVector2& outpos)
|
|||
// Intentionally include two sided walls. Even on them the sprite should be projected onto the wall for better results.
|
||||
auto d = wal.delta();
|
||||
int walang = getangle(d.X, d.Y);
|
||||
int deltaang = abs((((walang - tspr->__int_angle) & 2047) << 21) >> 21);
|
||||
int deltaang = abs((((walang - tspr->int_ang()) & 2047) << 21) >> 21);
|
||||
const int maxangdelta = 1;
|
||||
|
||||
// angle of the sprite must either be the wall's normal or the negative wall's normal to be aligned.
|
||||
if (deltaang >= 512 - maxangdelta && deltaang <= 512 + maxangdelta)
|
||||
{
|
||||
if (!((tspr->__int_angle) & 510))
|
||||
if (!((tspr->int_ang()) & 510))
|
||||
{
|
||||
// orthogonal lines do not check the actual position so that certain off-sector sprites get handled properly.
|
||||
// In Wanton Destruction's airplane level there's such a sprite assigned to the wrong sector.
|
||||
|
@ -1102,7 +1102,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec
|
|||
int HWWall::CheckWallSprite(tspritetype* spr, tspritetype* last)
|
||||
{
|
||||
// If the position changed we need to recalculate everything.
|
||||
if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->__int_angle != last->__int_angle) return 3;
|
||||
if (spr->pos.XY() != last->pos.XY() || spr->sectp != last->sectp || spr->__int_angle != last->int_ang()) return 3;
|
||||
|
||||
// if the horizontal orientation changes we need to recalculate the walls this attaches to, but not the positioning.
|
||||
if (spr->xrepeat != last->xrepeat || spr->xoffset != last->xoffset || spr->picnum != last->picnum || ((spr->cstat ^ last->cstat) & CSTAT_SPRITE_XFLIP)) return 2;
|
||||
|
|
|
@ -2724,7 +2724,7 @@ static void actNapalmMove(DBloodActor* actor)
|
|||
int spawnparam[2];
|
||||
spawnparam[0] = actor->xspr.data4 >> 1;
|
||||
spawnparam[1] = actor->xspr.data4 - spawnparam[0];
|
||||
int ang = actor->spr.__int_angle;
|
||||
int ang = actor->int_ang();
|
||||
actor->vel.X = 0;
|
||||
actor->vel.Y = 0;
|
||||
actor->vel.Z = 0;
|
||||
|
@ -3862,7 +3862,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
|||
if (missileActor->hasX())
|
||||
{
|
||||
actPostSprite(missileActor, kStatDecoration);
|
||||
if (missileActor->spr.__int_angle == 1024) sfxPlay3DSound(missileActor, 307, -1, 0);
|
||||
if (missileActor->int_ang() == 1024) sfxPlay3DSound(missileActor, 307, -1, 0);
|
||||
missileActor->spr.type = kSpriteDecoration;
|
||||
seqSpawn(9, missileActor, -1);
|
||||
}
|
||||
|
@ -3974,7 +3974,7 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
|||
missileActor->spr.picnum = 2123;
|
||||
missileActor->SetTarget(actorHit);
|
||||
missileActor->xspr.TargetPos.Z = missileActor->int_pos().Z - actorHit->int_pos().Z;
|
||||
missileActor->xspr.goalAng = getangle(missileActor->int_pos().X - actorHit->int_pos().X, missileActor->int_pos().Y - actorHit->int_pos().Y) - actorHit->spr.__int_angle;
|
||||
missileActor->xspr.goalAng = getangle(missileActor->int_pos().X - actorHit->int_pos().X, missileActor->int_pos().Y - actorHit->int_pos().Y) - actorHit->int_ang();
|
||||
missileActor->xspr.state = 1;
|
||||
actPostSprite(missileActor, kStatFlare);
|
||||
missileActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -5953,8 +5953,8 @@ static void actCheckTraps()
|
|||
int y = actor->int_pos().Y;
|
||||
int z = actor->int_pos().Z;
|
||||
int t = (actor->xspr.data1 << 23) / 120;
|
||||
int dx = MulScale(t, Cos(actor->spr.__int_angle), 30);
|
||||
int dy = MulScale(t, Sin(actor->spr.__int_angle), 30);
|
||||
int dx = MulScale(t, Cos(actor->int_ang()), 30);
|
||||
int dy = MulScale(t, Sin(actor->int_ang()), 30);
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), x, y, z, 0);
|
||||
|
@ -6150,8 +6150,8 @@ void actCheckFlares()
|
|||
}
|
||||
if (target->hasX() && target->xspr.health > 0)
|
||||
{
|
||||
int x = target->int_pos().X + mulscale30r(Cos(actor->xspr.goalAng + target->spr.__int_angle), target->spr.clipdist * 2);
|
||||
int y = target->int_pos().Y + mulscale30r(Sin(actor->xspr.goalAng + target->spr.__int_angle), target->spr.clipdist * 2);
|
||||
int x = target->int_pos().X + mulscale30r(Cos(actor->xspr.goalAng + target->int_ang()), target->spr.clipdist * 2);
|
||||
int y = target->int_pos().Y + mulscale30r(Sin(actor->xspr.goalAng + target->int_ang()), target->spr.clipdist * 2);
|
||||
int z = target->int_pos().Z + actor->xspr.TargetPos.Z;
|
||||
vec3_t pos = { x, y, z };
|
||||
SetActor(actor, &pos);
|
||||
|
@ -6243,7 +6243,7 @@ DBloodActor* actSpawnDude(DBloodActor* source, int nType, int a3, int a4)
|
|||
{
|
||||
auto spawned = actSpawnSprite(source, kStatDude);
|
||||
if (!spawned) return nullptr;
|
||||
int angle = source->spr.__int_angle;
|
||||
int angle = source->int_ang();
|
||||
int nDude = nType - kDudeBase;
|
||||
int x, y, z;
|
||||
z = a4 + source->int_pos().Z;
|
||||
|
@ -6410,18 +6410,18 @@ DBloodActor* actFireThing(DBloodActor* actor, int a2, int a3, int a4, int thingT
|
|||
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);
|
||||
x += MulScale(actor->spr.clipdist, Cos(actor->int_ang()), 28);
|
||||
y += MulScale(actor->spr.clipdist, Sin(actor->int_ang()), 28);
|
||||
if (HitScan(actor, z, x - actor->int_pos().X, y - actor->int_pos().Y, 0, CLIPMASK0, actor->spr.clipdist) != -1)
|
||||
{
|
||||
x = gHitInfo.hitpos.X - MulScale(actor->spr.clipdist << 1, Cos(actor->spr.__int_angle), 28);
|
||||
y = gHitInfo.hitpos.Y - MulScale(actor->spr.clipdist << 1, Sin(actor->spr.__int_angle), 28);
|
||||
x = gHitInfo.hitpos.X - MulScale(actor->spr.clipdist << 1, Cos(actor->int_ang()), 28);
|
||||
y = gHitInfo.hitpos.Y - MulScale(actor->spr.clipdist << 1, Sin(actor->int_ang()), 28);
|
||||
}
|
||||
auto fired = actSpawnThing(actor->sector(), x, y, z, thingType);
|
||||
fired->SetOwner(actor);
|
||||
fired->spr.__int_angle = actor->spr.__int_angle;
|
||||
fired->vel.X = MulScale(a6, Cos(fired->spr.__int_angle), 30);
|
||||
fired->vel.Y = MulScale(a6, Sin(fired->spr.__int_angle), 30);
|
||||
fired->spr.__int_angle = actor->int_ang();
|
||||
fired->vel.X = MulScale(a6, Cos(fired->int_ang()), 30);
|
||||
fired->vel.Y = MulScale(a6, Sin(fired->int_ang()), 30);
|
||||
fired->vel.Z = MulScale(a6, a4, 14);
|
||||
fired->vel.X += actor->vel.X / 2;
|
||||
fired->vel.Y += actor->vel.Y / 2;
|
||||
|
@ -6523,21 +6523,21 @@ DBloodActor* actFireMissile(DBloodActor* actor, int a2, int a3, int a4, int a5,
|
|||
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);
|
||||
y += MulScale(clipdist, Sin(actor->spr.__int_angle), 28);
|
||||
x += MulScale(clipdist, Cos(actor->int_ang()), 28);
|
||||
y += MulScale(clipdist, Sin(actor->int_ang()), 28);
|
||||
int hit = HitScan(actor, z, x - actor->int_pos().X, y - actor->int_pos().Y, 0, CLIPMASK0, clipdist);
|
||||
if (hit != -1)
|
||||
{
|
||||
if (hit == 3 || hit == 0)
|
||||
{
|
||||
impact = true;
|
||||
x = gHitInfo.hitpos.X - MulScale(Cos(actor->spr.__int_angle), 16, 30);
|
||||
y = gHitInfo.hitpos.Y - MulScale(Sin(actor->spr.__int_angle), 16, 30);
|
||||
x = gHitInfo.hitpos.X - MulScale(Cos(actor->int_ang()), 16, 30);
|
||||
y = gHitInfo.hitpos.Y - MulScale(Sin(actor->int_ang()), 16, 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
x = gHitInfo.hitpos.X - MulScale(pMissileInfo->clipDist << 1, Cos(actor->spr.__int_angle), 28);
|
||||
y = gHitInfo.hitpos.Y - MulScale(pMissileInfo->clipDist << 1, Sin(actor->spr.__int_angle), 28);
|
||||
x = gHitInfo.hitpos.X - MulScale(pMissileInfo->clipDist << 1, Cos(actor->int_ang()), 28);
|
||||
y = gHitInfo.hitpos.Y - MulScale(pMissileInfo->clipDist << 1, Sin(actor->int_ang()), 28);
|
||||
}
|
||||
}
|
||||
auto spawned = actSpawnSprite(actor->sector(), x, y, z, 5, 1);
|
||||
|
|
|
@ -250,7 +250,7 @@ bool CanMove(DBloodActor* actor, DBloodActor* target, int nAngle, int nRange)
|
|||
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 vc = ((a3 + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
int nSin = Sin(actor->int_ang());
|
||||
int dx = actor->vel.X;
|
||||
|
@ -268,8 +268,8 @@ void aiChooseDirection(DBloodActor* actor, int a3)
|
|||
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->int_ang(), vsi))
|
||||
actor->xspr.goalAng = actor->int_ang();
|
||||
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
|
||||
actor->xspr.goalAng = actor->int_ang() - v8;
|
||||
//else if (actor->spr.flags&2)
|
||||
|
@ -298,13 +298,13 @@ void aiMoveForward(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
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);
|
||||
actor->vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->spr.__int_angle), 30);
|
||||
actor->vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -317,7 +317,7 @@ void aiMoveTurn(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ void aiMoveDodge(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
if (actor->xspr.dodgeDir)
|
||||
|
@ -1520,7 +1520,7 @@ void aiThinkTarget(DBloodActor* actor)
|
|||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, pPlayer->actor);
|
||||
|
@ -1565,7 +1565,7 @@ void aiLookForTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, pPlayer->actor);
|
||||
|
|
|
@ -108,7 +108,7 @@ static void batThinkTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, pPlayer->actor);
|
||||
|
@ -168,7 +168,7 @@ static void batThinkPonder(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
int height2 = (getDudeInfo(pTarget->spr.type)->eyeHeight * pTarget->spr.yrepeat) << 2;
|
||||
int top, bottom;
|
||||
|
@ -203,7 +203,7 @@ static void batMoveDodgeUp(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
|
@ -226,7 +226,7 @@ static void batMoveDodgeDown(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
if (actor->xspr.dodgeDir == 0)
|
||||
|
@ -274,7 +274,7 @@ static void batThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
// Should be dudeInfo[pTarget->spr.type-kDudeBase]
|
||||
int height2 = (pDudeInfo->eyeHeight * pTarget->spr.yrepeat) << 2;
|
||||
|
@ -310,7 +310,7 @@ static void batMoveForward(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -341,7 +341,7 @@ static void batMoveSwoop(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -371,7 +371,7 @@ static void batMoveFly(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
|
|
@ -238,7 +238,7 @@ static void beastThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
@ -368,7 +368,7 @@ static void beastThinkSwimChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = pDudeInfo->eyeHeight + actor->int_pos().Z;
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
@ -398,7 +398,7 @@ static void beastMoveForward(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
if (abs(nAng) > 341)
|
||||
|
@ -408,15 +408,15 @@ static void beastMoveForward(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= 0x400 && Random(64) < 32)
|
||||
return;
|
||||
actor->vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->spr.__int_angle), 30);
|
||||
actor->vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->spr.__int_angle), 30);
|
||||
actor->vel.X += MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->vel.Y += MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
|
||||
static void sub_628A0(DBloodActor* actor)
|
||||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -451,7 +451,7 @@ static void sub_62AE0(DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
|
||||
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -486,7 +486,7 @@ static void sub_62D7C(DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
|
||||
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
|
|
@ -120,7 +120,7 @@ static void eelThinkTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
|
@ -182,7 +182,7 @@ static void eelThinkPonder(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
int height2 = (getDudeInfo(target->spr.type)->eyeHeight * target->spr.yrepeat) << 2;
|
||||
int top, bottom;
|
||||
|
@ -217,7 +217,7 @@ static void eelMoveDodgeUp(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
|
@ -240,7 +240,7 @@ static void eelMoveDodgeDown(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
if (actor->xspr.dodgeDir == 0)
|
||||
|
@ -288,7 +288,7 @@ static void eelThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
@ -320,7 +320,7 @@ static void eelMoveForward(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
|
||||
|
@ -351,7 +351,7 @@ static void eelMoveSwoop(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
|
||||
|
@ -378,7 +378,7 @@ static void eelMoveAscend(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 26) / 120) / 120) << 2;
|
||||
|
|
|
@ -193,7 +193,7 @@ static void burnThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -151,7 +151,7 @@ static void calebThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ static void calebThinkSwimChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = pDudeInfo->eyeHeight + actor->int_pos().Z;
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
@ -276,7 +276,7 @@ static void sub_65D04(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -312,7 +312,7 @@ static void sub_65F44(DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
|
||||
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -348,7 +348,7 @@ static void sub_661E0(DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
|
||||
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
|
|
@ -104,8 +104,8 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
|
|||
y2 += (actor2->vel.Y * t) >> 12;
|
||||
z2 += (actor2->vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->spr.__int_angle), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->spr.__int_angle), nDist, 30);
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
int tz = z + MulScale(actor->dudeSlope, nDist, 10);
|
||||
int tsr = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -181,8 +181,8 @@ void cerberusBurnSeqCallback2(int, DBloodActor* actor)
|
|||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->spr.__int_angle), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->spr.__int_angle), nDist, 30);
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
int tz = z + MulScale(actor->dudeSlope, nDist, 10);
|
||||
int tsr = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -269,7 +269,7 @@ static void cerberusThinkTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
|
@ -371,7 +371,7 @@ static void cerberusThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -273,7 +273,7 @@ static void cultThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist > 0 && nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -133,8 +133,8 @@ void BlastSSeqCallback(int, DBloodActor* actor)
|
|||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->spr.__int_angle), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->spr.__int_angle), nDist, 30);
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
int tz = z + MulScale(actor->dudeSlope, nDist, 10);
|
||||
int tsr = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -229,7 +229,7 @@ static void gargThinkTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
|
@ -279,7 +279,7 @@ static void gargMoveDodgeUp(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
|
@ -305,7 +305,7 @@ static void gargMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
if (actor->xspr.dodgeDir == 0)
|
||||
|
@ -357,7 +357,7 @@ static void gargThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
// Should be dudeInfo[target->spr.type-kDudeBase]
|
||||
int height2 = (pDudeInfo->eyeHeight * target->spr.yrepeat) << 2;
|
||||
|
@ -523,7 +523,7 @@ static void gargMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -557,7 +557,7 @@ static void gargMoveSlow(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -598,7 +598,7 @@ static void gargMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -638,7 +638,7 @@ static void gargMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
|
|
@ -119,8 +119,8 @@ void ghostBlastSeqCallback(int, DBloodActor* actor)
|
|||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->spr.__int_angle), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->spr.__int_angle), nDist, 30);
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
int tz = z + MulScale(actor->dudeSlope, nDist, 10);
|
||||
int tsr = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -209,7 +209,7 @@ static void ghostThinkTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
|
@ -258,7 +258,7 @@ static void ghostMoveDodgeUp(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nCos = Cos(actor->int_ang());
|
||||
|
@ -284,7 +284,7 @@ static void ghostMoveDodgeDown(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
if (actor->xspr.dodgeDir == 0)
|
||||
|
@ -336,7 +336,7 @@ static void ghostThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
// Should be dudeInfo[target->spr.type-kDudeBase]
|
||||
int height2 = (pDudeInfo->eyeHeight * target->spr.yrepeat) << 2;
|
||||
|
@ -419,7 +419,7 @@ static void ghostMoveForward(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -453,7 +453,7 @@ static void ghostMoveSlow(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -491,7 +491,7 @@ static void ghostMoveSwoop(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -528,7 +528,7 @@ static void ghostMoveFly(DBloodActor* actor)
|
|||
return;
|
||||
}
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
|
|
@ -139,7 +139,7 @@ static void gillThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ static void gillThinkSwimChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = pDudeInfo->eyeHeight + actor->int_pos().Z;
|
||||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
|
@ -266,7 +266,7 @@ static void sub_6CB00(DBloodActor* actor)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
|
||||
|
@ -301,7 +301,7 @@ static void sub_6CD74(DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
|
||||
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
|
||||
|
@ -336,7 +336,7 @@ static void sub_6D03C(DBloodActor* actor)
|
|||
auto target = actor->GetTarget();
|
||||
int z = actor->int_pos().Z + getDudeInfo(actor->spr.type)->eyeHeight;
|
||||
int z2 = target->int_pos().Z + getDudeInfo(target->spr.type)->eyeHeight;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = (pDudeInfo->frontSpeed - (((4 - gGameOptions.nDifficulty) << 27) / 120) / 120) << 2;
|
||||
|
|
|
@ -104,7 +104,7 @@ static void handThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ void houndBiteSeqCallback(int, DBloodActor* actor)
|
|||
|
||||
void houndBurnSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
actFireMissile(actor, 0, 0, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0, kMissileFlameHound);
|
||||
actFireMissile(actor, 0, 0, bcos(actor->int_ang()), bsin(actor->int_ang()), 0, kMissileFlameHound);
|
||||
}
|
||||
|
||||
static void houndThinkSearch(DBloodActor* actor)
|
||||
|
@ -121,7 +121,7 @@ static void houndThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -88,7 +88,7 @@ static void innocThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -201,7 +201,7 @@ static void aiPodChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -99,7 +99,7 @@ static void ratThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -207,7 +207,7 @@ static void spidThinkChase(DBloodActor* actor)
|
|||
}
|
||||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist) {
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector())) {
|
||||
|
|
|
@ -88,8 +88,8 @@ void sub_71BD4(int, DBloodActor* actor)
|
|||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->spr.__int_angle), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->spr.__int_angle), nDist, 30);
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
int tz = z + MulScale(actor->dudeSlope, nDist, 10);
|
||||
int tsr = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -160,8 +160,8 @@ void sub_720AC(int, DBloodActor* actor)
|
|||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
}
|
||||
int tx = x + MulScale(Cos(actor->spr.__int_angle), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->spr.__int_angle), nDist, 30);
|
||||
int tx = x + MulScale(Cos(actor->int_ang()), nDist, 30);
|
||||
int ty = y + MulScale(Sin(actor->int_ang()), nDist, 30);
|
||||
int tz = z + MulScale(actor->dudeSlope, nDist, 10);
|
||||
int tsr = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -236,7 +236,7 @@ static void sub_725A4(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
pDudeExtraE->thinkTime = 0;
|
||||
|
@ -304,7 +304,7 @@ static void sub_72934(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ static bool genDudeAdjustSlope(DBloodActor* actor, int dist, int weaponType, int
|
|||
|
||||
for (int i = -8191; i < 8192; i += by)
|
||||
{
|
||||
HitScan(actor, actor->int_pos().Z, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), i, clipMask, dist);
|
||||
HitScan(actor, actor->int_pos().Z, bcos(actor->int_ang()), bsin(actor->int_ang()), i, clipMask, dist);
|
||||
if (!fStart && actor->GetTarget() == gHitInfo.actor()) fStart = i;
|
||||
else if (fStart && actor->GetTarget() != gHitInfo.actor())
|
||||
{
|
||||
|
@ -516,7 +516,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
}
|
||||
|
||||
DUDEINFO* pDudeInfo = getDudeInfo(actor->spr.type);
|
||||
int losAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int losAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int eyeAboveZ = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
|
||||
if (dist > pDudeInfo->seeDist || !cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(),
|
||||
|
@ -744,9 +744,9 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
{
|
||||
int objDist = -1; int targetDist = -1; int hit = -1;
|
||||
if (weaponType == kGenDudeWeaponHitscan)
|
||||
hit = HitScan(actor, actor->int_pos().Z, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), actor->dudeSlope, CLIPMASK1, dist);
|
||||
hit = HitScan(actor, actor->int_pos().Z, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, CLIPMASK1, dist);
|
||||
else if (weaponType == kGenDudeWeaponMissile)
|
||||
hit = HitScan(actor, actor->int_pos().Z, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), actor->dudeSlope, CLIPMASK0, dist);
|
||||
hit = HitScan(actor, actor->int_pos().Z, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, CLIPMASK0, dist);
|
||||
|
||||
if (hit >= 0)
|
||||
{
|
||||
|
@ -859,7 +859,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
else if (weaponType == kGenDudeWeaponHitscan && hscn)
|
||||
{
|
||||
if (genDudeAdjustSlope(actor, dist, weaponType)) break;
|
||||
VectorScan(actor, 0, 0, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), actor->dudeSlope, dist, 1);
|
||||
VectorScan(actor, 0, 0, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, dist, 1);
|
||||
if (actor == gHitInfo.actor()) break;
|
||||
|
||||
bool immune = nnExtIsImmune(hitactor, gVectorData[curWeapon].dmgType);
|
||||
|
@ -919,7 +919,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
|||
if (hit == 4 && weaponType == kGenDudeWeaponHitscan && hscn)
|
||||
{
|
||||
bool masked = (pHWall->cstat & CSTAT_WALL_MASKED);
|
||||
if (masked) VectorScan(actor, 0, 0, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), actor->dudeSlope, dist, 1);
|
||||
if (masked) VectorScan(actor, 0, 0, bcos(actor->int_ang()), bsin(actor->int_ang()), actor->dudeSlope, dist, 1);
|
||||
|
||||
if ((actor != gHitInfo.actor()) && (pHWall->type != kWallGib || !masked || pXHWall == NULL || !pXHWall->triggerVector || pXHWall->locked))
|
||||
{
|
||||
|
@ -1114,7 +1114,7 @@ void aiGenDudeMoveForward(DBloodActor* actor)
|
|||
|
||||
if (pExtra->canFly)
|
||||
{
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
int nAccel = pDudeInfo->frontSpeed << 2;
|
||||
|
@ -1142,7 +1142,7 @@ void aiGenDudeMoveForward(DBloodActor* actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
int dang = ((kAng180 + actor->xspr.goalAng - actor->spr.__int_angle) & 2047) - kAng180;
|
||||
int dang = ((kAng180 + actor->xspr.goalAng - actor->int_ang()) & 2047) - kAng180;
|
||||
actor->spr.__int_angle = ((actor->int_ang() + ClipRange(dang, -maxTurn, maxTurn)) & 2047);
|
||||
|
||||
// don't move forward if trying to turn around
|
||||
|
@ -1174,8 +1174,8 @@ void aiGenDudeChooseDirection(DBloodActor* actor, int a3, int xvel, int yvel)
|
|||
|
||||
// TO-DO: Take in account if sprite is flip-x, so enemy select correct angle
|
||||
|
||||
int vc = ((a3 + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int t1 = DMulScale(xvel, Cos(actor->spr.__int_angle), yvel, Sin(actor->spr.__int_angle), 30);
|
||||
int vc = ((a3 + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int t1 = DMulScale(xvel, Cos(actor->int_ang()), yvel, Sin(actor->int_ang()), 30);
|
||||
int vsi = ((t1 * 15) >> 12) / 2; int v8 = (vc >= 0) ? 341 : -341;
|
||||
|
||||
if (CanMove(actor, actor->GetTarget(), actor->int_ang() + vc, vsi))
|
||||
|
@ -1186,8 +1186,8 @@ void aiGenDudeChooseDirection(DBloodActor* actor, int a3, int xvel, int yvel)
|
|||
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->int_ang(), vsi))
|
||||
actor->xspr.goalAng = actor->int_ang();
|
||||
else if (CanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
|
||||
actor->xspr.goalAng = actor->int_ang() - v8;
|
||||
else
|
||||
|
@ -1800,7 +1800,7 @@ void dudeLeechOperate(DBloodActor* actor, const EVENT& event)
|
|||
int t = DivScale(nDist, 0x1aaaaa, 12);
|
||||
x += (actTarget->vel.X * t) >> 12;
|
||||
y += (actTarget->vel.Y * t) >> 12;
|
||||
int angBak = actor->spr.__int_angle;
|
||||
int angBak = actor->int_ang();
|
||||
actor->spr.__int_angle = getangle(x - actor->int_pos().X, y - actor->int_pos().Y);
|
||||
int dx = bcos(actor->int_ang());
|
||||
int dy = bsin(actor->int_ang());
|
||||
|
@ -1875,7 +1875,7 @@ bool doExplosion(DBloodActor* actor, int nType)
|
|||
DBloodActor* genDudeSpawn(DBloodActor* source, DBloodActor* actor, int nDist)
|
||||
{
|
||||
auto spawned = actSpawnSprite(actor, kStatDude);
|
||||
int x, y, z = actor->int_pos().Z, nAngle = actor->spr.__int_angle, nType = kDudeModernCustom;
|
||||
int x, y, z = actor->int_pos().Z, nAngle = actor->int_ang(), nType = kDudeModernCustom;
|
||||
|
||||
if (nDist > 0)
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ static void zombaThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ static void zombaThinkPonder(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ static void myThinkTarget(DBloodActor* actor)
|
|||
continue;
|
||||
if (!cansee(x, y, z, pSector, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - ((pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2), actor->sector()))
|
||||
continue;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
if (nDist < pDudeInfo->seeDist && abs(nDeltaAngle) <= pDudeInfo->periphery)
|
||||
{
|
||||
aiSetTarget(actor, pPlayer->actor);
|
||||
|
|
|
@ -55,7 +55,7 @@ void zombfHackSeqCallback(int, DBloodActor* actor)
|
|||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat);
|
||||
DUDEINFO* pDudeInfoT = getDudeInfo(target->spr.type);
|
||||
int height2 = (pDudeInfoT->eyeHeight * target->spr.yrepeat);
|
||||
actFireVector(actor, 0, 0, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), height - height2, kVectorCleaver);
|
||||
actFireVector(actor, 0, 0, bcos(actor->int_ang()), bsin(actor->int_ang()), height - height2, kVectorCleaver);
|
||||
}
|
||||
|
||||
void PukeSeqCallback(int, DBloodActor* actor)
|
||||
|
@ -77,7 +77,7 @@ void PukeSeqCallback(int, DBloodActor* actor)
|
|||
|
||||
void ThrowSeqCallback(int, DBloodActor* actor)
|
||||
{
|
||||
actFireMissile(actor, 0, -getDudeInfo(actor->spr.type)->eyeHeight, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0, kMissileButcherKnife);
|
||||
actFireMissile(actor, 0, -getDudeInfo(actor->spr.type)->eyeHeight, bcos(actor->int_ang()), bsin(actor->int_ang()), 0, kMissileButcherKnife);
|
||||
}
|
||||
|
||||
static void zombfThinkSearch(DBloodActor* actor)
|
||||
|
@ -128,7 +128,7 @@ static void zombfThinkChase(DBloodActor* actor)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist <= pDudeInfo->seeDist)
|
||||
{
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nDeltaAngle = ((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int height = (pDudeInfo->eyeHeight * actor->spr.yrepeat) << 2;
|
||||
if (cansee(target->int_pos().X, target->int_pos().Y, target->int_pos().Z, target->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - height, actor->sector()))
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ tspritetype* viewInsertTSprite(tspriteArray& tsprites, sectortype* pSector, int
|
|||
{
|
||||
pos = parentTSprite->pos;
|
||||
pTSprite->ownerActor = parentTSprite->ownerActor;
|
||||
pTSprite->__int_angle = parentTSprite->__int_angle;
|
||||
pTSprite->__int_angle = parentTSprite->int_ang();
|
||||
}
|
||||
pos.X += gCameraAng.fcos() * 2;
|
||||
pos.Y += gCameraAng.fsin() * 2;
|
||||
|
@ -272,7 +272,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
}
|
||||
case kViewEffectTrail:
|
||||
{
|
||||
int nAng = pTSprite->__int_angle;
|
||||
int nAng = pTSprite->int_ang();
|
||||
if (pTSprite->cstat & CSTAT_SPRITE_ALIGNMENT_WALL)
|
||||
{
|
||||
nAng = (nAng + 512) & 2047;
|
||||
|
@ -451,7 +451,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pal = 2;
|
||||
pNSprite->xrepeat = pNSprite->yrepeat = 64;
|
||||
pNSprite->cstat |= CSTAT_SPRITE_ONE_SIDE | CSTAT_SPRITE_ALIGNMENT_FLOOR | CSTAT_SPRITE_YFLIP | CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->__int_angle = pTSprite->__int_angle;
|
||||
pNSprite->__int_angle = pTSprite->int_ang();
|
||||
pNSprite->ownerActor = pTSprite->ownerActor;
|
||||
break;
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pal = 2;
|
||||
pNSprite->xrepeat = pNSprite->yrepeat = nShade;
|
||||
pNSprite->cstat |= CSTAT_SPRITE_ONE_SIDE | CSTAT_SPRITE_ALIGNMENT_FLOOR | CSTAT_SPRITE_TRANSLUCENT;
|
||||
pNSprite->__int_angle = pTSprite->__int_angle;
|
||||
pNSprite->__int_angle = pTSprite->int_ang();
|
||||
pNSprite->ownerActor = pTSprite->ownerActor;
|
||||
break;
|
||||
}
|
||||
|
@ -513,8 +513,8 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->picnum = nVoxel;
|
||||
if (pPlayer->curWeapon == kWeapLifeLeech) // position lifeleech behind player
|
||||
{
|
||||
pNSprite->add_int_x(MulScale(128, Cos(gView->actor->spr.__int_angle), 30));
|
||||
pNSprite->add_int_y(MulScale(128, Sin(gView->actor->spr.__int_angle), 30));
|
||||
pNSprite->add_int_x(MulScale(128, Cos(gView->actor->int_ang()), 30));
|
||||
pNSprite->add_int_y(MulScale(128, Sin(gView->actor->int_ang()), 30));
|
||||
}
|
||||
if ((pPlayer->curWeapon == kWeapLifeLeech) || (pPlayer->curWeapon == kWeapVoodooDoll)) // make lifeleech/voodoo doll always face viewer like sprite
|
||||
pNSprite->__int_angle = (pNSprite->int_ang() + 512) & 2047; // offset angle 90 degrees
|
||||
|
@ -902,8 +902,8 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
|
|||
auto pNTSprite = viewAddEffect(tsprites, nTSprite, kViewEffectShoot);
|
||||
if (pNTSprite) {
|
||||
POSTURE* pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture];
|
||||
pNTSprite->add_int_x(MulScale(pPosture->zOffset, Cos(pTSprite->__int_angle), 28));
|
||||
pNTSprite->add_int_y(MulScale(pPosture->zOffset, Sin(pTSprite->__int_angle), 28));
|
||||
pNTSprite->add_int_x(MulScale(pPosture->zOffset, Cos(pTSprite->int_ang()), 28));
|
||||
pNTSprite->add_int_y(MulScale(pPosture->zOffset, Sin(pTSprite->int_ang()), 28));
|
||||
pNTSprite->set_int_z(pPlayer->actor->int_pos().Z - pPosture->xOffset);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -467,7 +467,7 @@ void fxBloodBits(DBloodActor* actor, sectortype*) // 14
|
|||
int x = actor->int_pos().X + MulScale(nDist, Cos(nAngle), 28);
|
||||
int y = actor->int_pos().Y + MulScale(nDist, Sin(nAngle), 28);
|
||||
gFX.fxSpawnActor(FX_48, actor->sector(), x, y, actor->int_pos().Z, 0);
|
||||
if (actor->spr.__int_angle == 1024)
|
||||
if (actor->int_ang() == 1024)
|
||||
{
|
||||
int nChannel = 28 + (actor->GetIndex() & 2); // this is a little stupid...
|
||||
sfxPlay3DSound(actor, 385, nChannel, 1);
|
||||
|
@ -653,7 +653,7 @@ void fxPodBloodSplat(DBloodActor* actor, sectortype*) // 19
|
|||
int nDist = Random(16) << 4;
|
||||
int x = actor->int_pos().X + MulScale(nDist, Cos(nAngle), 28);
|
||||
int y = actor->int_pos().Y + MulScale(nDist, Sin(nAngle), 28);
|
||||
if (actor->spr.__int_angle == 1024 && actor->spr.type == 53)
|
||||
if (actor->int_ang() == 1024 && actor->spr.type == 53)
|
||||
{
|
||||
int nChannel = 28 + (actor->GetIndex() & 2);
|
||||
assert(nChannel < 32);
|
||||
|
@ -709,7 +709,7 @@ void sub_76A08(DBloodActor* actor, DBloodActor* actor2, PLAYER* pPlayer) // ???
|
|||
int top, bottom;
|
||||
GetActorExtents(actor, &top, &bottom);
|
||||
actor->set_int_pos({ actor2->int_pos().X, actor2->int_pos().Y, actor2->sector()->int_floorz() - (bottom - actor->int_pos().Z) });
|
||||
actor->spr.__int_angle = actor2->spr.__int_angle;
|
||||
actor->spr.__int_angle = actor2->int_ang();
|
||||
ChangeActorSect(actor, actor2->sector());
|
||||
sfxPlay3DSound(actor2, 201, -1, 0);
|
||||
actor->vel.X = actor->vel.Y = actor->vel.Z = 0;
|
||||
|
|
|
@ -322,8 +322,8 @@ void fxSpawnPodStuff(DBloodActor* actor, int)
|
|||
|
||||
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);
|
||||
int x = actor->int_pos().X + MulScale(actor->spr.clipdist - 4, Cos(actor->int_ang()), 28);
|
||||
int y = actor->int_pos().Y + MulScale(actor->spr.clipdist - 4, Sin(actor->int_ang()), 28);
|
||||
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);
|
||||
|
@ -347,8 +347,8 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
|
|||
|
||||
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);
|
||||
int x = actor->int_pos().X + MulScale(actor->spr.clipdist - 4, Cos(actor->int_ang()), 28);
|
||||
int y = actor->int_pos().Y + MulScale(actor->spr.clipdist - 4, Sin(actor->int_ang()), 28);
|
||||
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);
|
||||
|
|
|
@ -393,8 +393,8 @@ int HitScan(DBloodActor* actor, int z, int dx, int dy, int dz, unsigned int nMas
|
|||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
if (nRange)
|
||||
{
|
||||
hitscangoal.X = x + MulScale(nRange << 4, Cos(actor->spr.__int_angle), 30);
|
||||
hitscangoal.Y = y + MulScale(nRange << 4, Sin(actor->spr.__int_angle), 30);
|
||||
hitscangoal.X = x + MulScale(nRange << 4, Cos(actor->int_ang()), 30);
|
||||
hitscangoal.Y = y + MulScale(nRange << 4, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -442,8 +442,8 @@ int VectorScan(DBloodActor* actor, int nOffset, int nZOffset, int dx, int dy, in
|
|||
actor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_HITSCAN;
|
||||
if (nRange)
|
||||
{
|
||||
hitscangoal.X = x1 + MulScale(nRange << 4, Cos(actor->spr.__int_angle), 30);
|
||||
hitscangoal.Y = y1 + MulScale(nRange << 4, Sin(actor->spr.__int_angle), 30);
|
||||
hitscangoal.X = x1 + MulScale(nRange << 4, Cos(actor->int_ang()), 30);
|
||||
hitscangoal.Y = y1 + MulScale(nRange << 4, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -262,7 +262,7 @@ static DBloodActor* nnExtSpawnDude(DBloodActor* sourceactor, DBloodActor* origin
|
|||
if (nType < kDudeBase || nType >= kDudeMax || (pDudeActor = actSpawnSprite(origin, kStatDude)) == NULL)
|
||||
return NULL;
|
||||
|
||||
int angle = origin->spr.__int_angle;
|
||||
int angle = origin->int_ang();
|
||||
int x, y, z = a4 + origin->int_pos().Z;
|
||||
if (a3 < 0)
|
||||
{
|
||||
|
@ -1342,8 +1342,8 @@ void nnExtProcessSuperSprites()
|
|||
int nSpeed = approxDist(pact->vel.X, pact->vel.Y);
|
||||
nSpeed = ClipLow(nSpeed - MulScale(nSpeed, mass, 6), 0x9000 - (mass << 3));
|
||||
|
||||
debrisactor->vel.X += MulScale(nSpeed, Cos(pPlayer->actor->spr.__int_angle), 30);
|
||||
debrisactor->vel.Y += MulScale(nSpeed, Sin(pPlayer->actor->spr.__int_angle), 30);
|
||||
debrisactor->vel.X += MulScale(nSpeed, Cos(pPlayer->actor->int_ang()), 30);
|
||||
debrisactor->vel.Y += MulScale(nSpeed, Sin(pPlayer->actor->int_ang()), 30);
|
||||
|
||||
debrisactor->hit.hit.setSprite(pPlayer->actor);
|
||||
}
|
||||
|
@ -3065,9 +3065,9 @@ void useVelocityChanger(DBloodActor* actor, sectortype* sect, DBloodActor* initi
|
|||
}
|
||||
else
|
||||
{
|
||||
if (toEvnAng) nAng = initiator->spr.__int_angle;
|
||||
else if (toSrcAng) nAng = actor->spr.__int_angle;
|
||||
else nAng = pSprite->spr.__int_angle;
|
||||
if (toEvnAng) nAng = initiator->int_ang();
|
||||
else if (toSrcAng) nAng = actor->int_ang();
|
||||
else nAng = pSprite->int_ang();
|
||||
|
||||
nAng = nAng & 2047;
|
||||
|
||||
|
@ -3402,7 +3402,7 @@ void useEffectGen(DBloodActor* sourceactor, DBloodActor* actor)
|
|||
|
||||
if (sourceactor->spr.flags & kModernTypeFlag4)
|
||||
{
|
||||
pEffect->spr.__int_angle = sourceactor->spr.__int_angle;
|
||||
pEffect->spr.__int_angle = sourceactor->int_ang();
|
||||
}
|
||||
|
||||
if (pEffect->spr.cstat & CSTAT_SPRITE_ONE_SIDE)
|
||||
|
@ -3453,12 +3453,12 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector)
|
|||
if ((sourceactor->spr.flags & kModernTypeFlag1))
|
||||
pXSector->panAlways = pXSector->windAlways = 1;
|
||||
|
||||
int ang = sourceactor->spr.__int_angle;
|
||||
int ang = sourceactor->int_ang();
|
||||
if (sourceactor->xspr.data4 <= 0)
|
||||
{
|
||||
if ((sourceactor->xspr.data1 & 0x0002))
|
||||
{
|
||||
while (sourceactor->spr.__int_angle == ang)
|
||||
while (sourceactor->int_ang() == ang)
|
||||
sourceactor->spr.__int_angle = nnExtRandom(-kAng360, kAng360) & 2047;
|
||||
}
|
||||
}
|
||||
|
@ -3475,7 +3475,7 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector)
|
|||
sourceactor->spr.__int_angle = ClipLow(ang, -kAng180);
|
||||
}
|
||||
|
||||
pXSector->windAng = sourceactor->spr.__int_angle;
|
||||
pXSector->windAng = sourceactor->int_ang();
|
||||
|
||||
if (sourceactor->xspr.data3 > 0 && sourceactor->xspr.data3 < 4)
|
||||
{
|
||||
|
@ -3835,7 +3835,7 @@ void useSeqSpawnerGen(DBloodActor* sourceactor, int objType, sectortype* pSector
|
|||
|
||||
if (sourceactor->spr.flags & kModernTypeFlag4)
|
||||
{
|
||||
spawned->spr.__int_angle = sourceactor->spr.__int_angle;
|
||||
spawned->spr.__int_angle = sourceactor->int_ang();
|
||||
}
|
||||
|
||||
// should be: the more is seqs, the shorter is timer
|
||||
|
@ -4481,7 +4481,7 @@ bool condCheckDude(DBloodActor* aCond, int cmpOp, bool PUSH)
|
|||
var = cansee(objActor->int_pos().X, objActor->int_pos().Y, objActor->int_pos().Z, objActor->sector(), targ->int_pos().X, targ->int_pos().Y, targ->int_pos().Z - eyeAboveZ, targ->sector());
|
||||
if (cond == 4 && var > 0)
|
||||
{
|
||||
var = ((1024 + getangle(dx, dy) - objActor->spr.__int_angle) & 2047) - 1024;
|
||||
var = ((1024 + getangle(dx, dy) - objActor->int_ang()) & 2047) - 1024;
|
||||
var = (abs(var) < ((arg1 <= 0) ? pInfo->periphery : ClipHigh(arg1, 2048)));
|
||||
}
|
||||
break;
|
||||
|
@ -4604,7 +4604,7 @@ bool condCheckSprite(DBloodActor* aCond, int cmpOp, bool PUSH)
|
|||
switch (cond)
|
||||
{
|
||||
default: break;
|
||||
case 0: return condCmp((arg3 == 0) ? (objActor->spr.__int_angle & 2047) : objActor->spr.__int_angle, arg1, arg2, cmpOp);
|
||||
case 0: return condCmp((arg3 == 0) ? (objActor->spr.__int_angle & 2047) : objActor->int_ang(), arg1, arg2, cmpOp);
|
||||
case 5: return condCmp(objActor->spr.statnum, arg1, arg2, cmpOp);
|
||||
case 6: return ((objActor->spr.flags & kHitagRespawn) || objActor->spr.statnum == kStatRespawn);
|
||||
case 7: return condCmp(spriteGetSlope(objActor), arg1, arg2, cmpOp);
|
||||
|
@ -4665,15 +4665,15 @@ bool condCheckSprite(DBloodActor* aCond, int cmpOp, bool PUSH)
|
|||
if ((pPlayer = getPlayerById(objActor->spr.type)) != NULL)
|
||||
var = HitScan(objActor, pPlayer->zWeapon, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, arg1, arg3 << 1);
|
||||
else if (objActor->IsDudeActor())
|
||||
var = HitScan(objActor, objActor->int_pos().Z, bcos(objActor->spr.__int_angle), bsin(objActor->spr.__int_angle), (!objActor->hasX()) ? 0 : objActor->dudeSlope, arg1, arg3 << 1);
|
||||
var = HitScan(objActor, objActor->int_pos().Z, bcos(objActor->int_ang()), bsin(objActor->int_ang()), (!objActor->hasX()) ? 0 : objActor->dudeSlope, arg1, arg3 << 1);
|
||||
else if ((objActor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_MASK) == CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
{
|
||||
var3 = (objActor->spr.cstat & CSTAT_SPRITE_YFLIP) ? 0x10000 << 1 : -(0x10000 << 1);
|
||||
var = HitScan(objActor, objActor->int_pos().Z, Cos(objActor->spr.__int_angle) >> 16, Sin(objActor->spr.__int_angle) >> 16, var3, arg1, arg3 << 1);
|
||||
var = HitScan(objActor, objActor->int_pos().Z, Cos(objActor->int_ang()) >> 16, Sin(objActor->int_ang()) >> 16, var3, arg1, arg3 << 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
var = HitScan(objActor, objActor->int_pos().Z, bcos(objActor->spr.__int_angle), bsin(objActor->spr.__int_angle), 0, arg1, arg3 << 1);
|
||||
var = HitScan(objActor, objActor->int_pos().Z, bcos(objActor->int_ang()), bsin(objActor->int_ang()), 0, arg1, arg3 << 1);
|
||||
}
|
||||
|
||||
if (var < 0)
|
||||
|
@ -6099,7 +6099,7 @@ bool modernTypeOperateSprite(DBloodActor* actor, EVENT& event)
|
|||
if (actor->xspr.data4 != 0) break;
|
||||
else if (actor->spr.flags & kModernTypeFlag1)
|
||||
{
|
||||
pPlayer->angle.settarget(buildang(actor->spr.__int_angle));
|
||||
pPlayer->angle.settarget(buildang(actor->int_ang()));
|
||||
pPlayer->angle.lockinput();
|
||||
}
|
||||
else if (valueIsBetween(actor->xspr.data2, -kAng360, kAng360))
|
||||
|
@ -7742,8 +7742,8 @@ void nnExtAiSetDirection(DBloodActor* actor, int a3)
|
|||
{
|
||||
assert(actor->spr.type >= kDudeBase && actor->spr.type < kDudeMax);
|
||||
|
||||
int vc = ((a3 + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int t1 = DMulScale(actor->vel.X, Cos(actor->spr.__int_angle), actor->vel.Y, Sin(actor->spr.__int_angle), 30);
|
||||
int vc = ((a3 + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
int t1 = DMulScale(actor->vel.X, Cos(actor->int_ang()), actor->vel.Y, Sin(actor->int_ang()), 30);
|
||||
int vsi = ((t1 * 15) >> 12) / 2;
|
||||
int v8 = 341;
|
||||
|
||||
|
@ -7758,8 +7758,8 @@ void nnExtAiSetDirection(DBloodActor* actor, int a3)
|
|||
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->int_ang(), vsi))
|
||||
actor->xspr.goalAng = actor->int_ang();
|
||||
else if (nnExtCanMove(actor, actor->GetTarget(), actor->int_ang() - v8, vsi))
|
||||
actor->xspr.goalAng = actor->int_ang() - v8;
|
||||
else
|
||||
|
@ -8156,7 +8156,7 @@ void aiPatrolRandGoalAng(DBloodActor* actor)
|
|||
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;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
actor->spr.__int_angle = (actor->int_ang() + ClipRange(nAng, -nTurnRange, nTurnRange)) & 2047;
|
||||
|
||||
}
|
||||
|
@ -8204,7 +8204,7 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
}
|
||||
|
||||
int nTurnRange = (pDudeInfo->angSpeed << 2) >> 4;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->spr.__int_angle) & 2047) - 1024;
|
||||
int nAng = ((actor->xspr.goalAng + 1024 - actor->int_ang()) & 2047) - 1024;
|
||||
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)))
|
||||
|
@ -8241,8 +8241,8 @@ void aiPatrolMove(DBloodActor* actor)
|
|||
}
|
||||
|
||||
frontSpeed = aiPatrolGetVelocity(pDudeInfo->frontSpeed, targetactor->xspr.busyTime);
|
||||
actor->vel.X += MulScale(frontSpeed, Cos(actor->spr.__int_angle), 30);
|
||||
actor->vel.Y += MulScale(frontSpeed, Sin(actor->spr.__int_angle), 30);
|
||||
actor->vel.X += MulScale(frontSpeed, Cos(actor->int_ang()), 30);
|
||||
actor->vel.Y += MulScale(frontSpeed, Sin(actor->int_ang()), 30);
|
||||
}
|
||||
|
||||
vel = MulScale(vel, approxDist(dx, dy) << 6, 16);
|
||||
|
@ -8411,7 +8411,7 @@ bool readyForCrit(DBloodActor* hunter, DBloodActor* victim)
|
|||
if (approxDist(dx, dy) >= (7000 / ClipLow(gGameOptions.nDifficulty >> 1, 1)))
|
||||
return false;
|
||||
|
||||
return (abs(((getangle(dx, dy) + 1024 - victim->spr.__int_angle) & 2047) - 1024) <= kAng45);
|
||||
return (abs(((getangle(dx, dy) + 1024 - victim->int_ang()) & 2047) - 1024) <= kAng45);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -8600,7 +8600,7 @@ DBloodActor* aiPatrolSearchTargets(DBloodActor* actor)
|
|||
if (seeDist)
|
||||
{
|
||||
int periphery = ClipLow(pDudeInfo->periphery, kAng60);
|
||||
int nDeltaAngle = abs(((getangle(dx, dy) + 1024 - actor->spr.__int_angle) & 2047) - 1024);
|
||||
int nDeltaAngle = abs(((getangle(dx, dy) + 1024 - actor->int_ang()) & 2047) - 1024);
|
||||
if ((itCanSee = (!blind && nDist < seeDist && nDeltaAngle < periphery)) == true)
|
||||
{
|
||||
int base = 100 + ((20 * gGameOptions.nDifficulty) - (nDeltaAngle / 5));
|
||||
|
@ -8886,7 +8886,7 @@ void aiPatrolThink(DBloodActor* actor)
|
|||
else if (aiPatrolTurning(actor->xspr.aiState))
|
||||
{
|
||||
//viewSetSystemMessage("TURN");
|
||||
if ((int)actor->spr.__int_angle == (int)actor->xspr.goalAng)
|
||||
if ((int)actor->int_ang() == (int)actor->xspr.goalAng)
|
||||
{
|
||||
// save imer for waiting
|
||||
stateTimer = actor->xspr.stateTimer;
|
||||
|
@ -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->int_ang() + kAng180 : markeractor->spr.__int_angle) & 2047;
|
||||
actor->xspr.goalAng = ((!(markeractor->spr.flags & kModernTypeFlag8) && actor->xspr.unused2) ? markeractor->int_ang() + kAng180 : markeractor->int_ang()) & 2047;
|
||||
if ((int)actor->spr.__int_angle != (int)actor->xspr.goalAng) // let the enemy play move animation while turning
|
||||
return;
|
||||
}
|
||||
|
@ -9344,7 +9344,7 @@ void changeSpriteAngle(DBloodActor* pSpr, int nAng)
|
|||
{
|
||||
pSpr->spr.__int_angle = nAng;
|
||||
if (pSpr->hasX())
|
||||
pSpr->xspr.goalAng = pSpr->spr.__int_angle;
|
||||
pSpr->xspr.goalAng = pSpr->int_ang();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1518,7 +1518,7 @@ void doslopetilting(PLAYER* pPlayer, double const scaleAdjust = 1)
|
|||
auto plActor = pPlayer->actor;
|
||||
int const florhit = pPlayer->actor->hit.florhit.type;
|
||||
bool const va = plActor->xspr.height < 16 && (florhit == kHitSector || florhit == 0) ? 1 : 0;
|
||||
pPlayer->horizon.calcviewpitch(plActor->int_pos().vec2, buildang(plActor->spr.__int_angle), va, plActor->sector()->floorstat & CSTAT_SECTOR_SLOPE, plActor->sector(), scaleAdjust);
|
||||
pPlayer->horizon.calcviewpitch(plActor->int_pos().vec2, buildang(plActor->int_ang()), va, plActor->sector()->floorstat & CSTAT_SECTOR_SLOPE, plActor->sector(), scaleAdjust);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -276,7 +276,7 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
|||
int t = DivScale(nDist, 0x1aaaaa, 12);
|
||||
x += (target->vel.X * t) >> 12;
|
||||
y += (target->vel.Y * t) >> 12;
|
||||
int angBak = actor->spr.__int_angle;
|
||||
int angBak = actor->int_ang();
|
||||
actor->spr.__int_angle = getangle(x - actor->int_pos().X, y - actor->int_pos().Y);
|
||||
int dx = bcos(actor->int_ang());
|
||||
int dy = bsin(actor->int_ang());
|
||||
|
@ -1388,7 +1388,7 @@ int HDoorBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator)
|
|||
if (!pXSector->marker0 || !pXSector->marker1) return 0;
|
||||
auto marker0 = pXSector->marker0;
|
||||
auto marker1 = pXSector->marker1;
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, marker1->int_pos().X, marker1->int_pos().Y, marker1->spr.__int_angle, pSector->type == kSectorSlide);
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_ang(), marker1->int_pos().X, marker1->int_pos().Y, marker1->int_ang(), pSector->type == kSectorSlide);
|
||||
ZTranslateSector(pSector, pXSector, a2, nWave);
|
||||
pXSector->busy = a2;
|
||||
if (pXSector->command == kCmdLink && pXSector->txID)
|
||||
|
@ -1419,7 +1419,7 @@ int RDoorBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator)
|
|||
nWave = pXSector->busyWaveB;
|
||||
if (!pXSector->marker0) return 0;
|
||||
auto marker0 = pXSector->marker0;
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, pSector->type == kSectorRotate);
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_ang(), pSector->type == kSectorRotate);
|
||||
ZTranslateSector(pSector, pXSector, a2, nWave);
|
||||
pXSector->busy = a2;
|
||||
if (pXSector->command == kCmdLink && pXSector->txID)
|
||||
|
@ -1448,13 +1448,13 @@ int StepRotateBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator)
|
|||
int vbp;
|
||||
if (pXSector->busy < a2)
|
||||
{
|
||||
vbp = pXSector->data + marker0->spr.__int_angle;
|
||||
vbp = pXSector->data + marker0->int_ang();
|
||||
int nWave = pXSector->busyWaveA;
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, pXSector->data, marker0->int_pos().X, marker0->int_pos().Y, vbp, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
vbp = pXSector->data - marker0->spr.__int_angle;
|
||||
vbp = pXSector->data - marker0->int_ang();
|
||||
int nWave = pXSector->busyWaveB;
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, vbp, marker0->int_pos().X, marker0->int_pos().Y, pXSector->data, 1);
|
||||
}
|
||||
|
@ -1510,7 +1510,7 @@ int PathBusy(sectortype* pSector, unsigned int a2, DBloodActor* initiator)
|
|||
if (!basepath || !marker0 || !marker1) return 0;
|
||||
|
||||
int nWave = marker0->xspr.wave;
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), basepath->int_pos().X, basepath->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, marker1->int_pos().X, marker1->int_pos().Y, marker1->spr.__int_angle, 1);
|
||||
TranslateSector(pSector, GetWaveValue(pXSector->busy, nWave), GetWaveValue(a2, nWave), basepath->int_pos().X, basepath->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_ang(), marker1->int_pos().X, marker1->int_pos().Y, marker1->int_ang(), 1);
|
||||
ZTranslateSector(pSector, pXSector, a2, nWave);
|
||||
pXSector->busy = a2;
|
||||
if ((a2 & 0xffff) == 0)
|
||||
|
@ -1636,7 +1636,7 @@ void OperateTeleport(sectortype* pSector)
|
|||
}
|
||||
actor->set_int_xy(destactor->int_pos().X, destactor->int_pos().Y);
|
||||
actor->add_int_z(destactor->sector()->int_floorz() - pSector->int_floorz());
|
||||
actor->spr.__int_angle = destactor->spr.__int_angle;
|
||||
actor->spr.__int_angle = destactor->int_ang();
|
||||
ChangeActorSect(actor, destactor->sector());
|
||||
sfxPlay3DSound(destactor, 201, -1, 0);
|
||||
actor->vel.X = actor->vel.Y = actor->vel.Z = 0;
|
||||
|
@ -1646,7 +1646,7 @@ void OperateTeleport(sectortype* pSector)
|
|||
{
|
||||
playerResetInertia(pPlayer);
|
||||
pPlayer->zViewVel = pPlayer->zWeaponVel = 0;
|
||||
pPlayer->angle.settarget(buildang(actor->spr.__int_angle), true);
|
||||
pPlayer->angle.settarget(buildang(actor->int_ang()), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2364,7 +2364,7 @@ void trInit(TArray<DBloodActor*>& actors)
|
|||
auto marker0 = pXSector->marker0;
|
||||
TranslateSector(pSector, 0, -65536, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, pSector->type == kSectorRotate);
|
||||
UpdateBasePoints(pSector);
|
||||
TranslateSector(pSector, 0, pXSector->busy, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->spr.__int_angle, pSector->type == kSectorRotate);
|
||||
TranslateSector(pSector, 0, pXSector->busy, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_pos().X, marker0->int_pos().Y, 0, marker0->int_pos().X, marker0->int_pos().Y, marker0->int_ang(), pSector->type == kSectorRotate);
|
||||
ZTranslateSector(pSector, pXSector, pXSector->busy, 1);
|
||||
break;
|
||||
}
|
||||
|
@ -2543,7 +2543,7 @@ void FireballTrapSeqCallback(int, DBloodActor* actor)
|
|||
if (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
|
||||
actFireMissile(actor, 0, 0, 0, 0, (actor->spr.cstat & CSTAT_SPRITE_YFLIP) ? 0x4000 : -0x4000, kMissileFireball);
|
||||
else
|
||||
actFireMissile(actor, 0, 0, bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0, kMissileFireball);
|
||||
actFireMissile(actor, 0, 0, bcos(actor->int_ang()), bsin(actor->int_ang()), 0, kMissileFireball);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2563,8 +2563,8 @@ void MGunFireSeqCallback(int, DBloodActor* actor)
|
|||
if (actor->xspr.data2 == 0)
|
||||
evPostActor(actor, 1, kCmdOff, actor);
|
||||
}
|
||||
int dx = bcos(actor->spr.__int_angle) + Random2(1000);
|
||||
int dy = bsin(actor->spr.__int_angle) + Random2(1000);
|
||||
int dx = bcos(actor->int_ang()) + Random2(1000);
|
||||
int dy = bsin(actor->int_ang()) + Random2(1000);
|
||||
int dz = Random2(1000);
|
||||
actFireVector(actor, 0, 0, dx, dy, dz, kVectorBullet);
|
||||
sfxPlay3DSound(actor, 359, -1, 0);
|
||||
|
|
|
@ -87,7 +87,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
pZone->y = actor->int_pos().Y;
|
||||
pZone->z = actor->int_pos().Z;
|
||||
pZone->sector = actor->sector();
|
||||
pZone->ang = actor->spr.__int_angle;
|
||||
pZone->ang = actor->int_ang();
|
||||
}
|
||||
DeleteSprite(actor);
|
||||
break;
|
||||
|
@ -100,7 +100,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
pZone->y = actor->int_pos().Y;
|
||||
pZone->z = actor->int_pos().Z;
|
||||
pZone->sector = actor->sector();
|
||||
pZone->ang = actor->spr.__int_angle;
|
||||
pZone->ang = actor->int_ang();
|
||||
|
||||
#ifdef NOONE_EXTENSIONS
|
||||
// fill player spawn position according team of player in TEAMS mode.
|
||||
|
@ -111,7 +111,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
pZone->y = actor->int_pos().Y;
|
||||
pZone->z = actor->int_pos().Z;
|
||||
pZone->sector = actor->sector();
|
||||
pZone->ang = actor->spr.__int_angle;
|
||||
pZone->ang = actor->int_ang();
|
||||
team1++;
|
||||
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ void warpInit(TArray<DBloodActor*>& actors)
|
|||
pZone->y = actor->int_pos().Y;
|
||||
pZone->z = actor->int_pos().Z;
|
||||
pZone->sector = actor->sector();
|
||||
pZone->ang = actor->spr.__int_angle;
|
||||
pZone->ang = actor->int_ang();
|
||||
team2++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -461,8 +461,8 @@ void UpdateAimVector(PLAYER* pPlayer)
|
|||
y2 += (actor->vel.Y * t) >> 12;
|
||||
z2 += (actor->vel.Z * t) >> 8;
|
||||
}
|
||||
int lx = x + MulScale(Cos(plActor->spr.__int_angle), nDist, 30);
|
||||
int ly = y + MulScale(Sin(plActor->spr.__int_angle), nDist, 30);
|
||||
int lx = x + MulScale(Cos(plActor->int_ang()), nDist, 30);
|
||||
int ly = y + MulScale(Sin(plActor->int_ang()), nDist, 30);
|
||||
int lz = z + MulScale(pPlayer->slope, nDist, 10);
|
||||
int zRange = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
@ -511,8 +511,8 @@ void UpdateAimVector(PLAYER* pPlayer)
|
|||
int nDist = approxDist(dx, dy);
|
||||
if (nDist == 0 || nDist > 51200)
|
||||
continue;
|
||||
int lx = x + MulScale(Cos(plActor->spr.__int_angle), nDist, 30);
|
||||
int ly = y + MulScale(Sin(plActor->spr.__int_angle), nDist, 30);
|
||||
int lx = x + MulScale(Cos(plActor->int_ang()), nDist, 30);
|
||||
int ly = y + MulScale(Sin(plActor->int_ang()), nDist, 30);
|
||||
int lz = z + MulScale(pPlayer->slope, nDist, 10);
|
||||
int zRange = MulScale(9460, nDist, 10);
|
||||
int top, bottom;
|
||||
|
|
|
@ -225,8 +225,8 @@ int ssp(DDukeActor* const actor, unsigned int cliptype) //The set sprite functio
|
|||
Collision c;
|
||||
|
||||
return movesprite_ex(actor,
|
||||
MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14),
|
||||
MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14), actor->spr.zvel,
|
||||
MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14),
|
||||
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14), actor->spr.zvel,
|
||||
cliptype, c) == kHitNone;
|
||||
}
|
||||
|
||||
|
@ -278,8 +278,8 @@ void lotsofstuff(DDukeActor* actor, int n, int spawntype)
|
|||
void ms(DDukeActor* const actor)
|
||||
{
|
||||
//T1,T2 and T3 are used for all the sector moving stuff!!!
|
||||
actor->spr.pos.X += actor->spr.xvel * buildang(actor->spr.__int_angle).fcos() * inttoworld;
|
||||
actor->spr.pos.Y += actor->spr.xvel * buildang(actor->spr.__int_angle).fsin() * inttoworld;
|
||||
actor->spr.pos.X += actor->spr.xvel * buildang(actor->int_ang()).fcos() * inttoworld;
|
||||
actor->spr.pos.Y += actor->spr.xvel * buildang(actor->int_ang()).fsin() * inttoworld;
|
||||
|
||||
int j = actor->temp_data[1];
|
||||
int k = actor->temp_data[2];
|
||||
|
@ -1120,7 +1120,7 @@ void movetouchplate(DDukeActor* actor, int plate)
|
|||
if (actor->temp_data[5] == 1) return;
|
||||
|
||||
p = checkcursectnums(actor->sector());
|
||||
if (p >= 0 && (ps[p].on_ground || actor->spr.__int_angle == 512))
|
||||
if (p >= 0 && (ps[p].on_ground || actor->int_ang() == 512))
|
||||
{
|
||||
if (actor->temp_data[0] == 0 && !check_activator_motion(actor->spr.lotag))
|
||||
{
|
||||
|
@ -1258,8 +1258,8 @@ void movecanwithsomething(DDukeActor* actor)
|
|||
|
||||
void bounce(DDukeActor* actor)
|
||||
{
|
||||
int xvect = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 10);
|
||||
int yvect = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 10);
|
||||
int xvect = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 10);
|
||||
int yvect = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 10);
|
||||
int zvect = actor->spr.zvel;
|
||||
|
||||
auto sectp = actor->sector();
|
||||
|
@ -1317,14 +1317,14 @@ void movetongue(DDukeActor *actor, int tongue, int jaw)
|
|||
return;
|
||||
}
|
||||
|
||||
actor->spr.__int_angle = Owner->spr.__int_angle;
|
||||
actor->spr.__int_angle = Owner->int_ang();
|
||||
actor->spr.pos = Owner->spr.pos.plusZ(Owner->isPlayer() ? -34 : 0);
|
||||
|
||||
for (int k = 0; k < actor->temp_data[0]; k++)
|
||||
{
|
||||
auto q = EGS(actor->sector(),
|
||||
actor->int_pos().X + MulScale(k, bcos(actor->spr.__int_angle), 9),
|
||||
actor->int_pos().Y + MulScale(k, bsin(actor->spr.__int_angle), 9),
|
||||
actor->int_pos().X + MulScale(k, bcos(actor->int_ang()), 9),
|
||||
actor->int_pos().Y + MulScale(k, bsin(actor->int_ang()), 9),
|
||||
actor->int_pos().Z + ((k * Sgn(actor->spr.zvel)) * abs(actor->spr.zvel / 12)), tongue, -40 + (k << 1),
|
||||
8, 8, 0, 0, 0, actor, 5);
|
||||
if (q)
|
||||
|
@ -1335,8 +1335,8 @@ void movetongue(DDukeActor *actor, int tongue, int jaw)
|
|||
}
|
||||
int k = actor->temp_data[0]; // do not depend on the above loop counter.
|
||||
auto spawned = EGS(actor->sector(),
|
||||
actor->int_pos().X + MulScale(k, bcos(actor->spr.__int_angle), 9),
|
||||
actor->int_pos().Y + MulScale(k, bsin(actor->spr.__int_angle), 9),
|
||||
actor->int_pos().X + MulScale(k, bcos(actor->int_ang()), 9),
|
||||
actor->int_pos().Y + MulScale(k, bsin(actor->int_ang()), 9),
|
||||
actor->int_pos().Z + ((k * Sgn(actor->spr.zvel)) * abs(actor->spr.zvel / 12)), jaw, -40,
|
||||
32, 32, 0, 0, 0, actor, 5);
|
||||
if (spawned)
|
||||
|
@ -1465,8 +1465,8 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
auto sect = actor->sector();
|
||||
auto pos = actor->int_pos();
|
||||
int j = clipmove(pos, §,
|
||||
(MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14) * TICSPERFRAME) << 11,
|
||||
(MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14) * TICSPERFRAME) << 11,
|
||||
(MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14) * TICSPERFRAME) << 11,
|
||||
(MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14) * TICSPERFRAME) << 11,
|
||||
24L, (4 << 8), (4 << 8), CLIPMASK1, coll);
|
||||
actor->set_int_pos(pos);
|
||||
actor->setsector(sect);
|
||||
|
@ -1474,7 +1474,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
if (j == kHitWall)
|
||||
{
|
||||
int k = getangle(coll.hitWall->delta());
|
||||
actor->spr.__int_angle = ((k << 1) - actor->spr.__int_angle) & 2047;
|
||||
actor->spr.__int_angle = ((k << 1) - actor->int_ang()) & 2047;
|
||||
}
|
||||
else if (j == kHitSprite)
|
||||
{
|
||||
|
@ -1670,7 +1670,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
actor->temp_data[2]++;
|
||||
if ((actor->temp_data[2] & 15) == 0)
|
||||
{
|
||||
a = actor->spr.__int_angle;
|
||||
a = actor->int_ang();
|
||||
actor->spr.__int_angle = actor->tempang;
|
||||
if (attacksnd >= 0) S_PlayActorSound(attacksnd, actor);
|
||||
fi.shoot(actor, firelaser);
|
||||
|
@ -1710,7 +1710,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
fi.shoot(actor, firelaser);
|
||||
}
|
||||
}
|
||||
actor->spr.__int_angle += getincangle(actor->spr.__int_angle, getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 2;
|
||||
actor->spr.__int_angle += getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 2;
|
||||
}
|
||||
|
||||
if (actor->temp_data[0] != 2 && actor->temp_data[0] != 3 && Owner)
|
||||
|
@ -1718,7 +1718,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
int l = ldist(Owner, actor);
|
||||
if (l <= 1524)
|
||||
{
|
||||
a = actor->spr.__int_angle;
|
||||
a = actor->int_ang();
|
||||
actor->spr.xvel >>= 1;
|
||||
}
|
||||
else a = getangle(Owner->spr.pos.XY() - actor->spr.pos.XY());
|
||||
|
@ -1745,7 +1745,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
{
|
||||
actor->temp_data[0] = 2 + (krand() & 2);
|
||||
actor->temp_data[2] = 0;
|
||||
actor->tempang = actor->spr.__int_angle;
|
||||
actor->tempang = actor->int_ang();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1769,7 +1769,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
actor->SetOwner(NewOwner);
|
||||
}
|
||||
|
||||
actor->temp_data[3] = getincangle(actor->spr.__int_angle, a);
|
||||
actor->temp_data[3] = getincangle(actor->int_ang(), a);
|
||||
actor->spr.__int_angle += actor->temp_data[3] >> 3;
|
||||
|
||||
if (actor->spr.pos.Z < Owner->spr.pos.Z - 2)
|
||||
|
@ -1981,7 +1981,7 @@ void camera(DDukeActor *actor)
|
|||
}
|
||||
|
||||
// update angle accordingly.
|
||||
if (actor->spr.__int_angle == minimum || actor->spr.__int_angle == maximum)
|
||||
if (actor->int_ang() == minimum || actor->int_ang() == maximum)
|
||||
{
|
||||
increment = -increment;
|
||||
actor->spr.__int_angle += increment;
|
||||
|
@ -2239,7 +2239,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
|
|||
else actor->spr.zvel += gs.gravity - 50;
|
||||
}
|
||||
|
||||
actor->add_int_pos({ MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14), MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14), 0 });
|
||||
actor->add_int_pos({ MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14), MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14), 0 });
|
||||
actor->add_int_z(actor->spr.zvel);
|
||||
|
||||
if (floorcheck && actor->spr.pos.Z >= actor->sector()->floorz)
|
||||
|
@ -2514,7 +2514,7 @@ void scrap(DDukeActor* actor, int SCRAP1, int SCRAP6)
|
|||
}
|
||||
}
|
||||
if (actor->spr.zvel < 4096) actor->spr.zvel += gs.gravity - 50;
|
||||
actor->add_int_pos({ MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14), MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14), actor->spr.zvel });
|
||||
actor->add_int_pos({ MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14), MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14), actor->spr.zvel });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2792,7 +2792,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
if (actor->spr.xvel)
|
||||
{
|
||||
int x = getangle(Owner->spr.pos.XY() - actor->spr.pos.XY());
|
||||
int q = getincangle(actor->spr.__int_angle, x) >> 3;
|
||||
int q = getincangle(actor->int_ang(), x) >> 3;
|
||||
|
||||
actor->temp_data[2] += q;
|
||||
actor->spr.__int_angle += q;
|
||||
|
@ -2810,7 +2810,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
int p = findplayer(actor, &x);
|
||||
if (x < 20480)
|
||||
{
|
||||
j = actor->spr.__int_angle;
|
||||
j = actor->int_ang();
|
||||
actor->spr.__int_angle = getangle(actor->spr.pos.XY() - ps[p].pos.XY());
|
||||
fi.shoot(actor, RPG);
|
||||
actor->spr.__int_angle = j;
|
||||
|
@ -2843,8 +2843,8 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
}
|
||||
}
|
||||
|
||||
int m = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
x = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
int m = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
x = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
double mm = m * inttoworld;
|
||||
double xx = x * inttoworld;
|
||||
|
||||
|
@ -3008,8 +3008,8 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
|
||||
if (actor->spr.xvel)
|
||||
{
|
||||
int l = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
int x = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
int l = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
int x = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
if ((sc->int_floorz() - sc->int_ceilingz()) < (108 << 8))
|
||||
if (ud.clipping == 0)
|
||||
|
@ -3159,8 +3159,8 @@ void handle_se02(DDukeActor* actor)
|
|||
else sc->setfloorslope(sc->getfloorslope() + (Sgn(actor->temp_data[5] - sc->getfloorslope()) << 4));
|
||||
}
|
||||
|
||||
int m = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
int x = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
int m = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
int x = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
|
||||
for (int p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
|
@ -3316,7 +3316,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
int x, p = findplayer(actor, &x);
|
||||
if (x < 8192)
|
||||
{
|
||||
j = actor->spr.__int_angle;
|
||||
j = actor->int_ang();
|
||||
actor->spr.__int_angle = getangle(actor->spr.pos.XY() - ps[p].pos);
|
||||
fi.shoot(actor, FIRELASER);
|
||||
actor->spr.__int_angle = j;
|
||||
|
@ -3350,7 +3350,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
|
||||
if (ldist(Owner, actor) < 1024)
|
||||
{
|
||||
auto ta = actor->spr.__int_angle;
|
||||
auto ta = actor->int_ang();
|
||||
actor->spr.__int_angle = getangle(ps[p].pos.XY() - actor->spr.pos.XY());
|
||||
actor->spr.__int_angle = ta;
|
||||
actor->SetOwner(nullptr);
|
||||
|
@ -3360,7 +3360,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
else actor->spr.xvel = 256;
|
||||
|
||||
x = getangle(Owner->spr.pos.XY() - actor->spr.pos.XY());
|
||||
int q = getincangle(actor->spr.__int_angle, x) >> 3;
|
||||
int q = getincangle(actor->int_ang(), x) >> 3;
|
||||
actor->spr.__int_angle += q;
|
||||
|
||||
if (rnd(32))
|
||||
|
@ -3667,7 +3667,7 @@ void handle_se13(DDukeActor* actor)
|
|||
{
|
||||
int j = (actor->spr.yvel << 5) | 1;
|
||||
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
if (actor->spriteextra)
|
||||
{
|
||||
|
@ -3699,7 +3699,7 @@ void handle_se13(DDukeActor* actor)
|
|||
actor->temp_data[3]++;
|
||||
sc->ceilingstat ^= CSTAT_SECTOR_SKY;
|
||||
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
for (auto& wal : wallsofsector(sc))
|
||||
wal.shade = actor->spr.shade;
|
||||
|
@ -3931,7 +3931,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
|||
double extra = sc->extra * zmaptoworld;
|
||||
if (actor->spr.pal)
|
||||
{
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
sc->add_int_ceilingz(-sc->extra);
|
||||
if (sc->int_ceilingz() <= actor->temp_data[1])
|
||||
|
@ -3968,7 +3968,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
sc->add_int_ceilingz(sc->extra);
|
||||
if (sc->int_ceilingz() >= actor->int_pos().Z)
|
||||
|
@ -4141,8 +4141,8 @@ void handle_se20(DDukeActor* actor)
|
|||
|
||||
if (actor->spr.xvel) //Moving
|
||||
{
|
||||
int x = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
int l = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
int x = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
int l = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->temp_data[3] += actor->spr.xvel;
|
||||
|
||||
|
@ -4202,7 +4202,7 @@ void handle_se21(DDukeActor* actor)
|
|||
|
||||
if (actor->temp_data[0] == 0) return;
|
||||
|
||||
if (actor->spr.__int_angle == 1536)
|
||||
if (actor->int_ang() == 1536)
|
||||
lp = sc->int_ceilingz();
|
||||
else
|
||||
lp = sc->int_floorz();
|
||||
|
@ -4223,7 +4223,7 @@ void handle_se21(DDukeActor* actor)
|
|||
deletesprite(actor);
|
||||
}
|
||||
|
||||
if (actor->spr.__int_angle == 1536)
|
||||
if (actor->int_ang() == 1536)
|
||||
sc->set_int_ceilingz(lp);
|
||||
else
|
||||
sc->set_int_floorz(lp);
|
||||
|
@ -4261,8 +4261,8 @@ void handle_se26(DDukeActor* actor)
|
|||
int x, l;
|
||||
|
||||
actor->spr.xvel = 32;
|
||||
l = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
x = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
l = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
x = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->spr.shade++;
|
||||
if (actor->spr.shade > 7)
|
||||
|
@ -4309,7 +4309,7 @@ void handle_se27(DDukeActor* actor)
|
|||
|
||||
if (ud.recstat == 0) return;
|
||||
|
||||
actor->tempang = actor->spr.__int_angle;
|
||||
actor->tempang = actor->int_ang();
|
||||
|
||||
p = findplayer(actor, &x);
|
||||
if (ps[p].GetActor()->spr.extra > 0 && myconnectindex == screenpeek)
|
||||
|
@ -4327,7 +4327,7 @@ void handle_se27(DDukeActor* actor)
|
|||
{
|
||||
ud.cameraactor = actor;
|
||||
actor->temp_data[0] = 999;
|
||||
actor->spr.__int_angle += getincangle(actor->spr.__int_angle, getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3;
|
||||
actor->spr.__int_angle += getincangle(actor->int_ang(), getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3;
|
||||
actor->spr.yvel = 100 + int((actor->spr.pos.Z - ps[p].pos.Z) * (256. / 257.));
|
||||
|
||||
}
|
||||
|
@ -4366,8 +4366,8 @@ void handle_se24(DDukeActor *actor, bool scroll, int shift)
|
|||
{
|
||||
if (actor->temp_data[4]) return;
|
||||
|
||||
int x = MulScale(actor->spr.yvel, bcos(actor->spr.__int_angle), 18);
|
||||
int y = MulScale(actor->spr.yvel, bsin(actor->spr.__int_angle), 18);
|
||||
int x = MulScale(actor->spr.yvel, bcos(actor->int_ang()), 18);
|
||||
int y = MulScale(actor->spr.yvel, bsin(actor->int_ang()), 18);
|
||||
|
||||
DukeSectIterator it(actor->sector());
|
||||
while (auto a2 = it.Next())
|
||||
|
@ -4909,7 +4909,7 @@ int dodge(DDukeActor* actor)
|
|||
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 (bcos(actor->int_ang()) * bx + bsin(actor->int_ang()) * by >= 0)
|
||||
if (bxvect * bx + byvect * by < 0)
|
||||
{
|
||||
d = bxvect * by - byvect * bx;
|
||||
|
@ -4941,7 +4941,7 @@ int furthestangle(DDukeActor *actor, int angs)
|
|||
if (!actor->isPlayer())
|
||||
if ((actor->temp_data[0] & 63) > 2) return(actor->int_ang() + 1024);
|
||||
|
||||
for (j = actor->spr.__int_angle; j < (2048 + actor->int_ang()); j += angincs)
|
||||
for (j = actor->int_ang(); 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->int_ang()); j += (angincs - (krand() & 511)))
|
||||
for (j = tosee->int_ang(); 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);
|
||||
|
||||
|
@ -5007,7 +5007,7 @@ void alterang(int ang, DDukeActor* actor, int playernum)
|
|||
|
||||
ticselapsed = (actor->temp_data[0]) & 31;
|
||||
|
||||
aang = actor->spr.__int_angle;
|
||||
aang = actor->int_ang();
|
||||
|
||||
actor->spr.xvel += (*moveptr - actor->spr.xvel) / 5;
|
||||
if (actor->spr.zvel < 648) actor->spr.zvel += ((*(moveptr + 1) << 4) - actor->spr.zvel) / 5;
|
||||
|
@ -5244,7 +5244,7 @@ void movefta(void)
|
|||
// SFLAG_MOVEFTA_CHECKSEE is set for all actors in Duke.
|
||||
if (act->spr.pal == 33 || actorflag(act, SFLAG_MOVEFTA_CHECKSEE) ||
|
||||
(actorflag(act, SFLAG_MOVEFTA_CHECKSEEWITHPAL8) && act->spr.pal == 8) ||
|
||||
(bcos(act->spr.__int_angle) * (px - sx) + bsin(act->spr.__int_angle) * (py - sy) >= 0))
|
||||
(bcos(act->int_ang()) * (px - sx) + bsin(act->int_ang()) * (py - sy) >= 0))
|
||||
{
|
||||
double r1 = zrand(32);
|
||||
double r2 = zrand(52);
|
||||
|
|
|
@ -710,7 +710,7 @@ void movefallers_d(void)
|
|||
if (act->temp_data[0] == 0)
|
||||
{
|
||||
act->spr.pos.Z -= 16;
|
||||
act->temp_data[1] = act->spr.__int_angle;
|
||||
act->temp_data[1] = act->int_ang();
|
||||
x = act->spr.extra;
|
||||
j = fi.ifhitbyweapon(act);
|
||||
if (j >= 0)
|
||||
|
@ -831,7 +831,7 @@ static void movetripbomb(DDukeActor *actor)
|
|||
auto spawned = spawn(actor, EXPLOSION2);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->spr.__int_angle = actor->spr.__int_angle;
|
||||
spawned->spr.__int_angle = actor->int_ang();
|
||||
spawned->spr.xvel = 348;
|
||||
ssp(spawned, CLIPMASK0);
|
||||
}
|
||||
|
@ -850,7 +850,7 @@ static void movetripbomb(DDukeActor *actor)
|
|||
{
|
||||
x = actor->spr.extra;
|
||||
actor->spr.extra = 1;
|
||||
int16_t l = actor->spr.__int_angle;
|
||||
int16_t l = actor->int_ang();
|
||||
j = fi.ifhitbyweapon(actor);
|
||||
if (j >= 0)
|
||||
{
|
||||
|
@ -868,7 +868,7 @@ static void movetripbomb(DDukeActor *actor)
|
|||
}
|
||||
if (actor->temp_data[0] == 32)
|
||||
{
|
||||
int16_t l = actor->spr.__int_angle;
|
||||
int16_t l = actor->int_ang();
|
||||
actor->spr.__int_angle = actor->temp_data[5];
|
||||
|
||||
actor->temp_data[3] = actor->int_pos().X; actor->temp_data[4] = actor->int_pos().Y;
|
||||
|
@ -968,7 +968,7 @@ static void movecrack(DDukeActor* actor)
|
|||
if (actor->spr.hitag > 0)
|
||||
{
|
||||
actor->temp_data[0] = actor->spr.cstat;
|
||||
actor->temp_data[1] = actor->spr.__int_angle;
|
||||
actor->temp_data[1] = actor->int_ang();
|
||||
int j = fi.ifhitbyweapon(actor);
|
||||
if (gs.actorinfo[j].flags2 & SFLAG2_EXPLOSIVE)
|
||||
{
|
||||
|
@ -1417,7 +1417,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t &oldpos)
|
|||
(wal->overpicnum == MIRROR || wal->picnum == MIRROR))
|
||||
{
|
||||
int k = getangle(wal->delta());
|
||||
proj->spr.__int_angle = ((k << 1) - proj->spr.__int_angle) & 2047;
|
||||
proj->spr.__int_angle = ((k << 1) - proj->int_ang()) & 2047;
|
||||
proj->SetOwner(proj);
|
||||
spawn(proj, TRANSPORTERSTAR);
|
||||
return true;
|
||||
|
@ -1436,7 +1436,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t &oldpos)
|
|||
}
|
||||
|
||||
int k = getangle(wal->delta());
|
||||
proj->spr.__int_angle = ((k << 1) - proj->spr.__int_angle) & 2047;
|
||||
proj->spr.__int_angle = ((k << 1) - proj->int_ang()) & 2047;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1537,8 +1537,8 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
|
||||
Collision coll;
|
||||
movesprite_ex(proj,
|
||||
MulScale(k, bcos(proj->spr.__int_angle), 14),
|
||||
MulScale(k, bsin(proj->spr.__int_angle), 14), ll, CLIPMASK1, coll);
|
||||
MulScale(k, bcos(proj->int_ang()), 14),
|
||||
MulScale(k, bsin(proj->int_ang()), 14), ll, CLIPMASK1, coll);
|
||||
|
||||
if (proj->spr.picnum == RPG && proj->temp_actor != nullptr)
|
||||
if (FindDistance2D(proj->int_pos().vec2 - proj->temp_actor->int_pos().vec2) < 256)
|
||||
|
@ -1572,8 +1572,8 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
for (k = -3; k < 2; k++)
|
||||
{
|
||||
vec3_t offset = {
|
||||
MulScale(k, bcos(proj->spr.__int_angle), 9),
|
||||
MulScale(k, bsin(proj->spr.__int_angle), 9),
|
||||
MulScale(k, bcos(proj->int_ang()), 9),
|
||||
MulScale(k, bsin(proj->int_ang()), 9),
|
||||
(k * Sgn(proj->spr.zvel)) * abs(proj->spr.zvel / 24)
|
||||
};
|
||||
|
||||
|
@ -1979,7 +1979,7 @@ void movetransports_d(void)
|
|||
if (k && sectlotag == 1 && act2->spr.statnum == 4)
|
||||
{
|
||||
k->spr.xvel = act2->spr.xvel >> 1;
|
||||
k->spr.__int_angle = act2->spr.__int_angle;
|
||||
k->spr.__int_angle = act2->int_ang();
|
||||
ssp(k, CLIPMASK0);
|
||||
}
|
||||
}
|
||||
|
@ -1992,7 +1992,7 @@ void movetransports_d(void)
|
|||
if (act2->spr.statnum == STAT_PROJECTILE || (checkcursectnums(act->sector()) == -1 && checkcursectnums(Owner->sector()) == -1))
|
||||
{
|
||||
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X),(Owner->int_pos().Y - act->int_pos().Y), -(act->int_pos().Z - Owner->sector()->int_floorz()) });
|
||||
act2->spr.__int_angle = Owner->spr.__int_angle;
|
||||
act2->spr.__int_angle = Owner->int_ang();
|
||||
|
||||
act2->backupang();
|
||||
|
||||
|
@ -2301,7 +2301,7 @@ static void greenslime(DDukeActor *actor)
|
|||
{
|
||||
s5->spr.xvel = 0;
|
||||
|
||||
int l = s5->spr.__int_angle;
|
||||
int l = s5->int_ang();
|
||||
|
||||
actor->set_int_pos({ s5->int_pos().X + bcos(l, -11), s5->int_pos().Y + bsin(l, -11), s5->int_pos().Z });
|
||||
|
||||
|
@ -2382,7 +2382,7 @@ static void greenslime(DDukeActor *actor)
|
|||
if (actor->spr.xvel < 32) actor->spr.xvel += 4;
|
||||
actor->spr.xvel = 64 - bcos(actor->temp_data[1], -9);
|
||||
|
||||
actor->spr.__int_angle += getincangle(actor->spr.__int_angle,
|
||||
actor->spr.__int_angle += getincangle(actor->int_ang(),
|
||||
getangle(ps[p].pos.XY() - actor->spr.pos.XY())) >> 3;
|
||||
// TJR
|
||||
}
|
||||
|
@ -2482,8 +2482,8 @@ static void flamethrowerflame(DDukeActor *actor)
|
|||
}
|
||||
|
||||
Collision coll;
|
||||
movesprite_ex(actor, MulScale(xvel, bcos(actor->spr.__int_angle), 14),
|
||||
MulScale(xvel, bsin(actor->spr.__int_angle), 14), actor->spr.zvel, CLIPMASK1, coll);
|
||||
movesprite_ex(actor, MulScale(xvel, bcos(actor->int_ang()), 14),
|
||||
MulScale(xvel, bsin(actor->int_ang()), 14), actor->spr.zvel, CLIPMASK1, coll);
|
||||
|
||||
if (!actor->insector())
|
||||
{
|
||||
|
@ -2604,8 +2604,8 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
|
||||
Collision coll;
|
||||
movesprite_ex(actor,
|
||||
MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14),
|
||||
MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14),
|
||||
MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14),
|
||||
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14),
|
||||
actor->spr.zvel, CLIPMASK0, coll);
|
||||
|
||||
if (actor->sector()->lotag == 1 && actor->spr.zvel == 0)
|
||||
|
@ -2650,7 +2650,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
|
||||
int k = getangle(wal->delta());
|
||||
|
||||
actor->spr.__int_angle = ((k << 1) - actor->spr.__int_angle) & 2047;
|
||||
actor->spr.__int_angle = ((k << 1) - actor->int_ang()) & 2047;
|
||||
actor->spr.xvel >>= 1;
|
||||
}
|
||||
|
||||
|
@ -3511,7 +3511,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
if (ps[playernum].newOwner != nullptr)
|
||||
goalang = getangle(ps[playernum].opos.XY() - actor->spr.pos.XY());
|
||||
else goalang = getangle(ps[playernum].pos.XY() - actor->spr.pos.XY());
|
||||
angdif = getincangle(actor->spr.__int_angle, goalang) >> 2;
|
||||
angdif = getincangle(actor->int_ang(), goalang) >> 2;
|
||||
if (angdif > -8 && angdif < 0) angdif = 0;
|
||||
actor->spr.__int_angle += angdif;
|
||||
}
|
||||
|
@ -3524,7 +3524,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
if (ps[playernum].newOwner != nullptr)
|
||||
goalang = getangle(ps[playernum].opos.XY() - actor->spr.pos.XY());
|
||||
else goalang = getangle(ps[playernum].pos.XY() - actor->spr.pos.XY());
|
||||
angdif = Sgn(getincangle(actor->spr.__int_angle, goalang)) << 5;
|
||||
angdif = Sgn(getincangle(actor->int_ang(), goalang)) << 5;
|
||||
if (angdif > -32 && angdif < 0)
|
||||
{
|
||||
angdif = 0;
|
||||
|
@ -3545,7 +3545,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
double newx = ps[playernum].pos.X + (ps[playernum].vel.X / 768) * inttoworld;
|
||||
double newy = ps[playernum].pos.Y + (ps[playernum].vel.Y / 768) * inttoworld;
|
||||
goalang = getangle(newx - actor->spr.pos.X, newy - actor->spr.pos.Y);
|
||||
angdif = getincangle(actor->spr.__int_angle, goalang) >> 2;
|
||||
angdif = getincangle(actor->int_ang(), goalang) >> 2;
|
||||
if (angdif > -8 && angdif < 0) angdif = 0;
|
||||
actor->spr.__int_angle += angdif;
|
||||
}
|
||||
|
@ -3641,7 +3641,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
actor->spr.pos.Z = actor->ceilingz + 32;
|
||||
|
||||
daxvel = actor->spr.xvel;
|
||||
angdif = actor->spr.__int_angle;
|
||||
angdif = actor->int_ang();
|
||||
|
||||
if (a && actor->spr.picnum != ROTATEGUN)
|
||||
{
|
||||
|
|
|
@ -631,7 +631,7 @@ void movefallers_r(void)
|
|||
if (act->temp_data[0] == 0)
|
||||
{
|
||||
act->spr.pos.Z -= 16;
|
||||
act->temp_data[1] = act->spr.__int_angle;
|
||||
act->temp_data[1] = act->int_ang();
|
||||
int x = act->spr.extra;
|
||||
int j = fi.ifhitbyweapon(act);
|
||||
if (j >= 0)
|
||||
|
@ -724,7 +724,7 @@ static void movecrack(DDukeActor* actor)
|
|||
if (actor->spr.hitag > 0)
|
||||
{
|
||||
actor->temp_data[0] = actor->spr.cstat;
|
||||
actor->temp_data[1] = actor->spr.__int_angle;
|
||||
actor->temp_data[1] = actor->int_ang();
|
||||
int j = fi.ifhitbyweapon(actor);
|
||||
if (gs.actorinfo[j].flags2 & SFLAG2_EXPLOSIVE)
|
||||
{
|
||||
|
@ -936,7 +936,7 @@ static void chickenarrow(DDukeActor* actor)
|
|||
{
|
||||
int ang, ang2, ang3;
|
||||
ang = getangle(ts->int_pos().X - actor->int_pos().X, ts->int_pos().Y - actor->int_pos().Y);
|
||||
ang2 = ang - actor->spr.__int_angle;
|
||||
ang2 = ang - actor->int_ang();
|
||||
ang3 = abs(ang2);
|
||||
if (ang2 < 100)
|
||||
{
|
||||
|
@ -1053,7 +1053,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
|
|||
if (proj->spr.picnum != RPG && (!isRRRA() || proj->spr.picnum != RPG2) && proj->spr.picnum != FREEZEBLAST && proj->spr.picnum != SPIT && proj->spr.picnum != SHRINKSPARK && (wal->overpicnum == MIRROR || wal->picnum == MIRROR))
|
||||
{
|
||||
int k = getangle(wal->delta());
|
||||
proj->spr.__int_angle = ((k << 1) - proj->spr.__int_angle) & 2047;
|
||||
proj->spr.__int_angle = ((k << 1) - proj->int_ang()) & 2047;
|
||||
proj->SetOwner(proj);
|
||||
spawn(proj, TRANSPORTERSTAR);
|
||||
return true;
|
||||
|
@ -1076,7 +1076,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
|
|||
}
|
||||
|
||||
int k = getangle(wal->delta());
|
||||
proj->spr.__int_angle = ((k << 1) - proj->spr.__int_angle) & 2047;
|
||||
proj->spr.__int_angle = ((k << 1) - proj->int_ang()) & 2047;
|
||||
return true;
|
||||
}
|
||||
if (proj->spr.picnum == SHRINKSPARK)
|
||||
|
@ -1087,7 +1087,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
|
|||
}
|
||||
if (proj->spr.extra <= 0)
|
||||
{
|
||||
proj->add_int_pos({ bcos(proj->spr.__int_angle, -7), bsin(proj->spr.__int_angle, -7), 0 });
|
||||
proj->add_int_pos({ bcos(proj->int_ang(), -7), bsin(proj->int_ang(), -7), 0 });
|
||||
auto Owner = proj->GetOwner();
|
||||
if (!isRRRA() || !Owner || (Owner->spr.picnum != CHEER && Owner->spr.picnum != CHEERSTAYPUT))
|
||||
{
|
||||
|
@ -1111,7 +1111,7 @@ static bool weaponhitwall(DDukeActor *proj, walltype* wal, const vec3_t& oldpos)
|
|||
}
|
||||
|
||||
int k = getangle(wal->delta());
|
||||
proj->spr.__int_angle = ((k << 1) - proj->spr.__int_angle) & 2047;
|
||||
proj->spr.__int_angle = ((k << 1) - proj->int_ang()) & 2047;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -1229,8 +1229,8 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
|
||||
Collision coll;
|
||||
movesprite_ex(proj,
|
||||
MulScale(k, bcos(proj->spr.__int_angle), 14),
|
||||
MulScale(k, bsin(proj->spr.__int_angle), 14), ll, CLIPMASK1, coll);
|
||||
MulScale(k, bcos(proj->int_ang()), 14),
|
||||
MulScale(k, bsin(proj->int_ang()), 14), ll, CLIPMASK1, coll);
|
||||
|
||||
if ((proj->spr.picnum == RPG || (isRRRA() && isIn(proj->spr.picnum, RPG2, RRTILE1790))) && proj->temp_actor != nullptr)
|
||||
if (FindDistance2D(proj->int_pos().vec2 - proj->temp_actor->int_pos().vec2) < 256)
|
||||
|
@ -1263,8 +1263,8 @@ static void weaponcommon_r(DDukeActor *proj)
|
|||
for (k = -3; k < 2; k++)
|
||||
{
|
||||
auto x = EGS(proj->sector(),
|
||||
proj->int_pos().X + MulScale(k, bcos(proj->spr.__int_angle), 9),
|
||||
proj->int_pos().Y + MulScale(k, bsin(proj->spr.__int_angle), 9),
|
||||
proj->int_pos().X + MulScale(k, bcos(proj->int_ang()), 9),
|
||||
proj->int_pos().Y + MulScale(k, bsin(proj->int_ang()), 9),
|
||||
proj->int_pos().Z + ((k * Sgn(proj->spr.zvel)) * abs(proj->spr.zvel / 24)), FIRELASER, -40 + (k << 2),
|
||||
proj->spr.xrepeat, proj->spr.yrepeat, 0, 0, 0, proj->GetOwner(), 5);
|
||||
|
||||
|
@ -1658,7 +1658,7 @@ void movetransports_r(void)
|
|||
if (spawned && sectlotag == 1 && act2->spr.statnum == 4)
|
||||
{
|
||||
spawned->spr.xvel = act2->spr.xvel >> 1;
|
||||
spawned->spr.__int_angle = act2->spr.__int_angle;
|
||||
spawned->spr.__int_angle = act2->int_ang();
|
||||
ssp(spawned, CLIPMASK0);
|
||||
}
|
||||
}
|
||||
|
@ -1671,7 +1671,7 @@ void movetransports_r(void)
|
|||
if (checkcursectnums(act->sector()) == -1 && checkcursectnums(Owner->sector()) == -1)
|
||||
{
|
||||
act2->add_int_pos({ (Owner->int_pos().X - act->int_pos().X), (Owner->int_pos().Y - act->int_pos().Y), -(act->int_pos().Z - Owner->sector()->int_floorz()) });
|
||||
act2->spr.__int_angle = Owner->spr.__int_angle;
|
||||
act2->spr.__int_angle = Owner->int_ang();
|
||||
|
||||
act2->backupang();
|
||||
|
||||
|
@ -1728,8 +1728,8 @@ void movetransports_r(void)
|
|||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
|
||||
movesprite_ex(act2, MulScale(act2->spr.xvel, bcos(act2->spr.__int_angle), 14),
|
||||
MulScale(act2->spr.xvel, bsin(act2->spr.__int_angle), 14), 0, CLIPMASK1, coll);
|
||||
movesprite_ex(act2, MulScale(act2->spr.xvel, bcos(act2->int_ang()), 14),
|
||||
MulScale(act2->spr.xvel, bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
|
||||
|
||||
break;
|
||||
case 161:
|
||||
|
@ -1740,8 +1740,8 @@ void movetransports_r(void)
|
|||
|
||||
ChangeActorSect(act2, Owner->sector());
|
||||
|
||||
movesprite_ex(act2, MulScale(act2->spr.xvel, bcos(act2->spr.__int_angle), 14),
|
||||
MulScale(act2->spr.xvel, bsin(act2->spr.__int_angle), 14), 0, CLIPMASK1, coll);
|
||||
movesprite_ex(act2, MulScale(act2->spr.xvel, bcos(act2->int_ang()), 14),
|
||||
MulScale(act2->spr.xvel, bsin(act2->int_ang()), 14), 0, CLIPMASK1, coll);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -1947,8 +1947,8 @@ static void rrra_specialstats()
|
|||
S_PlaySound(183);
|
||||
act->spr.extra--;
|
||||
int j = movesprite_ex(act,
|
||||
MulScale(act->spr.hitag, bcos(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.hitag, bsin(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.hitag, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.hitag, bsin(act->int_ang()), 14),
|
||||
act->spr.hitag << 1, CLIPMASK0, coll);
|
||||
if (j > 0)
|
||||
{
|
||||
|
@ -2175,7 +2175,7 @@ void rr_specialstats()
|
|||
act->spr.lotag--;
|
||||
if (act->spr.lotag < 0)
|
||||
{
|
||||
spawn(act, RRTILE3190)->spr.__int_angle = act->spr.__int_angle;
|
||||
spawn(act, RRTILE3190)->spr.__int_angle = act->int_ang();
|
||||
act->spr.lotag = 128;
|
||||
}
|
||||
break;
|
||||
|
@ -2183,7 +2183,7 @@ void rr_specialstats()
|
|||
act->spr.lotag--;
|
||||
if (act->spr.lotag < 0)
|
||||
{
|
||||
spawn(act, RRTILE3192)->spr.__int_angle = act->spr.__int_angle;
|
||||
spawn(act, RRTILE3192)->spr.__int_angle = act->int_ang();
|
||||
act->spr.lotag = 256;
|
||||
}
|
||||
break;
|
||||
|
@ -2208,7 +2208,7 @@ void rr_specialstats()
|
|||
act->spr.lotag--;
|
||||
if (act->spr.lotag < 0)
|
||||
{
|
||||
spawn(act, RRTILE3120)->spr.__int_angle = act->spr.__int_angle;
|
||||
spawn(act, RRTILE3120)->spr.__int_angle = act->int_ang();
|
||||
act->spr.lotag = 448;
|
||||
}
|
||||
break;
|
||||
|
@ -2216,7 +2216,7 @@ void rr_specialstats()
|
|||
act->spr.lotag--;
|
||||
if (act->spr.lotag < 0)
|
||||
{
|
||||
spawn(act, RRTILE3122)->spr.__int_angle = act->spr.__int_angle;
|
||||
spawn(act, RRTILE3122)->spr.__int_angle = act->int_ang();
|
||||
act->spr.lotag = 64;
|
||||
}
|
||||
break;
|
||||
|
@ -2224,7 +2224,7 @@ void rr_specialstats()
|
|||
act->spr.lotag--;
|
||||
if (act->spr.lotag < 0)
|
||||
{
|
||||
spawn(act, RRTILE3123)->spr.__int_angle = act->spr.__int_angle;
|
||||
spawn(act, RRTILE3123)->spr.__int_angle = act->int_ang();
|
||||
act->spr.lotag = 512;
|
||||
}
|
||||
break;
|
||||
|
@ -2232,7 +2232,7 @@ void rr_specialstats()
|
|||
act->spr.lotag--;
|
||||
if (act->spr.lotag < 0)
|
||||
{
|
||||
spawn(act, RRTILE3124)->spr.__int_angle = act->spr.__int_angle;
|
||||
spawn(act, RRTILE3124)->spr.__int_angle = act->int_ang();
|
||||
act->spr.lotag = 224;
|
||||
}
|
||||
break;
|
||||
|
@ -2379,8 +2379,8 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
|
||||
Collision coll;
|
||||
movesprite_ex(actor,
|
||||
MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14),
|
||||
MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14),
|
||||
MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14),
|
||||
MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14),
|
||||
actor->spr.zvel, CLIPMASK0, coll);
|
||||
|
||||
if (actor->sector()->lotag == 1 && actor->spr.zvel == 0)
|
||||
|
@ -2444,7 +2444,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->spr.xvel = 0;
|
||||
goto DETONATEB;
|
||||
}
|
||||
actor->spr.__int_angle = ((k << 1) - actor->spr.__int_angle) & 2047;
|
||||
actor->spr.__int_angle = ((k << 1) - actor->int_ang()) & 2047;
|
||||
actor->spr.xvel >>= 1;
|
||||
}
|
||||
|
||||
|
@ -2567,15 +2567,15 @@ static int henstand(DDukeActor *actor)
|
|||
makeitfall(actor);
|
||||
Collision coll;
|
||||
movesprite_ex(actor,
|
||||
MulScale(bcos(actor->spr.__int_angle), actor->spr.xvel, 14),
|
||||
MulScale(bsin(actor->spr.__int_angle), actor->spr.xvel, 14),
|
||||
MulScale(bcos(actor->int_ang()), actor->spr.xvel, 14),
|
||||
MulScale(bsin(actor->int_ang()), actor->spr.xvel, 14),
|
||||
actor->spr.zvel, CLIPMASK0, coll);
|
||||
if (coll.type)
|
||||
{
|
||||
if (coll.type == kHitWall)
|
||||
{
|
||||
int k = getangle(coll.hitWall->delta());
|
||||
actor->spr.__int_angle = ((k << 1) - actor->spr.__int_angle) & 2047;
|
||||
actor->spr.__int_angle = ((k << 1) - actor->int_ang()) & 2047;
|
||||
}
|
||||
else if (coll.type == kHitSprite)
|
||||
{
|
||||
|
@ -2589,7 +2589,7 @@ static int henstand(DDukeActor *actor)
|
|||
{
|
||||
ns->spr.xvel = 32;
|
||||
ns->spr.lotag = 40;
|
||||
ns->spr.__int_angle = actor->spr.__int_angle;
|
||||
ns->spr.__int_angle = actor->int_ang();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2683,8 +2683,8 @@ void moveactors_r(void)
|
|||
if (sectp->lotag == 903)
|
||||
makeitfall(act);
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
act->spr.zvel,CLIPMASK0, coll);
|
||||
switch (sectp->lotag)
|
||||
{
|
||||
|
@ -2724,8 +2724,8 @@ void moveactors_r(void)
|
|||
}
|
||||
makeitfall(act);
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
act->spr.zvel,CLIPMASK0, coll);
|
||||
if (coll.type > kHitSector)
|
||||
{
|
||||
|
@ -2755,8 +2755,8 @@ void moveactors_r(void)
|
|||
}
|
||||
makeitfall(act);
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
act->spr.zvel,CLIPMASK0, coll);
|
||||
if (act->int_pos().Z >= sectp->int_floorz() - (8<<8))
|
||||
{
|
||||
|
@ -2854,8 +2854,8 @@ void moveactors_r(void)
|
|||
if (act->spr.xvel)
|
||||
{
|
||||
movesprite_ex(act,
|
||||
MulScale(act->spr.xvel, bcos(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->spr.__int_angle), 14),
|
||||
MulScale(act->spr.xvel, bcos(act->int_ang()), 14),
|
||||
MulScale(act->spr.xvel, bsin(act->int_ang()), 14),
|
||||
act->spr.zvel,CLIPMASK0, coll);
|
||||
act->spr.xvel--;
|
||||
}
|
||||
|
@ -3494,7 +3494,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if (ps[pnum].newOwner != nullptr)
|
||||
goalang = getangle(ps[pnum].opos.XY() - actor->spr.pos.XY());
|
||||
else goalang = getangle(ps[pnum].pos.XY() - actor->spr.pos.XY());
|
||||
angdif = getincangle(actor->spr.__int_angle, goalang) >> 2;
|
||||
angdif = getincangle(actor->int_ang(), goalang) >> 2;
|
||||
if (angdif > -8 && angdif < 0) angdif = 0;
|
||||
actor->spr.__int_angle += angdif;
|
||||
}
|
||||
|
@ -3507,7 +3507,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if (ps[pnum].newOwner != nullptr)
|
||||
goalang = getangle(ps[pnum].opos.XY() - actor->spr.pos.XY());
|
||||
else goalang = getangle(ps[pnum].pos.XY() - actor->spr.pos.XY());
|
||||
angdif = Sgn(getincangle(actor->spr.__int_angle, goalang)) << 5;
|
||||
angdif = Sgn(getincangle(actor->int_ang(), goalang)) << 5;
|
||||
if (angdif > -32 && angdif < 0)
|
||||
{
|
||||
angdif = 0;
|
||||
|
@ -3523,7 +3523,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if (ps[pnum].newOwner != nullptr)
|
||||
goalang = (getangle(ps[pnum].opos.XY() - actor->spr.pos.XY()) + 1024) & 2047;
|
||||
else goalang = (getangle(ps[pnum].pos.XY() - actor->spr.pos.XY()) + 1024) & 2047;
|
||||
angdif = Sgn(getincangle(actor->spr.__int_angle, goalang)) << 5;
|
||||
angdif = Sgn(getincangle(actor->int_ang(), goalang)) << 5;
|
||||
if (angdif > -32 && angdif < 0)
|
||||
{
|
||||
angdif = 0;
|
||||
|
@ -3589,7 +3589,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
double newx = ps[pnum].pos.X + (ps[pnum].vel.X / 768) * inttoworld;
|
||||
double newy = ps[pnum].pos.Y + (ps[pnum].vel.Y / 768) * inttoworld;
|
||||
goalang = getangle(newx - actor->spr.pos.X, newy - actor->spr.pos.Y);
|
||||
angdif = getincangle(actor->spr.__int_angle, goalang) >> 2;
|
||||
angdif = getincangle(actor->int_ang(), goalang) >> 2;
|
||||
if (angdif > -8 && angdif < 0) angdif = 0;
|
||||
actor->spr.__int_angle += angdif;
|
||||
}
|
||||
|
@ -3679,7 +3679,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
actor->spr.pos.Z = actor->ceilingz + 32;
|
||||
|
||||
daxvel = actor->spr.xvel;
|
||||
angdif = actor->spr.__int_angle;
|
||||
angdif = actor->int_ang();
|
||||
|
||||
if (a)
|
||||
{
|
||||
|
|
|
@ -220,8 +220,8 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
|||
else
|
||||
{
|
||||
t->__int_angle = getangle(x - t->int_pos().X, y - t->int_pos().Y);
|
||||
t->pos.X = OwnerAc->spr.pos.X + buildang(t->__int_angle).fcos();
|
||||
t->pos.Y = OwnerAc->spr.pos.Y + buildang(t->__int_angle).fsin();
|
||||
t->pos.X = OwnerAc->spr.pos.X + buildang(t->int_ang()).fcos();
|
||||
t->pos.Y = OwnerAc->spr.pos.Y + buildang(t->int_ang()).fsin();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -705,7 +705,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
|||
t->picnum = OwnerAc->dispicnum;
|
||||
t->pal = OwnerAc->spr.pal;
|
||||
t->shade = OwnerAc->spr.shade;
|
||||
t->__int_angle = OwnerAc->spr.__int_angle;
|
||||
t->__int_angle = OwnerAc->int_ang();
|
||||
t->cstat = CSTAT_SPRITE_TRANSLUCENT | OwnerAc->spr.cstat;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -214,8 +214,8 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
|||
else
|
||||
{
|
||||
t->__int_angle = getangle(x - t->int_pos().X, y - t->int_pos().Y);
|
||||
t->pos.X = OwnerAc->spr.pos.X + buildang(t->__int_angle).fcos();
|
||||
t->pos.Y = OwnerAc->spr.pos.Y + buildang(t->__int_angle).fsin();
|
||||
t->pos.X = OwnerAc->spr.pos.X + buildang(t->int_ang()).fcos();
|
||||
t->pos.Y = OwnerAc->spr.pos.Y + buildang(t->int_ang()).fsin();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -938,7 +938,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
|
|||
t->picnum = OwnerAc->dispicnum;
|
||||
t->pal = OwnerAc->spr.pal;
|
||||
t->shade = OwnerAc->spr.shade;
|
||||
t->__int_angle = OwnerAc->spr.__int_angle;
|
||||
t->__int_angle = OwnerAc->int_ang();
|
||||
t->cstat = CSTAT_SPRITE_TRANSLUCENT | OwnerAc->spr.cstat;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -433,8 +433,8 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
x1 = DMulScale(ox, xvect, -oy, yvect, 16);
|
||||
y1 = DMulScale(oy, xvect, ox, yvect, 16);
|
||||
|
||||
ox = bcos(act->spr.__int_angle, -7);
|
||||
oy = bsin(act->spr.__int_angle, -7);
|
||||
ox = bcos(act->int_ang(), -7);
|
||||
oy = bsin(act->int_ang(), -7);
|
||||
x2 = DMulScale(ox, xvect, -oy, yvect, 16);
|
||||
y2 = DMulScale(oy, xvect, ox, yvect, 16);
|
||||
|
||||
|
@ -454,7 +454,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
tilenum = act->spr.picnum;
|
||||
xoff = tileLeftOffset(tilenum) + act->spr.xoffset;
|
||||
if ((act->spr.cstat & CSTAT_SPRITE_XFLIP) > 0) xoff = -xoff;
|
||||
k = act->spr.__int_angle;
|
||||
k = act->int_ang();
|
||||
l = act->spr.xrepeat;
|
||||
dax = bsin(k) * l;
|
||||
day = -bcos(k) * l;
|
||||
|
@ -495,7 +495,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
if ((act->spr.cstat & CSTAT_SPRITE_XFLIP) > 0) xoff = -xoff;
|
||||
if ((act->spr.cstat & CSTAT_SPRITE_YFLIP) > 0) yoff = -yoff;
|
||||
|
||||
k = act->spr.__int_angle;
|
||||
k = act->int_ang();
|
||||
cosang = bcos(k);
|
||||
sinang = bsin(k);
|
||||
xspan = tileWidth(tilenum);
|
||||
|
|
|
@ -1233,7 +1233,7 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
break;
|
||||
case ACTOR_ANG:
|
||||
if (bSet) act->spr.__int_angle = lValue;
|
||||
else SetGameVarID(lVar2, act->spr.__int_angle, sActor, sPlayer);
|
||||
else SetGameVarID(lVar2, act->int_ang(), sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_OWNER:
|
||||
// there is no way to handle this well because we do not know whether this is an actor or not. Pity.
|
||||
|
@ -1973,11 +1973,11 @@ int ParseState::parse(void)
|
|||
break;
|
||||
case concmd_strafeleft:
|
||||
insptr++;
|
||||
movesprite_ex(g_ac, -bsin(g_ac->spr.__int_angle, -10), bcos(g_ac->spr.__int_angle, -10), g_ac->spr.zvel, CLIPMASK0, coll);
|
||||
movesprite_ex(g_ac, -bsin(g_ac->int_ang(), -10), bcos(g_ac->int_ang(), -10), g_ac->spr.zvel, CLIPMASK0, coll);
|
||||
break;
|
||||
case concmd_straferight:
|
||||
insptr++;
|
||||
movesprite_ex(g_ac, bsin(g_ac->spr.__int_angle, -10), -bcos(g_ac->spr.__int_angle, -10), g_ac->spr.zvel, CLIPMASK0, coll);
|
||||
movesprite_ex(g_ac, bsin(g_ac->int_ang(), -10), -bcos(g_ac->int_ang(), -10), g_ac->spr.zvel, CLIPMASK0, coll);
|
||||
break;
|
||||
case concmd_larrybird:
|
||||
insptr++;
|
||||
|
@ -2484,7 +2484,7 @@ int ParseState::parse(void)
|
|||
if( g_ac->sector()->lotag == 0 )
|
||||
{
|
||||
HitInfo hit{};
|
||||
neartag({ g_ac->int_pos().X, g_ac->int_pos().Y, g_ac->int_pos().Z - (32 << 8) }, g_ac->sector(), g_ac->spr.__int_angle, hit, 768, 1);
|
||||
neartag({ g_ac->int_pos().X, g_ac->int_pos().Y, g_ac->int_pos().Z - (32 << 8) }, g_ac->sector(), g_ac->int_ang(), hit, 768, 1);
|
||||
auto sectp = hit.hitSector;
|
||||
if (sectp)
|
||||
{
|
||||
|
@ -2846,7 +2846,7 @@ int ParseState::parse(void)
|
|||
|
||||
case concmd_ifangdiffl:
|
||||
insptr++;
|
||||
j = abs(getincangle(ps[g_p].angle.ang.asbuild(),g_ac->spr.__int_angle));
|
||||
j = abs(getincangle(ps[g_p].angle.ang.asbuild(),g_ac->int_ang()));
|
||||
parseifelse( j <= *insptr);
|
||||
break;
|
||||
|
||||
|
@ -3162,7 +3162,7 @@ int ParseState::parse(void)
|
|||
int i;
|
||||
insptr++;
|
||||
i = *(insptr++); // ID of def
|
||||
SetGameVarID(i, g_ac->spr.__int_angle, g_ac, g_p);
|
||||
SetGameVarID(i, g_ac->int_ang(), g_ac, g_p);
|
||||
break;
|
||||
}
|
||||
case concmd_setactorangle:
|
||||
|
|
|
@ -175,7 +175,7 @@ int hits(DDukeActor* actor)
|
|||
else zoff = 0;
|
||||
|
||||
auto pos = actor->int_pos();
|
||||
hitscan(pos.withZOffset(-zoff), actor->sector(), { bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0 }, hit, CLIPMASK1);
|
||||
hitscan(pos.withZOffset(-zoff), actor->sector(), { bcos(actor->int_ang()), bsin(actor->int_ang()), 0 }, hit, CLIPMASK1);
|
||||
return (FindDistance2D(hit.hitpos.vec2 - actor->int_pos().vec2));
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ int hitasprite(DDukeActor* actor, DDukeActor** hitsp)
|
|||
else zoff = 0;
|
||||
|
||||
auto pos = actor->int_pos();
|
||||
hitscan(pos.withZOffset(-zoff), actor->sector(), { bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0 }, hit, CLIPMASK1);
|
||||
hitscan(pos.withZOffset(-zoff), actor->sector(), { bcos(actor->int_ang()), bsin(actor->int_ang()), 0 }, hit, CLIPMASK1);
|
||||
if (hitsp) *hitsp = hit.actor();
|
||||
|
||||
if (hit.hitWall != nullptr && (hit.hitWall->cstat & CSTAT_WALL_MASKED) && badguy(actor))
|
||||
|
@ -236,7 +236,7 @@ DDukeActor* aim(DDukeActor* actor, int aang)
|
|||
int dx1, dy1, dx2, dy2, dx3, dy3, smax, sdist;
|
||||
int xv, yv;
|
||||
|
||||
a = actor->spr.__int_angle;
|
||||
a = actor->int_ang();
|
||||
|
||||
// Autoaim from DukeGDX.
|
||||
if (actor->isPlayer())
|
||||
|
@ -252,7 +252,7 @@ DDukeActor* aim(DDukeActor* actor, int aang)
|
|||
int zvel = -plr->horizon.sum().asq16() >> 5;
|
||||
|
||||
HitInfo hit{};
|
||||
hitscan(plr->player_int_pos().withZOffset(1024), actor->sector(), { bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), zvel }, hit, CLIPMASK1);
|
||||
hitscan(plr->player_int_pos().withZOffset(1024), actor->sector(), { bcos(actor->int_ang()), bsin(actor->int_ang()), zvel }, hit, CLIPMASK1);
|
||||
|
||||
if (hit.actor() != nullptr)
|
||||
{
|
||||
|
|
|
@ -1026,7 +1026,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
|||
}
|
||||
else
|
||||
{
|
||||
sa = actor->spr.__int_angle;
|
||||
sa = actor->int_ang();
|
||||
sx = actor->int_pos().X;
|
||||
sy = actor->int_pos().Y;
|
||||
sz = actor->int_pos().Z - (actor->spr.yrepeat * tileHeight(actor->spr.picnum) << 1) + (4 << 8);
|
||||
|
|
|
@ -845,7 +845,7 @@ void shoot_r(DDukeActor* actor, int atwith)
|
|||
else
|
||||
{
|
||||
p = -1;
|
||||
sa = actor->spr.__int_angle;
|
||||
sa = actor->int_ang();
|
||||
sx = actor->int_pos().X;
|
||||
sy = actor->int_pos().Y;
|
||||
sz = actor->int_pos().Z - ((actor->spr.yrepeat * tileHeight(actor->spr.picnum)) << 1) + (4 << 8);
|
||||
|
@ -894,7 +894,7 @@ void shoot_r(DDukeActor* actor, int atwith)
|
|||
if (j)
|
||||
{
|
||||
j->spr.xvel = 32;
|
||||
j->spr.__int_angle = actor->spr.__int_angle;
|
||||
j->spr.__int_angle = actor->int_ang();
|
||||
j->add_int_z(-(5 << 8));
|
||||
}
|
||||
break;
|
||||
|
@ -905,7 +905,7 @@ void shoot_r(DDukeActor* actor, int atwith)
|
|||
if (j)
|
||||
{
|
||||
j->spr.xvel = 250;
|
||||
j->spr.__int_angle = actor->spr.__int_angle;
|
||||
j->spr.__int_angle = actor->int_ang();
|
||||
j->add_int_z(-(15 << 8));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -71,7 +71,7 @@ void premapcontroller(DDukeActor* ac)
|
|||
cyclers[numcyclers].shade1 = ac->spr.shade;
|
||||
cyclers[numcyclers].shade2 = ac->sector()->floorshade;
|
||||
cyclers[numcyclers].hitag = ac->spr.hitag;
|
||||
cyclers[numcyclers].state = (ac->spr.__int_angle == 1536);
|
||||
cyclers[numcyclers].state = (ac->int_ang() == 1536);
|
||||
numcyclers++;
|
||||
deletesprite(ac);
|
||||
break;
|
||||
|
@ -616,7 +616,7 @@ void resetpspritevars(int g)
|
|||
}
|
||||
|
||||
po[numplayersprites].opos = act->spr.pos;
|
||||
po[numplayersprites].oa = act->spr.__int_angle;
|
||||
po[numplayersprites].oa = act->int_ang();
|
||||
po[numplayersprites].os = act->sector();
|
||||
|
||||
numplayersprites++;
|
||||
|
|
|
@ -259,7 +259,7 @@ void displayrooms(int snum, double smoothratio, bool sceneonly)
|
|||
if (act->spr.yvel < 0) act->spr.yvel = -100;
|
||||
else if (act->spr.yvel > 199) act->spr.yvel = 300;
|
||||
|
||||
cang = buildang(interpolatedangle(ud.cameraactor->tempang, act->spr.__int_angle, smoothratio));
|
||||
cang = buildang(interpolatedangle(ud.cameraactor->tempang, act->int_ang(), smoothratio));
|
||||
|
||||
auto bh = buildhoriz(act->spr.yvel);
|
||||
auto cstat = act->spr.cstat;
|
||||
|
|
|
@ -1059,7 +1059,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
if (krand() & 3)
|
||||
{
|
||||
targ->spr.xvel = 164;
|
||||
targ->spr.__int_angle = proj->spr.__int_angle;
|
||||
targ->spr.__int_angle = proj->int_ang();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1431,7 +1431,7 @@ void checkhitsprite_d(DDukeActor* targ, DDukeActor* proj)
|
|||
|
||||
targ->attackertype = hitpic;
|
||||
targ->hitextra += proj->spr.extra;
|
||||
targ->hitang = proj->spr.__int_angle;
|
||||
targ->hitang = proj->int_ang();
|
||||
targ->SetHitOwner(Owner);
|
||||
}
|
||||
|
||||
|
|
|
@ -2100,7 +2100,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
if (krand() & 3)
|
||||
{
|
||||
targ->spr.xvel = 164;
|
||||
targ->spr.__int_angle = proj->spr.__int_angle;
|
||||
targ->spr.__int_angle = proj->int_ang();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -2363,7 +2363,7 @@ void checkhitsprite_r(DDukeActor* targ, DDukeActor* proj)
|
|||
targ->attackertype = proj->spr.picnum;
|
||||
targ->hitextra += proj->spr.extra;
|
||||
if (targ->spr.picnum != COW)
|
||||
targ->hitang = proj->spr.__int_angle;
|
||||
targ->hitang = proj->int_ang();
|
||||
targ->SetHitOwner(proj->GetOwner());
|
||||
}
|
||||
|
||||
|
|
|
@ -325,7 +325,7 @@ void S_GetCamera(vec3_t* c, int32_t* ca, sectortype** cs)
|
|||
{
|
||||
if (c) *c = ud.cameraactor->int_pos();
|
||||
if (cs) *cs = ud.cameraactor->sector();
|
||||
if (ca) *ca = ud.cameraactor->spr.__int_angle;
|
||||
if (ca) *ca = ud.cameraactor->int_ang();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ void spawninitdefault(DDukeActor* actj, DDukeActor *act)
|
|||
act->timetosleep = 0;
|
||||
|
||||
if (actj)
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ void spawntransporter(DDukeActor *actj, DDukeActor* act, bool beam)
|
|||
|
||||
act->spr.shade = -127;
|
||||
act->spr.cstat = CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
|
||||
act->spr.xvel = 128;
|
||||
ChangeActorStat(act, STAT_MISC);
|
||||
|
@ -407,7 +407,7 @@ void initfootprint(DDukeActor* actj, DDukeActor* act)
|
|||
|
||||
act->spr.cstat = CSTAT_SPRITE_ALIGNMENT_FLOOR;
|
||||
if ((ps[actj->spr.yvel].footprintcount & 1)) act->spr.cstat |= CSTAT_SPRITE_XFLIP;
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
}
|
||||
|
||||
act->set_int_z(sect->int_floorz());
|
||||
|
@ -441,7 +441,7 @@ void initshell(DDukeActor* actj, DDukeActor* act, bool isshell)
|
|||
}
|
||||
else
|
||||
{
|
||||
a = act->spr.__int_angle;
|
||||
a = act->int_ang();
|
||||
act->spr.pos.Z = actj->spr.pos.Z - gs.playerheight + 3;
|
||||
}
|
||||
|
||||
|
@ -638,7 +638,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
break;
|
||||
case SE_18_INCREMENTAL_SECTOR_RISE_FALL:
|
||||
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
actor->temp_data[1] = sectp->int_ceilingz();
|
||||
if (actor->spr.pal)
|
||||
|
@ -697,7 +697,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
bool ceiling = (abs(actor->temp_data[0] - actor->int_pos().Z) < abs(actor->temp_data[1] - actor->int_pos().Z));
|
||||
actor->spriteextra = ceiling;
|
||||
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
if (ceiling)
|
||||
sectp->setceilingz(actor->spr.pos.Z);
|
||||
|
@ -715,7 +715,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
sectp->ceilingstat ^= CSTAT_SECTOR_SKY;
|
||||
actor->temp_data[3] = 1;
|
||||
|
||||
if (!ceiling && actor->spr.__int_angle == 512)
|
||||
if (!ceiling && actor->int_ang() == 512)
|
||||
{
|
||||
sectp->ceilingstat ^= CSTAT_SECTOR_SKY;
|
||||
actor->temp_data[3] = 0;
|
||||
|
@ -724,7 +724,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
sectp->ceilingshade =
|
||||
sectp->floorshade;
|
||||
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
for (auto& wl : wallsofsector(sectp))
|
||||
{
|
||||
|
@ -931,7 +931,7 @@ void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors)
|
|||
act2->spr.lotag == SE_1_PIVOT &&
|
||||
act2->spr.hitag == actor->spr.hitag)
|
||||
{
|
||||
if (actor->spr.__int_angle == 512)
|
||||
if (actor->int_ang() == 512)
|
||||
{
|
||||
actor->copyXY(act2);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
break;
|
||||
case TONGUE:
|
||||
if (actj)
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.pos.Z -= gs.playerheight;
|
||||
act->spr.zvel = 256 - (krand() & 511);
|
||||
act->spr.xvel = 64 - (krand() & 127);
|
||||
|
@ -340,7 +340,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
ssp(act, CLIPMASK0);
|
||||
act->temp_data[0] = 17;
|
||||
act->temp_data[2] = 0;
|
||||
act->temp_data[5] = act->spr.__int_angle;
|
||||
act->temp_data[5] = act->int_ang();
|
||||
[[fallthrough]];
|
||||
|
||||
case SPACEMARINE:
|
||||
|
@ -607,7 +607,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
if (actj)
|
||||
{
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.shade = -64;
|
||||
act->spr.cstat = CSTAT_SPRITE_YCENTER | randomXFlip();
|
||||
}
|
||||
|
@ -683,7 +683,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
if (act->spr.picnum == WATERBUBBLE)
|
||||
{
|
||||
if (actj)
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.xrepeat = act->spr.yrepeat = 4;
|
||||
}
|
||||
else act->spr.xrepeat = act->spr.yrepeat = 32;
|
||||
|
@ -1105,7 +1105,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case STEAM:
|
||||
if (actj)
|
||||
{
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
|
||||
act->spr.xrepeat = act->spr.yrepeat = 1;
|
||||
act->spr.xvel = -8;
|
||||
|
|
|
@ -283,7 +283,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
break;
|
||||
case TONGUE:
|
||||
if (actj)
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.pos.Z -= gs.playerheight;
|
||||
act->spr.zvel = 256 - (krand() & 511);
|
||||
act->spr.xvel = 64 - (krand() & 127);
|
||||
|
@ -617,7 +617,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case SMALLSMOKE:
|
||||
if (actj)
|
||||
{
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.shade = -64;
|
||||
act->spr.cstat = CSTAT_SPRITE_YCENTER | randomXFlip();
|
||||
}
|
||||
|
@ -688,7 +688,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
if (act->spr.picnum == WATERBUBBLE)
|
||||
{
|
||||
if (actj)
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.xrepeat = act->spr.yrepeat = 1 + (krand() & 7);
|
||||
}
|
||||
else
|
||||
|
@ -1355,7 +1355,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
case STEAM:
|
||||
if (actj)
|
||||
{
|
||||
act->spr.__int_angle = actj->spr.__int_angle;
|
||||
act->spr.__int_angle = actj->int_ang();
|
||||
act->spr.cstat = CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
|
||||
act->spr.xrepeat = act->spr.yrepeat = 1;
|
||||
act->spr.xvel = -8;
|
||||
|
|
|
@ -56,7 +56,7 @@ void BuildAnubis(DExhumedActor* ap, int x, int y, int z, sectortype* pSector, in
|
|||
x = ap->int_pos().X;
|
||||
y = ap->int_pos().Y;
|
||||
z = ap->sector()->int_floorz();
|
||||
nAngle = ap->spr.__int_angle;
|
||||
nAngle = ap->int_ang();
|
||||
}
|
||||
|
||||
ap->set_int_pos({ x, y, z });
|
||||
|
@ -159,8 +159,8 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
ap->nFrame = 0;
|
||||
ap->pTarget = pTarget;
|
||||
|
||||
ap->spr.xvel = bcos(ap->spr.__int_angle, -2);
|
||||
ap->spr.yvel = bsin(ap->spr.__int_angle, -2);
|
||||
ap->spr.xvel = bcos(ap->int_ang(), -2);
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -183,7 +183,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
if (move.actor() == pTarget)
|
||||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - ap->int_pos().X, pTarget->int_pos().Y - ap->int_pos().Y);
|
||||
int nAngDiff = AngleDiff(ap->spr.__int_angle, nAng);
|
||||
int nAngDiff = AngleDiff(ap->int_ang(), nAng);
|
||||
|
||||
if (nAngDiff < 64)
|
||||
{
|
||||
|
@ -198,8 +198,8 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
case kHitWall:
|
||||
{
|
||||
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);
|
||||
ap->spr.xvel = bcos(ap->int_ang(), -2);
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -262,8 +262,8 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
{
|
||||
ap->nAction = 1;
|
||||
|
||||
ap->spr.xvel = bcos(ap->spr.__int_angle, -2);
|
||||
ap->spr.yvel = bsin(ap->spr.__int_angle, -2);
|
||||
ap->spr.xvel = bcos(ap->int_ang(), -2);
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
ap->nFrame = 0;
|
||||
}
|
||||
else
|
||||
|
@ -271,7 +271,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
// loc_25718:
|
||||
if (nFlag & 0x80)
|
||||
{
|
||||
BuildBullet(ap, 8, -1, ap->spr.__int_angle, pTarget, 1);
|
||||
BuildBullet(ap, 8, -1, ap->int_ang(), pTarget, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -240,8 +240,8 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo
|
|||
int xVel = pHitActor->spr.xvel;
|
||||
int yVel = pHitActor->spr.yvel;
|
||||
|
||||
pHitActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
|
||||
pHitActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
|
||||
pHitActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pHitActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
|
||||
MoveCreature(pHitActor);
|
||||
|
||||
|
@ -433,7 +433,7 @@ MOVEEND:
|
|||
dz = -bsin(pBullet->nPitch, 3);
|
||||
else
|
||||
dz = -pBullet->nPitch * 512;
|
||||
hitscan(startPos, pActor->sector(), { bcos(pActor->spr.__int_angle), bsin(pActor->spr.__int_angle), dz }, hit, CLIPMASK1);
|
||||
hitscan(startPos, pActor->sector(), { bcos(pActor->int_ang()), bsin(pActor->int_ang()), dz }, hit, CLIPMASK1);
|
||||
x2 = hit.hitpos.X;
|
||||
y2 = hit.hitpos.Y;
|
||||
z2 = hit.hitpos.Z;
|
||||
|
|
|
@ -149,7 +149,7 @@ void BuildFish(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->int_pos().Z;
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
ChangeActorStat(pActor, 103);
|
||||
}
|
||||
|
||||
|
@ -190,8 +190,8 @@ void IdleFish(DExhumedActor* pActor, int edx)
|
|||
pActor->spr.__int_angle += (256 - RandomSize(9)) + 1024;
|
||||
pActor->spr.__int_angle &= kAngleMask;
|
||||
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -8);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -8);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -8);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -8);
|
||||
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -377,8 +377,8 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
|
||||
if (z <= nHeight)
|
||||
{
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -5) - bcos(pActor->spr.__int_angle, -7);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -5) - bsin(pActor->spr.__int_angle, -7);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -5) - bcos(pActor->int_ang(), -7);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -5) - bsin(pActor->int_ang(), -7);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -55,14 +55,14 @@ void ThrowGrenade(int nPlayer, int, int, int ecx, int push1)
|
|||
DExhumedActor* pActor = PlayerList[nPlayer].pPlayerGrenade;
|
||||
auto pPlayerActor = PlayerList[nPlayer].pActor;
|
||||
|
||||
int nAngle = pPlayerActor->spr.__int_angle;
|
||||
int nAngle = pPlayerActor->int_ang();
|
||||
|
||||
ChangeActorSect(pActor, PlayerList[nPlayer].pPlayerViewSect);
|
||||
|
||||
pActor->set_int_pos(pPlayerActor->int_pos());
|
||||
|
||||
if (nAngle < 0) {
|
||||
nAngle = pPlayerActor->spr.__int_angle;
|
||||
nAngle = pPlayerActor->int_ang();
|
||||
}
|
||||
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
|
@ -112,7 +112,7 @@ void BuildGrenade(int nPlayer)
|
|||
pActor->spr.clipdist = 30;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = pPlayerActor->spr.__int_angle;
|
||||
pActor->spr.__int_angle = pPlayerActor->int_ang();
|
||||
pActor->spr.intowner = nPlayer;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
|
@ -171,7 +171,7 @@ void ExplodeGrenade(DExhumedActor* pActor)
|
|||
if (pActor->nTurn < 0)
|
||||
{
|
||||
auto pPlayerActor = PlayerList[nPlayer].pActor;
|
||||
int nAngle = pPlayerActor->spr.__int_angle;
|
||||
int nAngle = pPlayerActor->int_ang();
|
||||
|
||||
pActor->set_int_pos({ bcos(nAngle, -5) + pPlayerActor->int_pos().X, bsin(nAngle, -5) + pPlayerActor->int_pos().Y, pPlayerActor->int_pos().Z });
|
||||
|
||||
|
|
|
@ -245,7 +245,7 @@ Collision CheckCloseRange(int nPlayer, int *x, int *y, int *z, sectortype* *ppSe
|
|||
{
|
||||
auto pActor = PlayerList[nPlayer].pActor;
|
||||
|
||||
int ang = pActor->spr.__int_angle;
|
||||
int ang = pActor->int_ang();
|
||||
int xVect = bcos(ang);
|
||||
int yVect = bsin(ang);
|
||||
|
||||
|
@ -647,7 +647,7 @@ loc_flag:
|
|||
}
|
||||
|
||||
int nAmmoType = WeaponInfo[nWeapon].nAmmoType;
|
||||
int nAngle = pPlayerActor->spr.__int_angle;
|
||||
int nAngle = pPlayerActor->int_ang();
|
||||
int theX = pPlayerActor->int_pos().X;
|
||||
int theY = pPlayerActor->int_pos().Y;
|
||||
int theZ = pPlayerActor->int_pos().Z;
|
||||
|
@ -831,8 +831,8 @@ loc_flag:
|
|||
BuildSnake(nPlayer, nHeight);
|
||||
nQuake[nPlayer] = 512;
|
||||
|
||||
PlayerList[nPlayer].nDamage.X -= bcos(pPlayerActor->spr.__int_angle, 9);
|
||||
PlayerList[nPlayer].nDamage.Y -= bsin(pPlayerActor->spr.__int_angle, 9);
|
||||
PlayerList[nPlayer].nDamage.X -= bcos(pPlayerActor->int_ang(), 9);
|
||||
PlayerList[nPlayer].nDamage.Y -= bsin(pPlayerActor->int_ang(), 9);
|
||||
break;
|
||||
}
|
||||
case kWeaponRing:
|
||||
|
|
|
@ -628,7 +628,7 @@ void ProcessSpriteTag(DExhumedActor* pActor, int nLotag, int nHitag)
|
|||
{
|
||||
auto pSector = pActor->sector();
|
||||
pSector->Speed = nSpeed;
|
||||
pSector->Flag |= pActor->spr.__int_angle;
|
||||
pSector->Flag |= pActor->int_ang();
|
||||
|
||||
DeleteActor(pActor);
|
||||
return;
|
||||
|
|
|
@ -106,7 +106,7 @@ void BuildLava(DExhumedActor* pActor, int x, int y, int, sectortype* pSector, in
|
|||
else
|
||||
{
|
||||
pSector = pActor->sector();
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
|
||||
|
@ -312,7 +312,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
if (coll.actor() == pTarget)
|
||||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
if (AngleDiff(pActor->spr.__int_angle, nAng) < 64)
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -353,7 +353,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
int nHeight = GetActorHeight(pActor);
|
||||
GetUpAngle(pActor, -64000, pTarget, (-(nHeight >> 1)));
|
||||
|
||||
BuildBullet(pActor, 10, -1, pActor->spr.__int_angle, pTarget, 1);
|
||||
BuildBullet(pActor, 10, -1, pActor->int_ang(), pTarget, 1);
|
||||
}
|
||||
else if (var_1C)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ void BuildLion(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->sector()->int_floorz();
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
}
|
||||
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
@ -238,8 +238,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->pTarget = pTarget;
|
||||
return;
|
||||
}
|
||||
|
@ -254,8 +254,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (RandomBit())
|
||||
{
|
||||
pActor->spr.__int_angle = RandomWord() & kAngleMask;
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -294,8 +294,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
// loc_378FA:
|
||||
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);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
}
|
||||
else if (nMov.type == kHitSprite)
|
||||
|
@ -313,7 +313,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
|
||||
if (AngleDiff(pActor->spr.__int_angle, nAng) < 64)
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 3;
|
||||
}
|
||||
|
@ -326,8 +326,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
// loc_378FA:
|
||||
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);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
|
||||
int nCheckDist = 0x7FFFFFFF;
|
||||
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
int nScanAngle = (pActor->int_ang() - 512) & kAngleMask;
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
|
@ -416,8 +416,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
pActor->spr.__int_angle = nAngle;
|
||||
|
||||
pActor->nAction = 6;
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle) - bcos(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle) - bsin(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang()) - bcos(pActor->int_ang(), -3);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang()) - bsin(pActor->int_ang(), -3);
|
||||
D3PlayFX(StaticSound[kSound24], pActor);
|
||||
}
|
||||
|
||||
|
@ -445,7 +445,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (nMov.actor() == pTarget)
|
||||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
if (AngleDiff(pActor->spr.__int_angle, nAng) < 64)
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 3;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -455,8 +455,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
// loc_378FA:
|
||||
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);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -483,8 +483,8 @@ void AILion::Tick(RunListEvent* ev)
|
|||
pActor->spr.zvel = -1000;
|
||||
|
||||
pActor->nAction = 6;
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle) - bcos(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle) - bsin(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang()) - bcos(pActor->int_ang(), -3);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang()) - bsin(pActor->int_ang(), -3);
|
||||
D3PlayFX(StaticSound[kSound24], pActor);
|
||||
}
|
||||
|
||||
|
|
|
@ -645,8 +645,8 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
|||
ChangeActorSect(pActor, pSectorPre);
|
||||
|
||||
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->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
Collision c;
|
||||
c.setNone();
|
||||
return c;
|
||||
|
@ -1079,7 +1079,7 @@ void MoveSector(sectortype* pSector, int nAngle, int *nXVel, int *nYVel)
|
|||
initx = pActor->int_pos().X;
|
||||
inity = pActor->int_pos().Y;
|
||||
initz = pActor->int_pos().Z;
|
||||
inita = pActor->spr.__int_angle;
|
||||
inita = pActor->int_ang();
|
||||
initsectp = pActor->sector();
|
||||
}
|
||||
|
||||
|
@ -1149,7 +1149,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int
|
|||
if (pActor2 == nullptr)
|
||||
{
|
||||
pActor->spr.zvel = 0;
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1172,7 +1172,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int
|
|||
|
||||
int var_18 = GetMyAngle(nSqrt, ((pActor2->int_pos().Z - nHeight) - pActor->int_pos().Z) >> 8);
|
||||
|
||||
int nAngDelta = AngleDelta(pActor->spr.__int_angle, nMyAngle, 1024);
|
||||
int nAngDelta = AngleDelta(pActor->int_ang(), nMyAngle, 1024);
|
||||
int nAngDelta2 = abs(nAngDelta);
|
||||
|
||||
if (nAngDelta2 > 63)
|
||||
|
@ -1196,7 +1196,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int
|
|||
nAngDelta = -push1;
|
||||
}
|
||||
|
||||
nAngle = (nAngDelta + pActor->spr.__int_angle) & kAngleMask;
|
||||
nAngle = (nAngDelta + pActor->int_ang()) & kAngleMask;
|
||||
int nAngDeltaD = AngleDelta(pActor->spr.zvel, var_18, 24);
|
||||
|
||||
pActor->spr.zvel = (pActor->spr.zvel + nAngDeltaD) & kAngleMask;
|
||||
|
@ -1244,8 +1244,8 @@ void WheresMyMouth(int nPlayer, vec3_t* pos, sectortype **sectnum)
|
|||
|
||||
Collision scratch;
|
||||
clipmove(*pos, sectnum,
|
||||
bcos(pActor->spr.__int_angle, 7),
|
||||
bsin(pActor->spr.__int_angle, 7),
|
||||
bcos(pActor->int_ang(), 7),
|
||||
bsin(pActor->int_ang(), 7),
|
||||
5120, 1280, 1280, CLIPMASK1, scratch);
|
||||
}
|
||||
|
||||
|
@ -1435,7 +1435,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
|
|||
}
|
||||
else if (nVal.type == kHitSprite)
|
||||
{
|
||||
nAngle = nVal.actor()->spr.__int_angle;
|
||||
nAngle = nVal.actor()->int_ang();
|
||||
}
|
||||
else if (nVal.type == kHitWall)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ void BuildMummy(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->int_pos().Z;
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
|
||||
ChangeActorStat(pActor, 102);
|
||||
}
|
||||
|
@ -181,8 +181,8 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 1;
|
||||
pActor->nCount = 90;
|
||||
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -223,8 +223,8 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
// loc_2B5A8
|
||||
if (!pActor->nFrame)
|
||||
{
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
}
|
||||
|
||||
if (pActor->spr.xvel || pActor->spr.yvel)
|
||||
|
@ -265,8 +265,8 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
case kHitWall:
|
||||
{
|
||||
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);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
if (nMov.actor() == pTarget)
|
||||
{
|
||||
int nAngle = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
if (AngleDiff(pActor->spr.__int_angle, nAngle) < 64)
|
||||
if (AngleDiff(pActor->int_ang(), nAngle) < 64)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -328,7 +328,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
SetQuake(pActor, 100);
|
||||
|
||||
// low 16 bits of returned var contains the sprite index, the high 16 the bullet number
|
||||
auto pBullet = BuildBullet(pActor, 9, -15360, pActor->spr.__int_angle, pTarget, 1);
|
||||
auto pBullet = BuildBullet(pActor, 9, -15360, pActor->int_ang(), pTarget, 1);
|
||||
CheckMummyRevive(pActor);
|
||||
|
||||
if (pBullet)
|
||||
|
|
|
@ -1310,7 +1310,7 @@ void AITrap::Tick(RunListEvent* ev)
|
|||
return;
|
||||
}
|
||||
|
||||
auto pBullet = BuildBullet(pActor, nType, 0, pActor->spr.__int_angle, nullptr, 1);
|
||||
auto pBullet = BuildBullet(pActor, nType, 0, pActor->int_ang(), nullptr, 1);
|
||||
if (pBullet)
|
||||
{
|
||||
if (nType == 15)
|
||||
|
|
|
@ -317,7 +317,7 @@ void RestartPlayer(int nPlayer)
|
|||
pDActor->spr.xoffset = 0;
|
||||
pDActor->spr.yoffset = 0;
|
||||
pDActor->spr.shade = pActor->spr.shade;
|
||||
pDActor->spr.__int_angle = pActor->spr.__int_angle;
|
||||
pDActor->spr.__int_angle = pActor->int_ang();
|
||||
pDActor->spr.cstat = pActor->spr.cstat;
|
||||
|
||||
pDActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -1284,7 +1284,7 @@ sectdone:
|
|||
HitInfo near;
|
||||
|
||||
// neartag finds the nearest sector, wall, and sprite which has its hitag and/or lotag set to a value.
|
||||
neartag(pPlayerActor->int_pos(), pPlayerActor->sector(), pPlayerActor->spr.__int_angle, near, 1024, 2);
|
||||
neartag(pPlayerActor->int_pos(), pPlayerActor->sector(), pPlayerActor->int_ang(), near, 1024, 2);
|
||||
|
||||
DExhumedActor* pActorB;
|
||||
feebtag(pPlayerActor->int_pos().X, pPlayerActor->int_pos().Y, pPlayerActor->int_pos().Z, pPlayerActor->sector(), &pActorB, var_30, 768);
|
||||
|
@ -2530,7 +2530,7 @@ sectdone:
|
|||
inity = pPlayerActor->int_pos().Y;
|
||||
initz = pPlayerActor->int_pos().Z;
|
||||
initsectp = pPlayerActor->sector();
|
||||
inita = pPlayerActor->spr.__int_angle;
|
||||
inita = pPlayerActor->int_ang();
|
||||
}
|
||||
|
||||
if (!PlayerList[nPlayer].nHealth)
|
||||
|
@ -2576,7 +2576,7 @@ sectdone:
|
|||
|
||||
if (pPlayerActor->sector()->pAbove != nullptr)
|
||||
{
|
||||
pDopple->spr.__int_angle = pPlayerActor->spr.__int_angle;
|
||||
pDopple->spr.__int_angle = pPlayerActor->int_ang();
|
||||
ChangeActorSect(pDopple, pPlayerActor->sector()->pAbove);
|
||||
pDopple->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ void DestroyAllEggs()
|
|||
|
||||
void SetHeadVel(DExhumedActor* pActor)
|
||||
{
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
|
||||
pActor->spr.xvel = bcos(nAngle, nVelShift);
|
||||
pActor->spr.yvel = bsin(nAngle, nVelShift);
|
||||
|
@ -295,7 +295,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val
|
|||
if (pActor2 == nullptr)
|
||||
{
|
||||
pActor->spr.zvel = 0;
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -320,7 +320,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val
|
|||
|
||||
int var_14 = GetMyAngle(nSqrt, edx);
|
||||
|
||||
int nAngDelta = AngleDelta(pActor->spr.__int_angle, nMyAngle, 1024);
|
||||
int nAngDelta = AngleDelta(pActor->int_ang(), nMyAngle, 1024);
|
||||
|
||||
if (abs(nAngDelta) > 127)
|
||||
{
|
||||
|
@ -337,7 +337,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val
|
|||
nAngDelta = val2;
|
||||
}
|
||||
|
||||
nAngle = (nAngDelta + pActor->spr.__int_angle) & kAngleMask;
|
||||
nAngle = (nAngDelta + pActor->int_ang()) & kAngleMask;
|
||||
|
||||
pActor->spr.zvel = (AngleDelta(pActor->spr.zvel, var_14, 24) + pActor->spr.zvel) & kAngleMask;
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ void BuildQueenEgg(int nQueen, int nVal)
|
|||
int y = pActor->int_pos().Y;
|
||||
auto pSector =pActor->sector();
|
||||
int nFloorZ = pSector->int_floorz();
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
|
||||
auto pActor2 = insertActor(pSector, 121);
|
||||
|
||||
|
@ -588,7 +588,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
nAngle = GetWallNormal(nMov.hitWall);
|
||||
break;
|
||||
case kHitSprite:
|
||||
nAngle = nMov.actor()->spr.__int_angle;
|
||||
nAngle = nMov.actor()->int_ang();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -626,8 +626,8 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
case kHitWall:
|
||||
pActor->spr.__int_angle += (RandomSize(9) + 768);
|
||||
pActor->spr.__int_angle &= kAngleMask;
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -3);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -3);
|
||||
pActor->spr.zvel = -RandomSize(5);
|
||||
break;
|
||||
}
|
||||
|
@ -651,7 +651,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
pEgg->nCounter--;
|
||||
if (pEgg->nCounter <= 0)
|
||||
{
|
||||
auto pWaspSprite = BuildWasp(nullptr, pActor->int_pos().X, pActor->int_pos().Y, pActor->int_pos().Z, pActor->sector(), pActor->spr.__int_angle, true);
|
||||
auto pWaspSprite = BuildWasp(nullptr, pActor->int_pos().X, pActor->int_pos().Y, pActor->int_pos().Z, pActor->sector(), pActor->int_ang(), true);
|
||||
pActor->set_int_z(pWaspSprite->int_pos().Z);
|
||||
|
||||
DestroyEgg(nEgg);
|
||||
|
@ -704,7 +704,7 @@ void BuildQueenHead(int nQueen)
|
|||
|
||||
int x = pActor->int_pos().X;
|
||||
int y = pActor->int_pos().Y;
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
auto pSector = pActor->sector();
|
||||
int z = pSector->int_floorz();
|
||||
|
||||
|
@ -812,11 +812,11 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
auto nMov = MoveCreature(pActor);
|
||||
|
||||
// original BUG - this line doesn't exist in original code?
|
||||
int nNewAng = pActor->spr.__int_angle;
|
||||
int nNewAng = pActor->int_ang();
|
||||
|
||||
if (nMov.exbits == 0)
|
||||
{
|
||||
if (nMov.type == kHitSprite) nNewAng = nMov.actor()->spr.__int_angle;
|
||||
if (nMov.type == kHitSprite) nNewAng = nMov.actor()->int_ang();
|
||||
else if (nMov.type == kHitWall) nNewAng = GetWallNormal(nMov.hitWall);
|
||||
}
|
||||
else if (nMov.exbits == kHitAux2)
|
||||
|
@ -923,7 +923,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
MoveQZ[nQHead] = pActor->int_pos().Z;
|
||||
assert(pActor->sector());
|
||||
MoveQS[nQHead] = pActor->sector();
|
||||
MoveQA[nQHead] = pActor->spr.__int_angle;
|
||||
MoveQA[nQHead] = pActor->int_ang();
|
||||
|
||||
nHd = nQHead;
|
||||
|
||||
|
@ -1114,7 +1114,7 @@ void BuildQueen(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->sector()->int_floorz();
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
}
|
||||
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
@ -1158,8 +1158,8 @@ void BuildQueen(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
|
||||
void SetQueenSpeed(DExhumedActor* pActor, int nSpeed)
|
||||
{
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -(2 - nSpeed));
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -(2 - nSpeed));
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -(2 - nSpeed));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -(2 - nSpeed));
|
||||
}
|
||||
|
||||
void AIQueen::Tick(RunListEvent* ev)
|
||||
|
@ -1346,7 +1346,7 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
|
||||
if (!si)
|
||||
{
|
||||
BuildBullet(pActor, 12, -1, pActor->spr.__int_angle, pTarget, 1);
|
||||
BuildBullet(pActor, 12, -1, pActor->int_ang(), pTarget, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -69,8 +69,8 @@ void InitRats()
|
|||
|
||||
void SetRatVel(DExhumedActor* pActor)
|
||||
{
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
}
|
||||
|
||||
void BuildRat(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, int nAngle)
|
||||
|
@ -84,7 +84,7 @@ void BuildRat(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->int_pos().Z;
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
|
||||
ChangeActorStat(pActor, 108);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ void BuildRex(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->sector()->int_floorz();
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
|
||||
ChangeActorStat(pActor, 119);
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (pTarget == nullptr)
|
||||
{
|
||||
auto nAngle = pActor->spr.__int_angle; // make backup of this variable
|
||||
auto nAngle = pActor->int_ang(); // make backup of this variable
|
||||
pActor->pTarget = FindPlayer(pActor, 60);
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
}
|
||||
|
@ -224,8 +224,8 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -2);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -2);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
|
||||
D3PlayFX(StaticSound[kSound48], pActor);
|
||||
|
||||
|
@ -290,8 +290,8 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
case kHitWall:
|
||||
{
|
||||
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->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
nAction = 1;
|
||||
|
@ -309,8 +309,8 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
{
|
||||
PlotCourseToSprite(pActor, pTarget);
|
||||
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
|
||||
auto nMov = MoveCreatureWithCaution(pActor);
|
||||
|
||||
|
@ -322,8 +322,8 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
pActor->nCount = 60;
|
||||
|
||||
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->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
nAction = 1;
|
||||
|
@ -338,7 +338,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
|
||||
if (pHitActor->spr.statnum && pHitActor->spr.statnum < 107)
|
||||
{
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
|
||||
runlist_DamageEnemy(nMov.actor(), pActor, 15);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, int x, int y, int z, sectortyp
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->sector()->int_floorz();
|
||||
angle = pActor->spr.__int_angle;
|
||||
angle = pActor->int_ang();
|
||||
}
|
||||
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
@ -93,8 +93,8 @@ void BuildRoach(int nType, DExhumedActor* pActor, int x, int y, int z, sectortyp
|
|||
|
||||
void GoRoach(DExhumedActor* pActor)
|
||||
{
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1) - bcos(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1) - bsin(pActor->spr.__int_angle, -3);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1) - bcos(pActor->int_ang(), -3);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1) - bsin(pActor->int_ang(), -3);
|
||||
}
|
||||
|
||||
void AIRoach::Draw(RunListEvent* ev)
|
||||
|
@ -340,7 +340,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (nFlag & 0x80)
|
||||
{
|
||||
BuildBullet(pActor, 13, -1, pActor->spr.__int_angle, pTarget, 1);
|
||||
BuildBullet(pActor, 13, -1, pActor->int_ang(), pTarget, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ void BuildScorp(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->sector()->int_floorz();
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
}
|
||||
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
@ -249,7 +249,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
if (pTarget == nMov.actor())
|
||||
{
|
||||
int nAngle = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
if (AngleDiff(pActor->spr.__int_angle, nAngle) < 64)
|
||||
if (AngleDiff(pActor->int_ang(), nAngle) < 64)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -317,7 +317,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
return;
|
||||
}
|
||||
|
||||
auto nBulletSprite = BuildBullet(pActor, 16, -1, pActor->spr.__int_angle, pTarget, 1);
|
||||
auto nBulletSprite = BuildBullet(pActor, 16, -1, pActor->int_ang(), pTarget, 1);
|
||||
if (nBulletSprite)
|
||||
{
|
||||
PlotCourseToSprite(nBulletSprite, pTarget);
|
||||
|
@ -374,8 +374,8 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
|
||||
int nVel = RandomSize(5) + 1;
|
||||
|
||||
pSpiderActor->spr.xvel = bcos(pSpiderActor->spr.__int_angle, -8) * nVel;
|
||||
pSpiderActor->spr.yvel = bsin(pSpiderActor->spr.__int_angle, -8) * nVel;
|
||||
pSpiderActor->spr.xvel = bcos(pSpiderActor->int_ang(), -8) * nVel;
|
||||
pSpiderActor->spr.yvel = bsin(pSpiderActor->int_ang(), -8) * nVel;
|
||||
pSpiderActor->spr.zvel = (-(RandomSize(5) + 3)) << 8;
|
||||
}
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
|
|||
tsp->pal = pTSprite->pal;
|
||||
tsp->xrepeat = pTSprite->xrepeat;
|
||||
tsp->yrepeat = pTSprite->yrepeat;
|
||||
tsp->__int_angle = pTSprite->__int_angle;
|
||||
tsp->__int_angle = pTSprite->int_ang();
|
||||
tsp->ownerActor = pTSprite->ownerActor;
|
||||
tsp->sectp = pTSprite->sectp;
|
||||
tsp->cstat = pTSprite->cstat |= CSTAT_SPRITE_YCENTER;
|
||||
|
|
|
@ -51,7 +51,7 @@ void BuildSet(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
x = pActor->int_pos().X;
|
||||
y = pActor->int_pos().Y;
|
||||
z = pActor->sector()->int_floorz();
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
}
|
||||
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
@ -141,7 +141,7 @@ void AISoul::Tick(RunListEvent* ev)
|
|||
|
||||
int nVel = bcos(pActor->spr.extra, -7);
|
||||
|
||||
auto coll = movesprite(pActor, bcos(pActor->spr.__int_angle) * nVel, bsin(pActor->spr.__int_angle) * nVel, pActor->spr.zvel, 5120, 0, CLIPMASK0);
|
||||
auto coll = movesprite(pActor, bcos(pActor->int_ang()) * nVel, bsin(pActor->int_ang()) * nVel, pActor->spr.zvel, 5120, 0, CLIPMASK0);
|
||||
if (coll.exbits & 0x10000)
|
||||
{
|
||||
DExhumedActor* pSet = pActor->pTarget;
|
||||
|
@ -297,8 +297,8 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->pTarget = pTarget;
|
||||
|
||||
pActor->spr.xvel = bcos(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.yvel = bsin(pActor->spr.__int_angle, -1);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -421,8 +421,8 @@ void AISet::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
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);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
}
|
||||
else if (nMov.type == kHitSprite)
|
||||
|
@ -430,7 +430,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
if (pTarget == nMov.actor())
|
||||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
if (AngleDiff(pActor->spr.__int_angle, nAng) < 64)
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 4;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -494,7 +494,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (nFlag & 0x80)
|
||||
{
|
||||
auto pBullet = BuildBullet(pActor, 11, -1, pActor->spr.__int_angle, pTarget, 1);
|
||||
auto pBullet = BuildBullet(pActor, 11, -1, pActor->int_ang(), pTarget, 1);
|
||||
if (pBullet)
|
||||
SetBulletEnemy(pBullet->nPhase, pTarget);
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
int x = pPlayerActor->int_pos().X;
|
||||
int y = pPlayerActor->int_pos().Y;
|
||||
int z = (pPlayerActor->int_pos().Z + zVal) - 2560;
|
||||
int nAngle = pPlayerActor->spr.__int_angle;
|
||||
int nAngle = pPlayerActor->int_ang();
|
||||
|
||||
HitInfo hit{};
|
||||
hitscan({ x, y, z }, pPlayerActor->sector(), { bcos(nAngle), bsin(nAngle), 0 }, hit, CLIPMASK1);
|
||||
|
@ -212,7 +212,7 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
pActor->spr.pal = 0;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = pPlayerActor->spr.__int_angle;
|
||||
pActor->spr.__int_angle = pPlayerActor->int_ang();
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -259,7 +259,7 @@ DExhumedActor* FindSnakeEnemy(int nSnake)
|
|||
DExhumedActor* pActor = SnakeList[nSnake].pSprites[0]; // CHECKME
|
||||
if (!pActor) return nullptr;
|
||||
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
auto pSector =pActor->sector();
|
||||
|
||||
int esi = 2048;
|
||||
|
@ -320,8 +320,8 @@ void AISnake::Tick(RunListEvent* ev)
|
|||
{
|
||||
SEARCH_ENEMY:
|
||||
nMov = movesprite(pActor,
|
||||
600 * bcos(pActor->spr.__int_angle),
|
||||
600 * bsin(pActor->spr.__int_angle),
|
||||
600 * bcos(pActor->int_ang()),
|
||||
600 * bsin(pActor->int_ang()),
|
||||
bsin(SnakeList[nSnake].nAngle, -5),
|
||||
0, 0, CLIPMASK1);
|
||||
|
||||
|
@ -356,7 +356,7 @@ void AISnake::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
int nAngle = pActor->spr.__int_angle;
|
||||
int nAngle = pActor->int_ang();
|
||||
int var_30 = -bcos(nAngle, 6);
|
||||
int var_34 = -bsin(nAngle, 6);
|
||||
|
||||
|
|
|
@ -504,7 +504,7 @@ void GameInterface::UpdateSounds()
|
|||
{
|
||||
Snake *pSnake = &SnakeList[nSnakeCam];
|
||||
pos = pSnake->pSprites[0]->int_pos();
|
||||
ang = pSnake->pSprites[0]->spr.__int_angle;
|
||||
ang = pSnake->pSprites[0]->int_ang();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -49,7 +49,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, int x, int y, int z, sectortype*
|
|||
x = spp->int_pos().X;
|
||||
y = spp->int_pos().Y;
|
||||
z = spp->sector()->int_floorz();
|
||||
nAngle = spp->spr.__int_angle;
|
||||
nAngle = spp->int_ang();
|
||||
}
|
||||
|
||||
spp->set_int_pos({ x, y, z });
|
||||
|
@ -311,7 +311,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
if (nMov.actor() == pTarget)
|
||||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - spp->int_pos().X, pTarget->int_pos().Y - spp->int_pos().Y);
|
||||
if (AngleDiff(spp->spr.__int_angle, nAng) < 64)
|
||||
if (AngleDiff(spp->int_ang(), nAng) < 64)
|
||||
{
|
||||
spp->nAction = 2;
|
||||
spp->nFrame = 0;
|
||||
|
|
|
@ -88,7 +88,7 @@ static void analyzesprites(tspriteArray& tsprites, int x, int y, int z, double c
|
|||
|
||||
auto pSector =pPlayerActor->sector();
|
||||
|
||||
int nAngle = (2048 - pPlayerActor->spr.__int_angle) & kAngleMask;
|
||||
int nAngle = (2048 - pPlayerActor->int_ang()) & kAngleMask;
|
||||
|
||||
for (int nTSprite = int(tsprites.Size()-1); nTSprite >= 0; nTSprite--)
|
||||
{
|
||||
|
@ -374,7 +374,7 @@ void DrawView(double smoothRatio, bool sceneonly)
|
|||
|
||||
pPlayerActor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
|
||||
int ang2 = nCameraa.asbuild() - pPlayerActor->spr.__int_angle;
|
||||
int ang2 = nCameraa.asbuild() - pPlayerActor->int_ang();
|
||||
if (ang2 < 0)
|
||||
ang2 = -ang2;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, sectortype*
|
|||
}
|
||||
else
|
||||
{
|
||||
nAngle = pActor->spr.__int_angle;
|
||||
nAngle = pActor->int_ang();
|
||||
ChangeActorStat(pActor, 107);
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->spr.xvel = 200 + RandomRange(200);
|
||||
actor->user.jump_speed = -200 - RandomRange(250);
|
||||
DoActorBeginJump(actor);
|
||||
actor->spr.__int_angle = weapActor->spr.__int_angle;
|
||||
actor->spr.__int_angle = weapActor->int_ang();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -177,7 +177,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->user.ActorActionFunc = nullptr;
|
||||
//actor->user.ActorActionFunc = NullAnimator;
|
||||
if (!sw_ninjahack)
|
||||
actor->spr.__int_angle = weapActor->spr.__int_angle;
|
||||
actor->spr.__int_angle = weapActor->int_ang();
|
||||
break;
|
||||
|
||||
case COOLG_RUN_R0:
|
||||
|
@ -259,7 +259,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
actor->spr.xvel = 300 + RandomRange(400);
|
||||
actor->user.jump_speed = -300 - RandomRange(350);
|
||||
DoActorBeginJump(actor);
|
||||
actor->spr.__int_angle = weapActor->spr.__int_angle;
|
||||
actor->spr.__int_angle = weapActor->int_ang();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -415,8 +415,8 @@ int DoActorDebris(DSWActor* actor)
|
|||
{
|
||||
//nx = actor->spr.xvel * ACTORMOVETICS * bcos(actor->spr.__int_angle) >> 14;
|
||||
//ny = actor->spr.xvel * ACTORMOVETICS * bsin(actor->spr.__int_angle) >> 14;
|
||||
nx = MulScale(ACTORMOVETICS, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(ACTORMOVETICS, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(ACTORMOVETICS, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(ACTORMOVETICS, bsin(actor->int_ang()), 14);
|
||||
|
||||
//actor->spr.clipdist = (256+128)>>2;
|
||||
|
||||
|
@ -445,8 +445,8 @@ int DoFireFly(DSWActor* actor)
|
|||
{
|
||||
int nx, ny;
|
||||
|
||||
nx = 4 * ACTORMOVETICS * bcos(actor->spr.__int_angle) >> 14;
|
||||
ny = 4 * ACTORMOVETICS * bsin(actor->spr.__int_angle) >> 14;
|
||||
nx = 4 * ACTORMOVETICS * bcos(actor->int_ang()) >> 14;
|
||||
ny = 4 * ACTORMOVETICS * bsin(actor->int_ang()) >> 14;
|
||||
|
||||
actor->spr.clipdist = 256>>2;
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
|
@ -476,7 +476,7 @@ int DoGenerateSewerDebris(DSWActor* actor)
|
|||
{
|
||||
actor->user.Tics = actor->user.WaitTics;
|
||||
|
||||
auto spawned = SpawnActor(STAT_DEAD_ACTOR, 0, Debris[RANDOM_P2(4<<8)>>8], actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 200);
|
||||
auto spawned = SpawnActor(STAT_DEAD_ACTOR, 0, Debris[RANDOM_P2(4<<8)>>8], actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 200);
|
||||
|
||||
SetOwner(actor, spawned);
|
||||
}
|
||||
|
@ -782,8 +782,8 @@ int DoActorDeathMove(DSWActor* actor)
|
|||
DoActorFall(actor);
|
||||
}
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->spr.clipdist = (128+64)>>2;
|
||||
move_actor(actor, nx, ny, 0);
|
||||
|
|
|
@ -438,7 +438,7 @@ int DoActorOperate(DSWActor* actor)
|
|||
|
||||
for (i = 0; i < SIZ(z); i++)
|
||||
{
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, z[i] }, actor->sector(), actor->spr.__int_angle, near, 1024, NTAG_SEARCH_LO_HI);
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, z[i] }, actor->sector(), actor->int_ang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
}
|
||||
|
||||
if (near.hitSector != nullptr && near.hitpos.X < 1024)
|
||||
|
@ -836,8 +836,8 @@ int DoActorMoveCloser(DSWActor* actor)
|
|||
{
|
||||
int nx, ny;
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0))
|
||||
|
@ -1309,8 +1309,8 @@ int DoActorMoveJump(DSWActor* actor)
|
|||
|
||||
// Move while jumping
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
move_actor(actor, nx, ny, 0L);
|
||||
|
||||
|
@ -1341,7 +1341,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy,
|
|||
x = actor->int_pos().X;
|
||||
y = actor->int_pos().Y;
|
||||
z = actor->int_pos().Z;
|
||||
sang = actor->spr.__int_angle;
|
||||
sang = actor->int_ang();
|
||||
loz = actor->user.loz;
|
||||
hiz = actor->user.hiz;
|
||||
lowActor = actor->user.lowActor;
|
||||
|
@ -1352,8 +1352,8 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy,
|
|||
|
||||
// do the move
|
||||
actor->spr.__int_angle = ang;
|
||||
nx = MulScale(dist, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(dist, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(dist, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(dist, bsin(actor->int_ang()), 14);
|
||||
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, actor->user.ceiling_dist, actor->user.floor_dist, cliptype, 1);
|
||||
// move_sprite DOES do a getzrange point?
|
||||
|
@ -1623,8 +1623,8 @@ int DoActorReposition(DSWActor* actor)
|
|||
{
|
||||
int nx, ny;
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
// still might hit something and have to handle it.
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
|
|
|
@ -868,8 +868,8 @@ int DoBunnyMoveJump(DSWActor* actor)
|
|||
int nx, ny;
|
||||
|
||||
// Move while jumping
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
move_actor(actor, nx, ny, 0L);
|
||||
|
||||
|
@ -1025,12 +1025,12 @@ int DoBunnyQuickJump(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->copyXY(hitActor);
|
||||
actor->spr.__int_angle = hitActor->spr.__int_angle;
|
||||
actor->spr.__int_angle = hitActor->int_ang();
|
||||
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
|
||||
hitActor->user.Vis = hitActor->spr.__int_angle;
|
||||
actor->spr.__int_angle = hitActor->int_ang();
|
||||
actor->user.Vis = actor->int_ang(); // Remember angles for later
|
||||
hitActor->user.Vis = hitActor->int_ang();
|
||||
|
||||
NewStateGroup(actor, sg_BunnyScrew);
|
||||
NewStateGroup(hitActor, sg_BunnyScrew);
|
||||
|
|
|
@ -541,7 +541,7 @@ int NewCoolg(DSWActor* actor)
|
|||
{
|
||||
ANIMATOR DoActorDecide;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, COOLG_RUN_R0, &s_CoolgBirth[0], actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 50);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, COOLG_RUN_R0, &s_CoolgBirth[0], actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 50);
|
||||
|
||||
ChangeState(actorNew, &s_CoolgBirth[0]);
|
||||
actorNew->user.StateEnd = s_CoolgDie;
|
||||
|
@ -709,8 +709,8 @@ int DoCoolgCircle(DSWActor* actor)
|
|||
|
||||
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);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
{
|
||||
|
@ -766,8 +766,8 @@ int DoCoolgDeath(DSWActor* actor)
|
|||
DoActorSlide(actor);
|
||||
|
||||
// slide while falling
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
DoFindGroundPoint(actor);
|
||||
|
|
|
@ -526,7 +526,7 @@ DSWActor* CopySprite(sprt const* tsp, sectortype* newsector)
|
|||
actorNew->spr.yrepeat = tsp->yrepeat;
|
||||
actorNew->spr.xoffset = tsp->xoffset;
|
||||
actorNew->spr.yoffset = tsp->yoffset;
|
||||
actorNew->spr.__int_angle = tsp->__int_angle;
|
||||
actorNew->spr.__int_angle = tsp->int_ang();
|
||||
actorNew->spr.xvel = tsp->xvel;
|
||||
actorNew->spr.yvel = tsp->yvel;
|
||||
actorNew->spr.zvel = tsp->zvel;
|
||||
|
@ -1101,7 +1101,7 @@ void CameraView(PLAYER* pp, int *tx, int *ty, int *tz, sectortype** tsect, binan
|
|||
while (auto actor = it.Next())
|
||||
{
|
||||
ang = bvectangbam(*tx - actor->int_pos().X, *ty - actor->int_pos().Y);
|
||||
ang_test = getincangle(ang.asbuild(), actor->spr.__int_angle) < actor->spr.lotag;
|
||||
ang_test = getincangle(ang.asbuild(), actor->int_ang()) < actor->spr.lotag;
|
||||
|
||||
FAFcansee_test =
|
||||
(FAFcansee(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->sector(), *tx, *ty, *tz, pp->cursector) ||
|
||||
|
@ -1684,7 +1684,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
xoff = (int)tileLeftOffset(tilenum) + (int)actor->spr.xoffset;
|
||||
if ((actor->spr.cstat & CSTAT_SPRITE_XFLIP) > 0)
|
||||
xoff = -xoff;
|
||||
k = actor->spr.__int_angle;
|
||||
k = actor->int_ang();
|
||||
l = actor->spr.xrepeat;
|
||||
dax = bsin(k) * l;
|
||||
day = -bcos(k) * l;
|
||||
|
@ -1719,7 +1719,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
if ((actor->spr.cstat & CSTAT_SPRITE_YFLIP) > 0)
|
||||
yoff = -yoff;
|
||||
|
||||
k = actor->spr.__int_angle;
|
||||
k = actor->int_ang();
|
||||
cosang = bcos(k);
|
||||
sinang = bsin(k);
|
||||
xspan = tileWidth(tilenum);
|
||||
|
|
|
@ -527,8 +527,8 @@ int DoEelDeath(DSWActor* actor)
|
|||
DoActorSlide(actor);
|
||||
|
||||
// slide while falling
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
DoFindGroundPoint(actor);
|
||||
|
|
|
@ -1959,7 +1959,7 @@ inline bool PlayerFacingRange(PLAYER* pp, DSWActor* a, int range)
|
|||
|
||||
inline bool FacingRange(DSWActor* a1, DSWActor* a2, int range)
|
||||
{
|
||||
return (abs(getincangle(getangle(a1->int_pos().X - a2->int_pos().X, a1->int_pos().Y - a2->int_pos().Y), a2->spr.__int_angle)) < (range));
|
||||
return (abs(getincangle(getangle(a1->int_pos().X - a2->int_pos().X, a1->int_pos().Y - a2->int_pos().Y), a2->int_ang())) < (range));
|
||||
}
|
||||
inline void SET_BOOL1(DSWActor* sp) { sp->spr.extra |= SPRX_BOOL1; }
|
||||
inline void SET_BOOL2(DSWActor* sp) { sp->spr.extra |= SPRX_BOOL2; }
|
||||
|
@ -2001,7 +2001,7 @@ inline int TEST_BOOL11(DSWActor* sp) { return sp->spr.extra & SPRX_BOOL11; }
|
|||
inline int16_t SP_TAG1(DSWActor* actor) { return actor->spr.hitag; }
|
||||
inline int16_t& SP_TAG2(DSWActor* actor) { return actor->spr.lotag; }
|
||||
inline uint8_t& SP_TAG3(DSWActor* actor) { return actor->spr.clipdist; }
|
||||
inline int16_t& SP_TAG4(DSWActor* actor) { return actor->spr. __int_angle; } // this may not be transitioned to a real angular type
|
||||
inline int16_t& SP_TAG4(DSWActor* actor) { return actor->spr.__int_angle; } // this may not be transitioned to a real angular type
|
||||
inline int16_t& SP_TAG5(DSWActor* actor) { return actor->spr.xvel; }
|
||||
inline int16_t& SP_TAG6(DSWActor* actor) { return actor->spr.yvel; }
|
||||
inline uint8_t& SP_TAG7(DSWActor* actor) { return MSB_VAR(actor->spr.zvel); }
|
||||
|
@ -2067,7 +2067,7 @@ inline int ActorSizeY(DSWActor* sp)
|
|||
|
||||
inline bool Facing(DSWActor* actor1, DSWActor* actor2)
|
||||
{
|
||||
return (abs(getincangle(getangle(actor1->int_pos().X - actor2->int_pos().X, actor1->int_pos().Y - actor2->int_pos().Y), actor2->spr.__int_angle)) < 512);
|
||||
return (abs(getincangle(getangle(actor1->int_pos().X - actor2->int_pos().X, actor1->int_pos().Y - actor2->int_pos().Y), actor2->int_ang())) < 512);
|
||||
}
|
||||
|
||||
// Given a z height and sprite return the correct y repeat value
|
||||
|
|
|
@ -779,8 +779,8 @@ int GirlNinjaJumpActionFunc(DSWActor* actor)
|
|||
int nx, ny;
|
||||
|
||||
// Move while jumping
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
|
|
|
@ -440,8 +440,8 @@ int DoHornetCircle(DSWActor* actor)
|
|||
|
||||
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);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
{
|
||||
|
@ -450,8 +450,8 @@ int DoHornetCircle(DSWActor* actor)
|
|||
// try moving in the opposite direction
|
||||
actor->user.Counter2 = -actor->user.Counter2;
|
||||
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);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
{
|
||||
|
@ -507,8 +507,8 @@ int DoHornetDeath(DSWActor* actor)
|
|||
DoActorSlide(actor);
|
||||
|
||||
// slide while falling
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.ceiling_dist, actor->user.floor_dist, 1, ACTORMOVETICS);
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ static void so_setspriteanginterpolation(so_interp *interp, DSWActor* actor)
|
|||
data->curelement = soi_sprang;
|
||||
data->oldipos =
|
||||
data->lastipos =
|
||||
data->lastoldipos = actor->spr.__int_angle;
|
||||
data->lastoldipos = actor->int_ang();
|
||||
data->lastangdiff = 0;
|
||||
data->actorofang = actor;
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ void so_updateinterpolations(void) // Stick at beginning of domovethings
|
|||
actorofang->user.oangdiff = 0;
|
||||
if (!interpolating)
|
||||
data->lastangdiff = 0;
|
||||
data->oldipos = actorofang->spr.__int_angle;
|
||||
data->oldipos = actorofang->int_ang();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -309,7 +309,7 @@ void JS_InitMirrors(void)
|
|||
{
|
||||
mirror[mirrorcnt].cameraActor = itActor;
|
||||
// Set up camera variables
|
||||
SP_TAG5(itActor) = itActor->spr.__int_angle; // Set current angle to
|
||||
SP_TAG5(itActor) = itActor->int_ang(); // Set current angle to
|
||||
// sprite angle
|
||||
Found_Cam = true;
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ void JS_InitMirrors(void)
|
|||
{
|
||||
mirror[mirrorcnt].cameraActor = itActor;
|
||||
// Set up camera variables
|
||||
SP_TAG5(itActor) = itActor->spr.__int_angle; // Set current angle to
|
||||
SP_TAG5(itActor) = itActor->int_ang(); // Set current angle to
|
||||
// sprite angle
|
||||
Found_Cam = true;
|
||||
}
|
||||
|
@ -580,7 +580,7 @@ void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio)
|
|||
SP_TAG5(camactor) = NORM_ANGLE((SP_TAG5(camactor) + oscilation_delta));
|
||||
|
||||
// TAG6 = Turn radius
|
||||
if (abs(getincangle(camactor->spr.__int_angle, SP_TAG5(camactor))) >= SP_TAG6(camactor))
|
||||
if (abs(getincangle(camactor->int_ang(), SP_TAG5(camactor))) >= SP_TAG6(camactor))
|
||||
{
|
||||
SP_TAG5(camactor) = NORM_ANGLE((SP_TAG5(camactor) - oscilation_delta));
|
||||
RESET_BOOL3(camactor); // Reverse turn
|
||||
|
@ -593,7 +593,7 @@ void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio)
|
|||
SP_TAG5(camactor) = NORM_ANGLE((SP_TAG5(camactor) - oscilation_delta));
|
||||
|
||||
// TAG6 = Turn radius
|
||||
if (abs(getincangle(camactor->spr.__int_angle, SP_TAG5(camactor))) >= SP_TAG6(camactor))
|
||||
if (abs(getincangle(camactor->int_ang(), SP_TAG5(camactor))) >= SP_TAG6(camactor))
|
||||
{
|
||||
SP_TAG5(camactor) = NORM_ANGLE((SP_TAG5(camactor) + oscilation_delta));
|
||||
SET_BOOL3(camactor); // Reverse turn
|
||||
|
@ -603,7 +603,7 @@ void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio)
|
|||
}
|
||||
else if (!TEST_BOOL2(camactor))
|
||||
{
|
||||
SP_TAG5(camactor) = camactor->spr.__int_angle; // Copy sprite angle to
|
||||
SP_TAG5(camactor) = camactor->int_ang(); // Copy sprite angle to
|
||||
// tag5
|
||||
}
|
||||
|
||||
|
|
|
@ -293,7 +293,7 @@ int DoWallBloodDrip(DSWActor* actor)
|
|||
void SpawnMidSplash(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_GoreSplash, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor), actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor), actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.shade = -12;
|
||||
actorNew->spr.xrepeat = 70-RandomRange(20);
|
||||
|
@ -316,7 +316,7 @@ void SpawnMidSplash(DSWActor* actor)
|
|||
void SpawnFloorSplash(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_GoreFloorSplash, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.shade = -12;
|
||||
actorNew->spr.xrepeat = 70-RandomRange(20);
|
||||
|
@ -420,7 +420,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -516,7 +516,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
{
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GOREDrip, s_BloodSpray, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 100);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 100);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.shade = -12;
|
||||
|
@ -615,7 +615,7 @@ int DoPhosphorus(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -718,7 +718,7 @@ int DoPhosphorus(DSWActor* actor)
|
|||
{
|
||||
|
||||
auto actorNew = SpawnActor(STAT_SKIP4, PUFF, s_PhosphorExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 100);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 100);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; // Always full brightness
|
||||
SetOwner(actor, actorNew);
|
||||
|
@ -818,7 +818,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
if (!(actor->user.Flags & (SPR_BOUNCE | SPR_UNDERWATER)) && !(actor->spr.cstat & CSTAT_SPRITE_INVISIBLE))
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 100);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 100);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -1034,7 +1034,7 @@ int DoCaltrops(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -1170,7 +1170,7 @@ int SpawnRadiationCloud(DSWActor* actor)
|
|||
return -1;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, RADIATION_CLOUD, s_RadiationCloud, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->int_ang(), 0);
|
||||
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->user.WaitTics = 1 * 120;
|
||||
|
@ -1198,8 +1198,8 @@ int SpawnRadiationCloud(DSWActor* actor)
|
|||
if (actor->user.ID == MUSHROOM_CLOUD || actor->user.ID == 3121)
|
||||
{
|
||||
actorNew->user.Radius = 2000;
|
||||
actorNew->user.change.X = (MOVEx(actorNew->spr.xvel>>2, actorNew->spr.__int_angle));
|
||||
actorNew->user.change.Y = (MOVEy(actorNew->spr.xvel>>2, actorNew->spr.__int_angle));
|
||||
actorNew->user.change.X = (MOVEx(actorNew->spr.xvel>>2, actorNew->int_ang()));
|
||||
actorNew->user.change.Y = (MOVEy(actorNew->spr.xvel>>2, actorNew->int_ang()));
|
||||
actorNew->spr.zvel = Z(1) + RANDOM_P2(Z(2));
|
||||
}
|
||||
else
|
||||
|
@ -1313,7 +1313,7 @@ int InitSpriteChemBomb(DSWActor* actor)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, CHEMBOMB, s_ChemBomb, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, CHEMBOMB_VELOCITY);
|
||||
nx, ny, nz, actor->int_ang(), CHEMBOMB_VELOCITY);
|
||||
|
||||
actorNew->user.Flags |= (SPR_XFLIP_TOGGLE);
|
||||
|
||||
|
@ -1355,7 +1355,7 @@ int InitChemBomb(DSWActor* actor)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MUSHROOM_CLOUD, s_ChemBomb, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, CHEMBOMB_VELOCITY);
|
||||
nx, ny, nz, actor->int_ang(), CHEMBOMB_VELOCITY);
|
||||
|
||||
actorNew->user.Flags |= (SPR_XFLIP_TOGGLE);
|
||||
|
||||
|
@ -1569,7 +1569,7 @@ void SpawnFlashBombOnActor(DSWActor* actor)
|
|||
}
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
if (actor != nullptr)
|
||||
actor->user.flameActor = actorNew;
|
||||
|
@ -1683,7 +1683,7 @@ int InitCaltrops(DSWActor* actor)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_DEAD_ACTOR, CALTROPS, s_Caltrops, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, CHEMBOMB_VELOCITY / 2);
|
||||
nx, ny, nz, actor->int_ang(), CHEMBOMB_VELOCITY / 2);
|
||||
|
||||
actorNew->user.Flags |= (SPR_XFLIP_TOGGLE);
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ int InitBloodSpray(DSWActor* actor, bool dogib, short velocity)
|
|||
PlaySound(DIGI_GIBS3, actor, v3df_none);
|
||||
// }
|
||||
|
||||
ang = actor->spr.__int_angle;
|
||||
ang = actor->int_ang();
|
||||
vel = velocity;
|
||||
|
||||
for (i=0; i<cnt; i++)
|
||||
|
@ -2179,7 +2179,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
break;
|
||||
}
|
||||
|
||||
auto actorNew = SpawnActor(STAT_SKIP4, id, p, actor->sector(), nx, ny, nz, actor->spr.__int_angle, 64);
|
||||
auto actorNew = SpawnActor(STAT_SKIP4, id, p, actor->sector(), nx, ny, nz, actor->int_ang(), 64);
|
||||
|
||||
actorNew->spr.zvel = -(velocity);
|
||||
|
||||
|
@ -2195,7 +2195,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
|
||||
if (ShellNum == -3)
|
||||
{
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle-512);
|
||||
HelpMissileLateral(actorNew,1000); // Was 1500
|
||||
|
@ -2203,7 +2203,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
}
|
||||
else
|
||||
{
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+512);
|
||||
HelpMissileLateral(actorNew,1500);
|
||||
|
@ -2218,7 +2218,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
break;
|
||||
case SHOT_SHELL:
|
||||
actorNew->add_int_z(-Z(13));
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->spr.__int_angle+512);
|
||||
HelpMissileLateral(actorNew,1300);
|
||||
|
|
|
@ -2038,8 +2038,8 @@ int NinjaJumpActionFunc(DSWActor* actor)
|
|||
int nx, ny;
|
||||
|
||||
// Move while jumping
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
|
|
|
@ -1179,7 +1179,7 @@ DSWActor* DoPickTarget(DSWActor* actor, uint32_t max_delta_ang, int skip_targets
|
|||
// Get the angle difference
|
||||
// delta_ang = labs(pp->angle.ang.asbuild() - angle2);
|
||||
|
||||
delta_ang = short(abs(getincangle(angle2, actor->spr.__int_angle)));
|
||||
delta_ang = short(abs(getincangle(angle2, actor->int_ang())));
|
||||
|
||||
// If delta_ang not in the range skip this one
|
||||
if (delta_ang > (int)max_delta_ang)
|
||||
|
@ -1305,7 +1305,7 @@ void DoSpawnTeleporterEffect(DSWActor* actor)
|
|||
|
||||
auto effectActor = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->sector(),
|
||||
nx, ny, ActorZOfTop(actor) + Z(16),
|
||||
actor->spr.__int_angle, 0);
|
||||
actor->int_ang(), 0);
|
||||
|
||||
SetActorZ(effectActor, effectActor->int_pos());
|
||||
|
||||
|
@ -1323,7 +1323,7 @@ void DoSpawnTeleporterEffectPlace(DSWActor* actor)
|
|||
|
||||
auto effectActor = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + Z(16),
|
||||
actor->spr.__int_angle, 0);
|
||||
actor->int_ang(), 0);
|
||||
|
||||
SetActorZ(effectActor, effectActor->int_pos());
|
||||
|
||||
|
|
|
@ -990,8 +990,8 @@ int DoRipperMoveHang(DSWActor* actor)
|
|||
int nx, ny;
|
||||
|
||||
// Move while jumping
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
|
|
|
@ -1000,8 +1000,8 @@ int DoRipper2MoveHang(DSWActor* actor)
|
|||
int nx, ny;
|
||||
|
||||
// Move while jumping
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
// if cannot move the sprite
|
||||
if (!move_actor(actor, nx, ny, 0L))
|
||||
|
|
|
@ -781,7 +781,7 @@ short FindViewSectorInScene(sectortype* cursect, short level)
|
|||
if (cursect == actor->sector())
|
||||
{
|
||||
// ignore case if sprite is pointing up
|
||||
if (actor->spr.__int_angle == 1536)
|
||||
if (actor->int_ang() == 1536)
|
||||
continue;
|
||||
|
||||
// only gets to here is sprite is pointing down
|
||||
|
|
|
@ -2601,8 +2601,8 @@ void DoPanning(void)
|
|||
{
|
||||
sectp = actor->sector();
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 20);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 20);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 20);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 20);
|
||||
|
||||
sectp->addfloorxpan((float)nx);
|
||||
sectp->addfloorypan((float)ny);
|
||||
|
@ -2613,8 +2613,8 @@ void DoPanning(void)
|
|||
{
|
||||
sectp = actor->sector();
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 20);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 20);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 20);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 20);
|
||||
|
||||
sectp->addceilingxpan((float)nx);
|
||||
sectp->addceilingypan((float)ny);
|
||||
|
@ -2625,8 +2625,8 @@ void DoPanning(void)
|
|||
{
|
||||
wallp = actor->tempwall;
|
||||
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 20);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 20);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 20);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 20);
|
||||
|
||||
wallp->addxpan((float)nx);
|
||||
wallp->addypan((float)ny);
|
||||
|
|
|
@ -1738,7 +1738,7 @@ void SpriteSetup(void)
|
|||
{
|
||||
sectp->u_defined = true;
|
||||
sectp->speed = actor->spr.lotag;
|
||||
sectp->ang = actor->spr.__int_angle;
|
||||
sectp->ang = actor->int_ang();
|
||||
KillActor(actor);
|
||||
}
|
||||
else if (bit & (SECTFX_NO_RIDE))
|
||||
|
@ -1860,7 +1860,7 @@ void SpriteSetup(void)
|
|||
HitInfo hit{};
|
||||
|
||||
hitscan(hit_pos, actor->sector(), // Start position
|
||||
{ bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0 }, hit, CLIPMASK_MISSILE);
|
||||
{ bcos(actor->int_ang()), bsin(actor->int_ang()), 0 }, hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.hitWall == nullptr)
|
||||
{
|
||||
|
@ -1889,7 +1889,7 @@ void SpriteSetup(void)
|
|||
HitInfo hit{};
|
||||
|
||||
hitscan(hit_pos, actor->sector(), // Start position
|
||||
{ bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), 0 }, hit, CLIPMASK_MISSILE);
|
||||
{ bcos(actor->int_ang()), bsin(actor->int_ang()), 0 }, hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (hit.hitWall == nullptr)
|
||||
{
|
||||
|
@ -2494,7 +2494,7 @@ void SpriteSetup(void)
|
|||
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 });
|
||||
actorNew->add_int_pos({ MOVEx(256 + 128, actor->int_ang()), MOVEy(256 + 128, actor->int_ang()), 0 });
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -3729,7 +3729,7 @@ int ActorCoughItem(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
actorNew->set_int_pos({ actor->int_pos().X, actor->int_pos().Y, ActorLowerZ(actor) + Z(10) });
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
|
||||
// vel
|
||||
SP_TAG7(actorNew) = 10;
|
||||
|
@ -3792,23 +3792,23 @@ int SpawnItemsMatch(short match)
|
|||
case 90:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER8; // Boy
|
||||
spawnedActor->spr.__int_angle = itActor->spr.__int_angle;
|
||||
spawnedActor->spr.__int_angle = itActor->int_ang();
|
||||
break;
|
||||
case 91:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
spawnedActor->user.spal = spawnedActor->spr.pal = PALETTE_PLAYER0; // Girl
|
||||
spawnedActor->spr.__int_angle = itActor->spr.__int_angle;
|
||||
spawnedActor->spr.__int_angle = itActor->int_ang();
|
||||
break;
|
||||
case 92:
|
||||
spawnedActor = BunnyHatch2(itActor);
|
||||
spawnedActor->spr.__int_angle = itActor->spr.__int_angle;
|
||||
spawnedActor->spr.__int_angle = itActor->int_ang();
|
||||
break;
|
||||
|
||||
case 40:
|
||||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_REPAIR_KIT))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_REPAIR_KIT, s_RepairKit, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_REPAIR_KIT, s_RepairKit, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3819,7 +3819,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_STAR))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_STAR, s_IconStar, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_STAR, s_IconStar, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3830,7 +3830,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_LG_MINE))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_MINE, s_IconLgMine, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_MINE, s_IconLgMine, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3841,7 +3841,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_MICRO_GUN))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_GUN, s_IconMicroGun, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_GUN, s_IconMicroGun, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3852,7 +3852,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_MICRO_BATTERY))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_BATTERY, s_IconMicroBattery, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MICRO_BATTERY, s_IconMicroBattery, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3863,7 +3863,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_GRENADE_LAUNCHER))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GRENADE_LAUNCHER, s_IconGrenadeLauncher, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GRENADE_LAUNCHER, s_IconGrenadeLauncher, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3874,7 +3874,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_LG_GRENADE))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_GRENADE, s_IconLgGrenade, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_GRENADE, s_IconLgGrenade, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3885,7 +3885,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_RAIL_GUN))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_GUN, s_IconRailGun, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_GUN, s_IconRailGun, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3896,7 +3896,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_RAIL_AMMO))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_AMMO, s_IconRailAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_RAIL_AMMO, s_IconRailAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3907,7 +3907,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_ROCKET))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_ROCKET, s_IconRocket, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_ROCKET, s_IconRocket, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3918,7 +3918,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_SHOTGUN))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_SHOTGUN, s_IconShotgun, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_SHOTGUN, s_IconShotgun, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3929,7 +3929,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_LG_SHOTSHELL))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_SHOTSHELL, s_IconLgShotshell, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_SHOTSHELL, s_IconLgShotshell, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3940,7 +3940,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_GUARD_HEAD))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3951,7 +3951,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_FIREBALL_LG_AMMO))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_FIREBALL_LG_AMMO, s_IconFireballLgAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_FIREBALL_LG_AMMO, s_IconFireballLgAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3962,7 +3962,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_HEART))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3973,7 +3973,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_HEART_LG_AMMO))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART_LG_AMMO, s_IconHeartLgAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART_LG_AMMO, s_IconHeartLgAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -3985,7 +3985,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_ARMOR))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_ARMOR, s_IconArmor, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_ARMOR, s_IconArmor, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4002,7 +4002,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_MEDKIT))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MEDKIT, s_IconMedkit, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_MEDKIT, s_IconMedkit, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4013,7 +4013,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_SM_MEDKIT))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_SM_MEDKIT, s_IconSmMedkit, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_SM_MEDKIT, s_IconSmMedkit, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4024,7 +4024,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_CHEMBOMB))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CHEMBOMB, s_IconChemBomb, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CHEMBOMB, s_IconChemBomb, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4035,7 +4035,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_FLASHBOMB))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_FLASHBOMB, s_IconFlashBomb, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_FLASHBOMB, s_IconFlashBomb, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4046,7 +4046,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_NUKE))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_NUKE, s_IconNuke, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_NUKE, s_IconNuke, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4057,7 +4057,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_CALTROPS))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CALTROPS, s_IconCaltrops, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CALTROPS, s_IconCaltrops, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4068,7 +4068,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_BOOSTER))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_BOOSTER, s_IconBooster, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_BOOSTER, s_IconBooster, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4079,7 +4079,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_HEAT_CARD))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEAT_CARD, s_IconHeatCard, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEAT_CARD, s_IconHeatCard, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4090,7 +4090,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_CLOAK))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CLOAK, s_IconCloak, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_CLOAK, s_IconCloak, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4101,7 +4101,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_NIGHT_VISION))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_NIGHT_VISION, s_IconNightVision, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_NIGHT_VISION, s_IconNightVision, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4113,7 +4113,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_LG_UZI_AMMO))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_UZI_AMMO, s_IconLgUziAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_LG_UZI_AMMO, s_IconLgUziAmmo, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4124,7 +4124,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_GUARD_HEAD))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_GUARD_HEAD, s_IconGuardHead, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4135,7 +4135,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_HEART))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_HEART, s_IconHeart, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4147,7 +4147,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_UZIFLOOR))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_UZIFLOOR, s_IconUziFloor, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_UZIFLOOR, s_IconUziFloor, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4161,7 +4161,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, ICON_UZI))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_UZI, s_IconUzi, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, ICON_UZI, s_IconUzi, itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
spawnedActor->user.Flags2 |= SPR2_NEVER_RESPAWN;
|
||||
IconDefault(spawnedActor);
|
||||
|
||||
|
@ -4207,7 +4207,7 @@ int SpawnItemsMatch(short match)
|
|||
if (!ItemSpotClear(itActor, STAT_ITEM, s_Key[num]->Pic))
|
||||
break;
|
||||
|
||||
spawnedActor = SpawnActor(STAT_ITEM, s_Key[num]->Pic, s_Key[num], itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->spr.__int_angle, 0);
|
||||
spawnedActor = SpawnActor(STAT_ITEM, s_Key[num]->Pic, s_Key[num], itActor->sector(), itActor->int_pos().X, itActor->int_pos().Y, itActor->int_pos().Z, itActor->int_ang(), 0);
|
||||
|
||||
spawnedActor->spr.picnum = spawnedActor->user.ID = s_Key[num]->Pic;
|
||||
|
||||
|
@ -4911,7 +4911,7 @@ int DoSpawnItemTeleporterEffect(DSWActor* actor)
|
|||
|
||||
auto effect = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - Z(12),
|
||||
actor->spr.__int_angle, 0);
|
||||
actor->int_ang(), 0);
|
||||
|
||||
effect->spr.shade = -40;
|
||||
effect->spr.xrepeat = effect->spr.yrepeat = 36;
|
||||
|
|
|
@ -288,7 +288,7 @@ void TrackAddPoint(TRACK* t, TRACK_POINT* tp, DSWActor* actor)
|
|||
tpoint->x = actor->int_pos().X;
|
||||
tpoint->y = actor->int_pos().Y;
|
||||
tpoint->z = actor->int_pos().Z;
|
||||
tpoint->ang = actor->spr.__int_angle;
|
||||
tpoint->ang = actor->int_ang();
|
||||
tpoint->tag_low = actor->spr.lotag;
|
||||
tpoint->tag_high = actor->spr.hitag;
|
||||
|
||||
|
@ -304,7 +304,7 @@ DSWActor* TrackClonePoint(DSWActor* actor)
|
|||
actorNew->spr.cstat = 0;
|
||||
actorNew->spr.extra = 0;
|
||||
actorNew->spr.pos = actor->spr.pos;
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->spr.lotag = actor->spr.lotag;
|
||||
actorNew->spr.hitag = actor->spr.hitag;
|
||||
|
||||
|
@ -350,12 +350,12 @@ void QuickJumpSetup(short stat, short lotag, short type)
|
|||
TrackAddPoint(t, tp, start_sprite);
|
||||
|
||||
// add jump point
|
||||
actor->add_int_pos({ MulScale(64, bcos(actor->spr.__int_angle), 14), MulScale(64, bsin(actor->spr.__int_angle), 14), 0 });
|
||||
actor->add_int_pos({ MulScale(64, bcos(actor->int_ang()), 14), MulScale(64, bsin(actor->int_ang()), 14), 0 });
|
||||
actor->spr.lotag = lotag;
|
||||
TrackAddPoint(t, tp, actor);
|
||||
|
||||
// add end point
|
||||
end_sprite->add_int_pos({ MulScale(2048, bcos(end_sprite->spr.__int_angle), 14), MulScale(2048, bsin(end_sprite->spr.__int_angle), 14), 0 });
|
||||
end_sprite->add_int_pos({ MulScale(2048, bcos(end_sprite->int_ang()), 14), MulScale(2048, bsin(end_sprite->int_ang()), 14), 0 });
|
||||
end_sprite->spr.lotag = TRACK_END;
|
||||
end_sprite->spr.hitag = 0;
|
||||
TrackAddPoint(t, tp, end_sprite);
|
||||
|
@ -403,7 +403,7 @@ void QuickScanSetup(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({ MulScale(64, -bcos(start_sprite->spr.__int_angle), 14), MulScale(64, -bsin(start_sprite->spr.__int_angle), 14), 0 });
|
||||
start_sprite->add_int_pos({ MulScale(64, -bcos(start_sprite->int_ang()), 14), MulScale(64, -bsin(start_sprite->int_ang()), 14), 0 });
|
||||
TrackAddPoint(t, tp, start_sprite);
|
||||
|
||||
// add jump point
|
||||
|
@ -411,7 +411,7 @@ void QuickScanSetup(short stat, short lotag, short type)
|
|||
TrackAddPoint(t, tp, actor);
|
||||
|
||||
// add end point
|
||||
end_sprite->add_int_pos({ MulScale(64, bcos(end_sprite->spr.__int_angle), 14), MulScale(64, bsin(end_sprite->spr.__int_angle), 14), 0 });
|
||||
end_sprite->add_int_pos({ MulScale(64, bcos(end_sprite->int_ang()), 14), MulScale(64, bsin(end_sprite->int_ang()), 14), 0 });
|
||||
end_sprite->spr.lotag = TRACK_END;
|
||||
end_sprite->spr.hitag = 0;
|
||||
TrackAddPoint(t, tp, end_sprite);
|
||||
|
@ -461,7 +461,7 @@ void QuickExitSetup(short stat, short type)
|
|||
KillActor(actor);
|
||||
|
||||
// add end point
|
||||
end_sprite->add_int_pos({ MulScale(1024, bcos(end_sprite->spr.__int_angle), 14), MulScale(1024, bsin(end_sprite->spr.__int_angle), 14), 0 });
|
||||
end_sprite->add_int_pos({ MulScale(1024, bcos(end_sprite->int_ang()), 14), MulScale(1024, bsin(end_sprite->int_ang()), 14), 0 });
|
||||
end_sprite->spr.lotag = TRACK_END;
|
||||
end_sprite->spr.hitag = 0;
|
||||
TrackAddPoint(t, tp, end_sprite);
|
||||
|
@ -514,7 +514,7 @@ void QuickLadderSetup(short stat, short lotag, short type)
|
|||
TrackAddPoint(t, tp, actor);
|
||||
|
||||
// add end point
|
||||
end_sprite->add_int_pos({ MOVEx(512,end_sprite->spr.__int_angle), MOVEy(512,end_sprite->spr.__int_angle), 0 });
|
||||
end_sprite->add_int_pos({ MOVEx(512,end_sprite->int_ang()), MOVEy(512,end_sprite->int_ang()), 0 });
|
||||
end_sprite->spr.lotag = TRACK_END;
|
||||
end_sprite->spr.hitag = 0;
|
||||
TrackAddPoint(t, tp, end_sprite);
|
||||
|
@ -878,7 +878,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECT* sop)
|
|||
|
||||
itActor->user.Flags |= (SPR_SO_ATTACHED);
|
||||
|
||||
itActor->user.sang = itActor->spr.__int_angle;
|
||||
itActor->user.sang = itActor->int_ang();
|
||||
itActor->user.spal = itActor->spr.pal;
|
||||
|
||||
// search SO's sectors to make sure that it is not on a
|
||||
|
@ -1225,7 +1225,7 @@ void SetupSectorObject(sectortype* sectp, short tag)
|
|||
KillActor(actor);
|
||||
break;
|
||||
case SO_LIMIT_TURN:
|
||||
sop->limit_ang_center = actor->spr.__int_angle;
|
||||
sop->limit_ang_center = actor->int_ang();
|
||||
sop->limit_ang_delta = actor->spr.lotag;
|
||||
KillActor(actor);
|
||||
break;
|
||||
|
@ -1246,7 +1246,7 @@ void SetupSectorObject(sectortype* sectp, short tag)
|
|||
KillActor(actor);
|
||||
break;
|
||||
case SO_ANGLE:
|
||||
sop->ang = sop->ang_moving = actor->spr.__int_angle;
|
||||
sop->ang = sop->ang_moving = actor->int_ang();
|
||||
sop->last_ang = sop->ang_orig = sop->ang;
|
||||
sop->spin_ang = 0;
|
||||
KillActor(actor);
|
||||
|
@ -1716,7 +1716,7 @@ PlayerPart:
|
|||
}
|
||||
}
|
||||
|
||||
int16_t oldang = actor->spr.__int_angle;
|
||||
int16_t oldang = actor->int_ang();
|
||||
actor->spr.__int_angle = actor->user.sang;
|
||||
|
||||
if (actor->user.Flags & (SPR_ON_SO_SECTOR))
|
||||
|
@ -3005,8 +3005,8 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
actor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK);
|
||||
|
||||
FAFhitscan(actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - Z(24), actor->sector(), // Start position
|
||||
bcos(actor->spr.__int_angle), // X vector of 3D ang
|
||||
bsin(actor->spr.__int_angle), // Y vector of 3D ang
|
||||
bcos(actor->int_ang()), // X vector of 3D ang
|
||||
bsin(actor->int_ang()), // Y vector of 3D ang
|
||||
0, // Z vector of 3D ang
|
||||
hit, CLIPMASK_MISSILE);
|
||||
|
||||
|
@ -3107,7 +3107,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
|
||||
for (i = 0; i < (int)SIZ(z); i++)
|
||||
{
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, z[i] }, actor->sector(), actor->spr.__int_angle, near, 1024, NTAG_SEARCH_LO_HI);
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, z[i] }, actor->sector(), actor->int_ang(), near, 1024, NTAG_SEARCH_LO_HI);
|
||||
|
||||
if (near.actor() != nullptr && near.hitpos.X < 1024)
|
||||
{
|
||||
|
@ -3323,7 +3323,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
|
|||
// Get the z height to climb
|
||||
//
|
||||
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) - (ActorSizeZ(actor) >> 1) }, actor->sector(), actor->spr.__int_angle, near, 600, NTAG_SEARCH_LO_HI);
|
||||
neartag({ actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) - (ActorSizeZ(actor) >> 1) }, actor->sector(), actor->int_ang(), near, 600, NTAG_SEARCH_LO_HI);
|
||||
|
||||
if (near.hitWall == nullptr)
|
||||
{
|
||||
|
@ -3528,8 +3528,8 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
else
|
||||
{
|
||||
// calculate a new x and y
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->spr.__int_angle), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->spr.__int_angle), 14);
|
||||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
}
|
||||
|
||||
nz = 0;
|
||||
|
|
|
@ -3159,7 +3159,7 @@ int SpawnShrap(DSWActor* parentActor, DSWActor* secondaryActor, int means, BREAK
|
|||
short WaitTics = 64; // for FastShrap
|
||||
short shrap_type;
|
||||
int shrap_rand_zamt = 0;
|
||||
short shrap_ang = parentActor->spr.__int_angle;
|
||||
short shrap_ang = parentActor->int_ang();
|
||||
short shrap_delta_size = 0;
|
||||
short shrap_amt = 0;
|
||||
|
||||
|
@ -3714,8 +3714,8 @@ AutoShrap:
|
|||
shrap_ysize = actor->user.pos.Y = 12 + (RANDOM_P2(32<<8)>>8);
|
||||
actor->user.Counter = (RANDOM_P2(2048<<5)>>5);
|
||||
|
||||
nx = bcos(actor->spr.__int_angle, -6);
|
||||
ny = bsin(actor->spr.__int_angle, -6);
|
||||
nx = bcos(actor->int_ang(), -6);
|
||||
ny = bsin(actor->int_ang(), -6);
|
||||
move_missile(actor, nx, ny, 0, Z(8), Z(8), CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (RANDOM_P2(1024)<700)
|
||||
|
@ -4002,7 +4002,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
|
|||
if (actor == weapActor)
|
||||
{
|
||||
p = HariKariBlood;
|
||||
hit_ang = actor->spr.__int_angle;
|
||||
hit_ang = actor->int_ang();
|
||||
hit_x = actor->int_pos().X;
|
||||
hit_y = actor->int_pos().Y;
|
||||
hit_z = ActorZOfTop(weapActor) + (ActorSizeZ(weapActor) >> 4);
|
||||
|
@ -4043,7 +4043,7 @@ int SpawnBlood(DSWActor* actor, DSWActor* weapActor, short hit_ang, int hit_x, i
|
|||
break;
|
||||
case PLASMA_FOUNTAIN:
|
||||
p = PlasmaFountainBlood;
|
||||
hit_ang = weapActor->spr.__int_angle;
|
||||
hit_ang = weapActor->int_ang();
|
||||
hit_x = actor->int_pos().X;
|
||||
hit_y = actor->int_pos().Y;
|
||||
hit_z = ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2);
|
||||
|
@ -4402,7 +4402,7 @@ bool WeaponMoveHit(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
return true;
|
||||
}
|
||||
|
@ -4411,7 +4411,7 @@ bool WeaponMoveHit(DSWActor* actor)
|
|||
// on walls, so look with hitscan
|
||||
|
||||
HitInfo hit{};
|
||||
hitscan(actor->int_pos(), actor->sector(), { bcos(actor->spr.__int_angle), bsin(actor->spr.__int_angle), actor->spr.zvel }, hit, CLIPMASK_MISSILE);
|
||||
hitscan(actor->int_pos(), actor->sector(), { bcos(actor->int_ang()), bsin(actor->int_ang()), actor->spr.zvel }, hit, CLIPMASK_MISSILE);
|
||||
|
||||
if (!hit.hitSector)
|
||||
{
|
||||
|
@ -7254,7 +7254,7 @@ int DoExpDamageTest(DSWActor* actor)
|
|||
if (actor->user.ID == MUSHROOM_CLOUD) return 0; // Central Nuke doesn't break stuff
|
||||
// Only secondaries do that
|
||||
|
||||
TraverseBreakableWalls(actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.Radius);
|
||||
TraverseBreakableWalls(actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.Radius);
|
||||
|
||||
break_count = 0;
|
||||
max_stat = SIZ(StatBreakList);
|
||||
|
@ -7425,7 +7425,7 @@ int DoStar(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -7920,7 +7920,7 @@ int DoBlurExtend(DSWActor* actor, int16_t interval, int16_t blur_num)
|
|||
int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PLASMA_FOUNTAIN, s_PlasmaFountain, sActor->sector(),
|
||||
sActor->int_pos().X, sActor->int_pos().Y, ActorZOfBottom(sActor), sActor->spr.__int_angle, 0);
|
||||
sActor->int_pos().X, sActor->int_pos().Y, ActorZOfBottom(sActor), sActor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.shade = -40;
|
||||
if (wActor)
|
||||
|
@ -7949,7 +7949,7 @@ int DoPlasmaFountain(DSWActor* actor)
|
|||
|
||||
// move with sprite
|
||||
SetActorZ(actor, attachActor->int_pos());
|
||||
actor->spr.__int_angle = attachActor->spr.__int_angle;
|
||||
actor->spr.__int_angle = attachActor->int_ang();
|
||||
|
||||
actor->user.Counter++;
|
||||
if (actor->user.Counter > 3)
|
||||
|
@ -8102,12 +8102,12 @@ void WallBounce(DSWActor* actor, short ang)
|
|||
actor->user.change.X = DMulScale(day, k, dax, l, 14);
|
||||
actor->user.change.Y = DMulScale(dax, k, -day, l, 14);
|
||||
|
||||
old_ang = actor->spr.__int_angle;
|
||||
old_ang = actor->int_ang();
|
||||
actor->spr.__int_angle = getangle(actor->user.change.X, actor->user.change.Y);
|
||||
|
||||
// hack to prevent missile from sticking to a wall
|
||||
//
|
||||
if (old_ang == actor->spr.__int_angle)
|
||||
if (old_ang == actor->int_ang())
|
||||
{
|
||||
actor->user.change.X = -actor->user.change.X;
|
||||
actor->user.change.Y = -actor->user.change.Y;
|
||||
|
@ -8265,7 +8265,7 @@ int DoGrenade(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -8389,7 +8389,7 @@ int DoGrenade(DSWActor* actor)
|
|||
if (!(actor->user.Flags & (SPR_BOUNCE|SPR_UNDERWATER)))
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 100);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 100);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -8467,7 +8467,7 @@ int DoVulcanBoulder(DSWActor* actor)
|
|||
|
||||
if (wph->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(wph, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -8870,7 +8870,7 @@ int DoMine(DSWActor* actor)
|
|||
|
||||
if (hit_wall->lotag == TAG_WALL_BREAK)
|
||||
{
|
||||
HitBreakWall(hit_wall, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->user.ID);
|
||||
HitBreakWall(hit_wall, actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->user.ID);
|
||||
actor->user.coll.setNone();
|
||||
break;
|
||||
}
|
||||
|
@ -9143,7 +9143,7 @@ int DoLaser(DSWActor* actor)
|
|||
if (spawn_count < 256)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_LaserPuff, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = 16;
|
||||
|
@ -9230,7 +9230,7 @@ int DoRail(DSWActor* actor)
|
|||
if (spawn_count < 128)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, &s_RailPuff[0][0], actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 20);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 20);
|
||||
|
||||
actorNew->spr.xvel += (RandomRange(140)-RandomRange(140));
|
||||
actorNew->spr.yvel += (RandomRange(140)-RandomRange(140));
|
||||
|
@ -9329,7 +9329,7 @@ int DoRocket(DSWActor* actor)
|
|||
if (!actor->user.Counter)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->sector(),
|
||||
pos.X, pos.Y, pos.Z, actor->spr.__int_angle, 100);
|
||||
pos.X, pos.Y, pos.Z, actor->int_ang(), 100);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -9378,7 +9378,7 @@ int DoMicroMini(DSWActor* actor)
|
|||
int SpawnExtraMicroMini(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Micro[0][0], actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, actor->spr.xvel);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), actor->spr.xvel);
|
||||
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = actor->spr.xrepeat;
|
||||
|
@ -9418,7 +9418,7 @@ int DoMicro(DSWActor* actor)
|
|||
if (!actor->user.Counter)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_Puff, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 100);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 100);
|
||||
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -9493,12 +9493,12 @@ int DoUziBullet(DSWActor* actor)
|
|||
{
|
||||
WeaponMoveHit(actor);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
actorNew->spr.shade = -40;
|
||||
actorNew->spr.xrepeat = UZI_SMOKE_REPEAT;
|
||||
actorNew->spr.yrepeat = UZI_SMOKE_REPEAT;
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->spr.clipdist = 128 >> 2;
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_YCENTER);
|
||||
|
||||
|
@ -9509,7 +9509,7 @@ int DoUziBullet(DSWActor* actor)
|
|||
actorNew->spr.xrepeat = UZI_SPARK_REPEAT;
|
||||
actorNew->spr.yrepeat = UZI_SPARK_REPEAT;
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
}
|
||||
|
||||
|
@ -9680,7 +9680,7 @@ int SpawnCoolieExp(DSWActor* actor)
|
|||
PlaySound(DIGI_COOLIEEXPLODE, actor, v3df_none);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_EXP, s_BoltExp, actor->sector(),
|
||||
nx, ny, zh, actor->spr.__int_angle, 0);
|
||||
nx, ny, zh, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(actor, actorNew);
|
||||
|
@ -9745,7 +9745,7 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor)
|
|||
}
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES, s_FireballFlames, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
||||
|
@ -9806,7 +9806,7 @@ void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor)
|
|||
|
||||
int SpawnBreakFlames(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
||||
|
@ -9837,7 +9837,7 @@ int SpawnBreakFlames(DSWActor* actor)
|
|||
void SpawnBreakStaticFlames(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_STATIC_FIRE, FIREBALL_FLAMES, nullptr, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
if (RandomRange(1000) > 500)
|
||||
actorNew->spr.picnum = 3143;
|
||||
|
@ -9871,7 +9871,7 @@ void SpawnFireballExp(DSWActor* actor)
|
|||
PlaySound(DIGI_SMALLEXP, actor, v3df_none);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_EXP, s_FireballExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
actorNew->spr.xrepeat = 52;
|
||||
actorNew->spr.yrepeat = 52;
|
||||
|
@ -9903,7 +9903,7 @@ void SpawnGoroFireballExp(DSWActor* actor)
|
|||
PlaySound(DIGI_MEDIUMEXP, actor, v3df_none);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, 0, s_FireballExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
actorNew->spr.xrepeat = 16;
|
||||
|
@ -9932,7 +9932,7 @@ void SpawnBoltExp(DSWActor* actor)
|
|||
PlaySound(DIGI_BOLTEXPLODE, actor, v3df_none);
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, BOLT_EXP, s_BoltExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -9981,7 +9981,7 @@ void SpawnTankShellExp(DSWActor* actor)
|
|||
PlaySound(DIGI_BOLTEXPLODE, actor, v3df_none);
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, TANK_SHELL_EXP, s_TankShellExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -10005,7 +10005,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang)
|
|||
ASSERT(actor->hasU());
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, GRENADE_EXP, s_GrenadeExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 512);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 512);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -10064,7 +10064,7 @@ void SpawnNuclearExp(DSWActor* actor)
|
|||
|
||||
// Spawn big mushroom cloud
|
||||
auto expActor = SpawnActor(STAT_MISSILE, MUSHROOM_CLOUD, s_NukeMushroom, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(own, expActor);
|
||||
|
@ -10081,7 +10081,7 @@ void SpawnNuclearExp(DSWActor* actor)
|
|||
|
||||
// Do central explosion
|
||||
expActor = SpawnActor(STAT_MISSILE, MUSHROOM_CLOUD, s_GrenadeExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
SetOwner(own, expActor);
|
||||
expActor->spr.shade = -128;
|
||||
|
@ -10124,10 +10124,10 @@ void SpawnTracerExp(DSWActor* actor)
|
|||
|
||||
if (actor->user.ID == BOLT_THINMAN_R1)
|
||||
expActor = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, s_TracerExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
else
|
||||
expActor = SpawnActor(STAT_MISSILE, TRACER_EXP, s_TracerExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -10156,7 +10156,7 @@ void SpawnMicroExp(DSWActor* actor)
|
|||
return ;
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, MICRO_EXP, s_MicroExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -10207,7 +10207,7 @@ void AddSpriteToSectorObject(DSWActor* actor, SECTOR_OBJECT* sop)
|
|||
actor->user.pos.Y = sop->pmid.Y - actor->int_pos().Y;
|
||||
actor->user.pos.Z = sop->mid_sector->int_floorz() - actor->int_pos().Z;
|
||||
|
||||
actor->user.sang = actor->spr.__int_angle;
|
||||
actor->user.sang = actor->int_ang();
|
||||
}
|
||||
|
||||
void SpawnBigGunFlames(DSWActor* actor, DSWActor* Operator, SECTOR_OBJECT* sop, bool smallflames)
|
||||
|
@ -10215,7 +10215,7 @@ void SpawnBigGunFlames(DSWActor* actor, DSWActor* Operator, SECTOR_OBJECT* sop,
|
|||
unsigned sn;
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, MICRO_EXP, s_BigGunFlame, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(Operator, expActor);
|
||||
|
@ -10276,7 +10276,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang)
|
|||
|
||||
ASSERT(actor->hasU());
|
||||
auto expActor = SpawnActor(STAT_MISSILE, GRENADE_EXP, s_GrenadeSmallExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 1024);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 1024);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -10345,7 +10345,7 @@ void SpawnGrenadeExp(DSWActor* actor)
|
|||
}
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, GRENADE_EXP, s_GrenadeExp, actor->sector(),
|
||||
dx, dy, dz, actor->spr.__int_angle, 0);
|
||||
dx, dy, dz, actor->int_ang(), 0);
|
||||
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
@ -10426,7 +10426,7 @@ void SpawnMineExp(DSWActor* actor)
|
|||
PlaySound(DIGI_MINEBLOW, actor, v3df_none);
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, MINE_EXP, s_MineExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(GetOwner(actor), expActor);
|
||||
|
@ -10472,7 +10472,7 @@ DSWActor* SpawnSectorExp(DSWActor* actor)
|
|||
PlaySound(DIGI_30MMEXPLODE, actor, v3df_none);
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, GRENADE_EXP, s_SectorExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
expActor->spr.shade = -40;
|
||||
|
@ -10495,7 +10495,7 @@ DSWActor* SpawnLargeExp(DSWActor* actor)
|
|||
PlaySound(DIGI_30MMEXPLODE, actor, v3df_none);
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, GRENADE_EXP, s_SectorExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
expActor->spr.shade = -40;
|
||||
|
@ -10526,13 +10526,13 @@ void SpawnMeteorExp(DSWActor* actor)
|
|||
if (actor->user.spal == 25) // Serp ball
|
||||
{
|
||||
expActor = SpawnActor(STAT_MISSILE, METEOR_EXP, s_TeleportEffect2, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySound(DIGI_MEDIUMEXP, actor, v3df_none);
|
||||
expActor = SpawnActor(STAT_MISSILE, METEOR_EXP, s_MeteorExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
}
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
|
@ -10561,7 +10561,7 @@ void SpawnLittleExp(DSWActor* actor)
|
|||
|
||||
PlaySound(DIGI_HEADSHOTHIT, actor, v3df_none);
|
||||
auto expActor = SpawnActor(STAT_MISSILE, BOLT_EXP, s_SectorExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
expActor->spr.shade = -127;
|
||||
|
@ -10790,7 +10790,7 @@ int DoNapalm(DSWActor* actor)
|
|||
PlaySound(DIGI_NAPPUFF, actor, v3df_none);
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, NAP_EXP, s_NapExp, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(actor, expActor);
|
||||
|
@ -11184,7 +11184,7 @@ int DoRing(DSWActor* actor)
|
|||
actor->spr.__int_angle = NORM_ANGLE(actor->int_ang() + (4 * RINGMOVETICS) + RINGMOVETICS);
|
||||
|
||||
// put it out there
|
||||
actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->spr.__int_angle), 14), MulScale(actor->user.Dist, bsin(actor->spr.__int_angle), 14),
|
||||
actor->add_int_pos({ MulScale(actor->user.Dist, bcos(actor->int_ang()), 14), MulScale(actor->user.Dist, bsin(actor->int_ang()), 14),
|
||||
pp ? (actor->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9 : 0 });
|
||||
|
||||
SetActor(actor, actor->int_pos());
|
||||
|
@ -11255,7 +11255,7 @@ void InitSpellRing(PLAYER* pp)
|
|||
actorNew->user.floor_dist = Z(10);
|
||||
|
||||
// put it out there
|
||||
actorNew->add_int_pos({ MulScale(actorNew->user.Dist, bcos(actorNew->spr.__int_angle), 14), MulScale(actorNew->user.Dist, bsin(actorNew->spr.__int_angle), 14),
|
||||
actorNew->add_int_pos({ MulScale(actorNew->user.Dist, bcos(actorNew->int_ang()), 14), MulScale(actorNew->user.Dist, bsin(actorNew->int_ang()), 14),
|
||||
pp->pos.Z + Z(20) + ((actorNew->user.Dist * (-pp->horizon.horiz.asq16() >> 9)) >> 9) });
|
||||
|
||||
actorNew->spr.__int_angle = NORM_ANGLE(actorNew->int_ang() + 512);
|
||||
|
@ -11527,7 +11527,7 @@ int InitSerpRing(DSWActor* actor)
|
|||
actorNew->user.pos.Z = Z(50);
|
||||
|
||||
// ang around the serp is now slide_ang
|
||||
actorNew->user.slide_ang = actorNew->spr.__int_angle;
|
||||
actorNew->user.slide_ang = actorNew->int_ang();
|
||||
// randomize the head turning angle
|
||||
actorNew->spr.__int_angle = RANDOM_P2(2048<<5)>>5;
|
||||
|
||||
|
@ -11655,7 +11655,7 @@ int InitEnemyNapalm(DSWActor* actor)
|
|||
for (i = 0; i < SIZ(mp); i++)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL1, s_Napalm, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->spr.__int_angle, NAPALM_VELOCITY);
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->int_ang(), NAPALM_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
if (i==0) // Only attach sound to first projectile
|
||||
|
@ -11757,7 +11757,7 @@ int InitEnemyMirv(DSWActor* actor)
|
|||
PlaySound(DIGI_MIRVFIRE, actor, v3df_none);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MIRV_METEOR, s_Mirv, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->spr.__int_angle, MIRV_VELOCITY);
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfTop(actor) + (ActorSizeZ(actor) >> 2), actor->int_ang(), MIRV_VELOCITY);
|
||||
|
||||
PlaySound(DIGI_MIRVWIZ, actorNew, v3df_follow);
|
||||
|
||||
|
@ -12173,7 +12173,7 @@ int InitSumoNapalm(DSWActor* actor)
|
|||
|
||||
PlaySound(DIGI_NAPFIRE, actor, v3df_none);
|
||||
|
||||
ang = actor->spr.__int_angle;
|
||||
ang = actor->int_ang();
|
||||
for (int j = 0; j < 4; j++)
|
||||
{
|
||||
for (size_t i = 0; i < countof(mp); i++)
|
||||
|
@ -12242,7 +12242,7 @@ int InitSumoSkull(DSWActor* actor)
|
|||
|
||||
PlaySound(DIGI_SERPSUMMONHEADS, actor, v3df_none);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, SKULL_R0, &s_SkullWait[0][0], actor->sector(), actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor), actor->spr.__int_angle, 0);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, SKULL_R0, &s_SkullWait[0][0], actor->sector(), actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor), actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.xvel = 500;
|
||||
SetOwner(actor, actorNew);
|
||||
|
@ -13187,7 +13187,7 @@ int InitZillaRail(DSWActor* actor)
|
|||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, 1200);
|
||||
nx, ny, nz, actor->int_ang(), 1200);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = 52;
|
||||
|
@ -13568,7 +13568,7 @@ int InitEnemyNuke(DSWActor* actor)
|
|||
// Spawn a shot
|
||||
nz = actor->int_pos().Z + Z(40);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, 700);
|
||||
nx, ny, nz, actor->int_ang(), 700);
|
||||
|
||||
if (actor->user.ID == ZOMBIE_RUN_R0)
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
|
@ -13855,9 +13855,9 @@ bool WallSpriteInsideSprite(DSWActor* wactor, DSWActor* actor)
|
|||
xoff = -xoff;
|
||||
|
||||
// x delta
|
||||
dax = bsin(wactor->spr.__int_angle) * wactor->spr.xrepeat;
|
||||
dax = bsin(wactor->int_ang()) * wactor->spr.xrepeat;
|
||||
// y delta
|
||||
day = -bcos(wactor->spr.__int_angle) * wactor->spr.xrepeat;
|
||||
day = -bcos(wactor->int_ang()) * wactor->spr.xrepeat;
|
||||
|
||||
xsiz = tileWidth(wactor->spr.picnum);
|
||||
mid_dist = (xsiz >> 1) + xoff;
|
||||
|
@ -14067,7 +14067,7 @@ int InitSerpSpell(DSWActor* actor)
|
|||
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 1500);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 1500);
|
||||
|
||||
actorNew->set_int_z(ActorZOfTop(actor));
|
||||
|
||||
|
@ -14123,7 +14123,7 @@ int SpawnDemonFist(DSWActor* actor)
|
|||
return -1;
|
||||
|
||||
auto expActor = SpawnActor(STAT_MISSILE, 0, s_TeleportEffect, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor), actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, ActorZOfMiddle(actor), actor->int_ang(), 0);
|
||||
|
||||
expActor->spr.hitag = LUMINOUS; //Always full brightness
|
||||
expActor->spr.shade = -40;
|
||||
|
@ -14165,7 +14165,7 @@ int InitSerpMonstSpell(DSWActor* actor)
|
|||
actor->spr.__int_angle = getangle(actor->user.targetActor->int_pos().X - actor->int_pos().X, actor->user.targetActor->int_pos().Y - actor->int_pos().Y);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, SERP_METEOR, &sg_SerpMeteor[0][0], actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 500);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 500);
|
||||
|
||||
actorNew->user.spal = actorNew->spr.pal = 25; // Bright Red
|
||||
actorNew->set_int_z(ActorZOfTop(actor));
|
||||
|
@ -14239,7 +14239,7 @@ int InitEnemyRocket(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R2, &s_Rocket[0][0], actor->sector(),
|
||||
nx, ny, nz-Z(8), actor->user.targetActor->spr.__int_angle, NINJA_BOLT_VELOCITY);
|
||||
nx, ny, nz-Z(8), actor->user.targetActor->int_ang(), NINJA_BOLT_VELOCITY);
|
||||
|
||||
// Set default palette
|
||||
actorNew->spr.pal = actorNew->user.spal = 17; // White
|
||||
|
@ -14320,7 +14320,7 @@ int InitEnemyRail(DSWActor* actor)
|
|||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, 1200);
|
||||
nx, ny, nz, actor->int_ang(), 1200);
|
||||
|
||||
if (actor->user.ID == ZOMBIE_RUN_R0)
|
||||
SetOwner(GetOwner(actor), actorNew);
|
||||
|
@ -14392,7 +14392,7 @@ int InitZillaRocket(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R2, &s_Rocket[0][0], actor->sector(),
|
||||
nx, ny, nz-Z(8), actor->user.targetActor->spr.__int_angle, NINJA_BOLT_VELOCITY);
|
||||
nx, ny, nz-Z(8), actor->user.targetActor->int_ang(), NINJA_BOLT_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = 28;
|
||||
|
@ -14452,7 +14452,7 @@ int InitEnemyStar(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, STAR1, s_Star, actor->sector(),
|
||||
nx, ny, nz, actor->user.targetActor->spr.__int_angle, NINJA_STAR_VELOCITY);
|
||||
nx, ny, nz, actor->user.targetActor->int_ang(), NINJA_STAR_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = 16;
|
||||
|
@ -14491,7 +14491,7 @@ int InitEnemyCrossbow(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, CROSSBOLT, &s_CrossBolt[0][0], actor->sector(),
|
||||
nx, ny, nz, actor->user.targetActor->spr.__int_angle, 800);
|
||||
nx, ny, nz, actor->user.targetActor->int_ang(), 800);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.xrepeat = 16;
|
||||
|
@ -14539,7 +14539,7 @@ int InitSkelSpell(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, ELECTRO_ENEMY, s_Electro, actor->sector(),
|
||||
nx, ny, nz, actor->user.targetActor->spr.__int_angle, SKEL_ELECTRO_VELOCITY);
|
||||
nx, ny, nz, actor->user.targetActor->int_ang(), SKEL_ELECTRO_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.xrepeat -= 20;
|
||||
|
@ -14584,7 +14584,7 @@ int InitCoolgFire(DSWActor* actor)
|
|||
PlaySound(DIGI_CGMAGIC, actor, v3df_follow);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, COOLG_FIRE, s_CoolgFire, actor->sector(),
|
||||
nx, ny, nz, actor->user.targetActor->spr.__int_angle, COOLG_FIRE_VELOCITY);
|
||||
nx, ny, nz, actor->user.targetActor->int_ang(), COOLG_FIRE_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.hitag = LUMINOUS;
|
||||
|
@ -14649,7 +14649,7 @@ int InitCoolgDrip(DSWActor* actor)
|
|||
nz = actor->int_pos().Z;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, COOLG_DRIP, s_CoolgDrip, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, 0);
|
||||
nx, ny, nz, actor->int_ang(), 0);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 20;
|
||||
|
@ -14688,7 +14688,7 @@ int GenerateDrips(DSWActor* actor)
|
|||
nz = actor->int_pos().Z;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_SHRAP, COOLG_DRIP, s_CoolgDrip, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, 0);
|
||||
nx, ny, nz, actor->int_ang(), 0);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 20;
|
||||
|
@ -14753,7 +14753,7 @@ void InitFireballTrap(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL, s_Fireball, actor->sector(), nx, ny, nz,
|
||||
actor->spr.__int_angle, FIREBALL_TRAP_VELOCITY);
|
||||
actor->int_ang(), FIREBALL_TRAP_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
SetOwner(actor, actorNew);
|
||||
|
@ -14783,7 +14783,7 @@ void InitBoltTrap(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], actor->sector(), nx, ny, nz,
|
||||
actor->spr.__int_angle, BOLT_TRAP_VELOCITY);
|
||||
actor->int_ang(), BOLT_TRAP_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = 32;
|
||||
|
@ -14811,7 +14811,7 @@ void InitSpearTrap(DSWActor* actor)
|
|||
nz = ActorZOfMiddle(actor);
|
||||
|
||||
// Spawn a shot
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, CROSSBOLT, &s_CrossBolt[0][0], actor->sector(), nx, ny, nz, actor->spr.__int_angle, 750);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, CROSSBOLT, &s_CrossBolt[0][0], actor->sector(), nx, ny, nz, actor->int_ang(), 750);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.xrepeat = 16;
|
||||
|
@ -14931,7 +14931,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixed_t q16horiz)
|
|||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, 0, s_Tracer, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, TRACER_VELOCITY);
|
||||
nx, ny, nz, actor->int_ang(), TRACER_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
if (Operator!= nullptr)
|
||||
|
@ -14978,7 +14978,7 @@ int InitTracerAutoTurret(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, 0, s_Tracer, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, TRACER_VELOCITY);
|
||||
nx, ny, nz, actor->int_ang(), TRACER_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
actorNew->spr.yrepeat = 10;
|
||||
|
@ -15024,7 +15024,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i
|
|||
|
||||
if (ID>0) id = ID;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, id, s_UziSmoke, §or[0], hit_x, hit_y, hit_z, actor->spr.__int_angle, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, id, s_UziSmoke, §or[0], hit_x, hit_y, hit_z, actor->int_ang(), 0);
|
||||
actorNew->spr.shade = -40;
|
||||
|
||||
if (hitActor->user.PlayerP)
|
||||
|
@ -15053,7 +15053,7 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i
|
|||
}
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.__int_angle = actor->spr.__int_angle;
|
||||
actorNew->spr.__int_angle = actor->int_ang();
|
||||
|
||||
SetActorZ(actorNew, &hit_pos);
|
||||
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
|
||||
|
@ -15062,9 +15062,9 @@ int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, i
|
|||
if ((RANDOM_P2(1024<<5)>>5) < 512+128)
|
||||
{
|
||||
if (!hitActor->user.PlayerP)
|
||||
SpawnBlood(hitActor, nullptr, actor->spr.__int_angle, hit_x, hit_y, hit_z);
|
||||
SpawnBlood(hitActor, nullptr, actor->int_ang(), hit_x, hit_y, hit_z);
|
||||
else
|
||||
SpawnBlood(hitActor, nullptr, actor->spr.__int_angle, hit_x, hit_y, hit_z+Z(20));
|
||||
SpawnBlood(hitActor, nullptr, actor->int_ang(), hit_x, hit_y, hit_z+Z(20));
|
||||
|
||||
// blood comes out the other side?
|
||||
if ((RANDOM_P2(1024<<5)>>5) < 256)
|
||||
|
@ -15122,7 +15122,7 @@ bool HitscanSpriteAdjust(DSWActor* actor, walltype* hit_wall)
|
|||
ang = actor->spr.__int_angle = NORM_ANGLE(wall_ang + 512);
|
||||
}
|
||||
else
|
||||
ang = actor->spr.__int_angle;
|
||||
ang = actor->int_ang();
|
||||
|
||||
xvect = bcos(ang, 4);
|
||||
yvect = bsin(ang, 4);
|
||||
|
@ -15353,7 +15353,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
|
|||
PlaySound(DIGI_CANNON, pp, v3df_dontpan|v3df_doppler);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, 0, s_TankShell, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, TANK_SHELL_VELOCITY);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), TANK_SHELL_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.yrepeat = 8;
|
||||
|
@ -15422,7 +15422,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp)
|
|||
else
|
||||
{
|
||||
picked = nullptr;
|
||||
ang = actor->spr.__int_angle;
|
||||
ang = actor->int_ang();
|
||||
}
|
||||
|
||||
nz = actor->int_pos().Z;
|
||||
|
@ -15492,7 +15492,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
|
|||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, &s_Rocket[0][0], actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, ROCKET_VELOCITY);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), ROCKET_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.yrepeat = 40;
|
||||
|
@ -15529,7 +15529,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
|
|||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL, s_Fireball, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, FIREBALL_VELOCITY);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), FIREBALL_VELOCITY);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.yrepeat = 40;
|
||||
|
@ -15579,7 +15579,7 @@ int InitTurretRail(DSWActor* actor, PLAYER* pp)
|
|||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R1, &s_Rail[0][0], pp->cursector,
|
||||
nx, ny, nz, actor->spr.__int_angle, 1200);
|
||||
nx, ny, nz, actor->int_ang(), 1200);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.yrepeat = 52;
|
||||
|
@ -15628,7 +15628,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp)
|
|||
// Inserting and setting up variables
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BOLT_THINMAN_R0, s_Laser, pp->cursector,
|
||||
nx, ny, nz, actor->spr.__int_angle, 300);
|
||||
nx, ny, nz, actor->int_ang(), 300);
|
||||
|
||||
SetOwner(pp->actor, actorNew);
|
||||
actorNew->spr.yrepeat = 52;
|
||||
|
@ -15690,7 +15690,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp)
|
|||
q16horiz = horizmin;
|
||||
|
||||
daz = -MulScale(q16horiz, 2000, 16) + (RandomRange(Z(80)) - Z(40));
|
||||
daang = actor->spr.__int_angle;
|
||||
daang = actor->int_ang();
|
||||
}
|
||||
|
||||
FAFhitscan(nx, ny, nz, actor->sector(), // Start position
|
||||
|
@ -16034,7 +16034,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
hit.hitActor = hitt;
|
||||
if (hitt != nullptr)
|
||||
{
|
||||
delta = short(abs(getincangle(actor->spr.__int_angle, daang)));
|
||||
delta = short(abs(getincangle(actor->int_ang(), daang)));
|
||||
if (delta > 128)
|
||||
{
|
||||
// don't shoot if greater than 128
|
||||
|
@ -16046,7 +16046,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
// and not close
|
||||
WeaponHitscanShootFeet(actor, hitt, &daz);
|
||||
|
||||
daang = actor->spr.__int_angle;
|
||||
daang = actor->int_ang();
|
||||
daang = NORM_ANGLE(daang + RANDOM_P2(32) - 16);
|
||||
}
|
||||
else
|
||||
|
@ -16054,7 +16054,7 @@ int InitTurretMgun(SECTOR_OBJECT* sop)
|
|||
// randomize the z for shots
|
||||
daz += RandomRange(Z(120)) - Z(60);
|
||||
// never auto aim the angle
|
||||
daang = actor->spr.__int_angle;
|
||||
daang = actor->int_ang();
|
||||
daang = NORM_ANGLE(daang + RANDOM_P2(64) - 32);
|
||||
}
|
||||
}
|
||||
|
@ -16425,7 +16425,7 @@ int InitSpriteGrenade(DSWActor* actor)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE, &s_Grenade[0][0], actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, GRENADE_VELOCITY);
|
||||
nx, ny, nz, actor->int_ang(), GRENADE_VELOCITY);
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
NewStateGroup(actorNew, &sg_Grenade[0]);
|
||||
|
@ -16541,7 +16541,7 @@ int InitEnemyMine(DSWActor* actor)
|
|||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, actor->sector(),
|
||||
nx, ny, nz, actor->spr.__int_angle, MINE_VELOCITY);
|
||||
nx, ny, nz, actor->int_ang(), MINE_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = 32;
|
||||
|
@ -16695,7 +16695,7 @@ int InitEnemyFireball(DSWActor* actor)
|
|||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GORO_FIREBALL, s_Fireball, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, nz, actor->spr.__int_angle, GORO_FIREBALL_VELOCITY);
|
||||
actor->int_pos().X, actor->int_pos().Y, nz, actor->int_ang(), GORO_FIREBALL_VELOCITY);
|
||||
|
||||
actorNew->spr.hitag = LUMINOUS; //Always full brightness
|
||||
actorNew->spr.xrepeat = 20;
|
||||
|
@ -17045,7 +17045,7 @@ int SpawnSplash(DSWActor* actor)
|
|||
DoActorZrange(actor);
|
||||
MissileWaterAdjust(actor);
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, SPLASH, s_Splash, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->user.loz, actor->spr.__int_angle, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, SPLASH, s_Splash, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->user.loz, actor->int_ang(), 0);
|
||||
|
||||
if (sectu && (sectp->extra & SECTFX_LIQUID_MASK) == SECTFX_LIQUID_LAVA)
|
||||
actorNew->user.spal = actorNew->spr.pal = PALETTE_RED_LIGHTING;
|
||||
|
@ -17137,7 +17137,7 @@ DSWActor* SpawnBubble(DSWActor* actor)
|
|||
if (Prediction)
|
||||
return nullptr;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BUBBLE, s_Bubble, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BUBBLE, s_Bubble, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
actorNew->spr.xrepeat = 8 + (RANDOM_P2(8 << 8) >> 8);
|
||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat;
|
||||
|
@ -17174,7 +17174,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
|
|||
return false;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_VehicleSmoke, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->int_ang(), 0);
|
||||
|
||||
actorNew->user.WaitTics = 1*120;
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -17200,7 +17200,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
|
|||
int SpawnSmokePuff(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_WaterSmoke, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->int_ang(), 0);
|
||||
|
||||
actorNew->user.WaitTics = 1*120;
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -17446,8 +17446,8 @@ void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, i
|
|||
spawnedActor->spr.__int_angle = wall_ang;
|
||||
|
||||
// move it back some
|
||||
nx = bcos(spawnedActor->spr.__int_angle, 4);
|
||||
ny = bsin(spawnedActor->spr.__int_angle, 4);
|
||||
nx = bcos(spawnedActor->int_ang(), 4);
|
||||
ny = bsin(spawnedActor->int_ang(), 4);
|
||||
|
||||
auto sect = spawnedActor->sector();
|
||||
|
||||
|
@ -17494,7 +17494,7 @@ int QueueFloorBlood(DSWActor* actor)
|
|||
KillActor(FloorBloodQueue[FloorBloodQueueHead]);
|
||||
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_SKIP4, FLOORBLOOD1, s_FloorBlood1, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
SpawnActor(STAT_SKIP4, FLOORBLOOD1, s_FloorBlood1, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
FloorBloodQueueHead = (FloorBloodQueueHead+1) & (MAX_FLOORBLOOD_QUEUE-1);
|
||||
|
||||
|
@ -17588,13 +17588,13 @@ int QueueFootPrint(DSWActor* actor)
|
|||
|
||||
if (rnd_num > 683)
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT1, s_FootPrint1, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT1, s_FootPrint1, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
else if (rnd_num > 342)
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT2, s_FootPrint2, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT2, s_FootPrint2, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
else
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT3, s_FootPrint3, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT3, s_FootPrint3, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
|
||||
FloorBloodQueueHead = (FloorBloodQueueHead+1) & (MAX_FLOORBLOOD_QUEUE-1);
|
||||
|
||||
|
@ -17613,7 +17613,7 @@ int QueueFootPrint(DSWActor* actor)
|
|||
spawnedActor->spr.clipdist = 0;
|
||||
spawnedActor->spr.xoffset = spawnedActor->spr.yoffset = 0;
|
||||
spawnedActor->spr.pos = actor->spr.pos;
|
||||
spawnedActor->spr.__int_angle = actor->spr.__int_angle;
|
||||
spawnedActor->spr.__int_angle = actor->int_ang();
|
||||
spawnedActor->user.Flags &= ~(SPR_SHADOW);
|
||||
switch (FootMode)
|
||||
{
|
||||
|
@ -17759,8 +17759,8 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
|||
spawnedActor->spr.__int_angle = wall_ang;
|
||||
|
||||
// move it back some
|
||||
nx = bcos(spawnedActor->spr.__int_angle, 4);
|
||||
ny = bsin(spawnedActor->spr.__int_angle, 4);
|
||||
nx = bcos(spawnedActor->int_ang(), 4);
|
||||
ny = bsin(spawnedActor->int_ang(), 4);
|
||||
|
||||
auto sect = spawnedActor->sector();
|
||||
|
||||
|
@ -18360,7 +18360,7 @@ void QueueLoWangs(DSWActor* actor)
|
|||
{
|
||||
LoWangsQueue[LoWangsQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_GENERIC_QUEUE, actor->spr.picnum, s_DeadLoWang, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->spr.__int_angle, 0);
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue