mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- set_int_ang in Exhumed
This commit is contained in:
parent
150ab95a3a
commit
d55a84d7eb
21 changed files with 69 additions and 69 deletions
|
@ -83,7 +83,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, int x, int y,
|
|||
pActor->spr.xrepeat = nRepeat;
|
||||
pActor->spr.yrepeat = nRepeat;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.__int_angle = 0;
|
||||
pActor->set_int_ang(0);
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
|
|
|
@ -67,7 +67,7 @@ void BuildAnubis(DExhumedActor* ap, int x, int y, int z, sectortype* pSector, in
|
|||
ap->spr.picnum = 1;
|
||||
ap->spr.pal = ap->sector()->ceilingpal;
|
||||
ap->spr.clipdist = 60;
|
||||
ap->spr.__int_angle = nAngle;
|
||||
ap->set_int_ang(nAngle);
|
||||
ap->spr.xrepeat = 40;
|
||||
ap->spr.yrepeat = 40;
|
||||
ap->spr.xvel = 0;
|
||||
|
@ -197,7 +197,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
}
|
||||
case kHitWall:
|
||||
{
|
||||
ap->spr.__int_angle = (ap->int_ang() + 256) & kAngleMask;
|
||||
ap->set_int_ang((ap->int_ang() + 256) & kAngleMask);
|
||||
ap->spr.xvel = bcos(ap->int_ang(), -2);
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
break;
|
||||
|
@ -220,7 +220,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
{
|
||||
ap->spr.xvel = 0;
|
||||
ap->spr.yvel = 0;
|
||||
ap->spr.__int_angle = GetMyAngle(pTarget->int_pos().X - ap->int_pos().X, pTarget->int_pos().Y - ap->int_pos().Y);
|
||||
ap->set_int_ang(GetMyAngle(pTarget->int_pos().X - ap->int_pos().X, pTarget->int_pos().Y - ap->int_pos().Y));
|
||||
|
||||
ap->nAction = 3;
|
||||
ap->nFrame = 0;
|
||||
|
|
|
@ -52,7 +52,7 @@ DExhumedActor* BuildBubble(vec3_t pos, sectortype* pSector)
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.__int_angle = inita;
|
||||
pActor->set_int_ang(inita);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = -1200;
|
||||
|
|
|
@ -563,7 +563,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
sBullet.nDoubleDamage = nDoubleDamage;
|
||||
|
||||
sBullet.pActor = insertActor(pActor->sector(), 200);
|
||||
sBullet.pActor->spr.__int_angle = nAngle;
|
||||
sBullet.pActor->set_int_ang(nAngle);
|
||||
|
||||
int nHeight = GetActorHeight(pTarget);
|
||||
|
||||
|
@ -631,7 +631,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
pBulletActor->spr.yrepeat = (uint8_t)nRepeat;
|
||||
pBulletActor->spr.xoffset = 0;
|
||||
pBulletActor->spr.yoffset = 0;
|
||||
pBulletActor->spr.__int_angle = nAngle;
|
||||
pBulletActor->set_int_ang(nAngle);
|
||||
pBulletActor->spr.xvel = 0;
|
||||
pBulletActor->spr.yvel = 0;
|
||||
pBulletActor->spr.zvel = 0;
|
||||
|
@ -744,7 +744,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
y -= pBulletActor->int_pos().Y;
|
||||
|
||||
nAngle = GetMyAngle(x, y);
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -166,7 +166,7 @@ void BuildFish(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.extra = -1;
|
||||
|
@ -460,7 +460,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
if (pHitAct->spr.statnum == 100)
|
||||
{
|
||||
pActor->pTarget = coll.actor();
|
||||
pActor->spr.__int_angle = GetMyAngle(pHitAct->int_pos().X - pActor->int_pos().X, pHitAct->int_pos().Y - pActor->int_pos().Y);
|
||||
pActor->set_int_ang(GetMyAngle(pHitAct->int_pos().X - pActor->int_pos().X, pHitAct->int_pos().Y - pActor->int_pos().Y));
|
||||
|
||||
if (nAction != 3)
|
||||
{
|
||||
|
|
|
@ -66,7 +66,7 @@ void ThrowGrenade(int nPlayer, int, int, int ecx, int push1)
|
|||
}
|
||||
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
|
||||
if (push1 >= -3000)
|
||||
{
|
||||
|
@ -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->int_ang();
|
||||
pActor->set_int_ang(pPlayerActor->int_ang());
|
||||
pActor->spr.intowner = nPlayer;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
|
|
|
@ -126,7 +126,7 @@ void BuildLava(DExhumedActor* pActor, int x, int y, int, sectortype* pSector, in
|
|||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
||||
|
@ -290,7 +290,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
ChangeActorSect(pActor, pSector);
|
||||
pActor->set_int_pos({ x, y, z });
|
||||
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang());
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
break;
|
||||
|
@ -302,7 +302,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
|
||||
if (coll.type == kHitWall)
|
||||
{
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang());
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
break;
|
||||
|
|
|
@ -66,7 +66,7 @@ void BuildLion(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -170,7 +170,7 @@ void AILion::Damage(RunListEvent* ev)
|
|||
PlotCourseToSprite(pActor, pTarget);
|
||||
pActor->nAction = 5;
|
||||
pActor->nCount = RandomSize(3);
|
||||
pActor->spr.__int_angle = (pActor->int_ang() - (RandomSize(1) << 8)) + (RandomSize(1) << 8); // NOTE: no angle mask in original code
|
||||
pActor->set_int_ang((pActor->int_ang() - (RandomSize(1) << 8)) + (RandomSize(1) << 8)); // NOTE: no angle mask in original code
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -253,7 +253,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (RandomBit())
|
||||
{
|
||||
pActor->spr.__int_angle = RandomWord() & kAngleMask;
|
||||
pActor->set_int_ang(RandomWord() & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (nMov.type == kHitWall)
|
||||
{
|
||||
// loc_378FA:
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
|
@ -325,7 +325,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
// loc_378FA:
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
|
@ -413,7 +413,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
nScanAngle &= kAngleMask;
|
||||
}
|
||||
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
|
||||
pActor->nAction = 6;
|
||||
pActor->spr.xvel = bcos(pActor->int_ang()) - bcos(pActor->int_ang(), -3);
|
||||
|
@ -436,7 +436,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (nMov.type == kHitWall)
|
||||
{
|
||||
pActor->nAction = 7;
|
||||
pActor->spr.__int_angle = (GetWallNormal(nMov.hitWall) + 1024) & kAngleMask;
|
||||
pActor->set_int_ang((GetWallNormal(nMov.hitWall) + 1024) & kAngleMask);
|
||||
pActor->nCount = RandomSize(4);
|
||||
return;
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
// loc_378FA:
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
|
@ -477,7 +477,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.__int_angle = (RandomSize(9) + (pActor->int_ang() + 768)) & kAngleMask;
|
||||
pActor->set_int_ang((RandomSize(9) + (pActor->int_ang() + 768)) & kAngleMask);
|
||||
}
|
||||
|
||||
pActor->spr.zvel = -1000;
|
||||
|
|
|
@ -644,7 +644,7 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
|||
|
||||
ChangeActorSect(pActor, pSectorPre);
|
||||
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
Collision c;
|
||||
|
@ -672,7 +672,7 @@ int PlotCourseToSprite(DExhumedActor* pActor1, DExhumedActor* pActor2)
|
|||
int x = pActor2->int_pos().X - pActor1->int_pos().X;
|
||||
int y = pActor2->int_pos().Y - pActor1->int_pos().Y;
|
||||
|
||||
pActor1->spr.__int_angle = GetMyAngle(x, y);
|
||||
pActor1->set_int_ang(GetMyAngle(x, y));
|
||||
|
||||
uint32_t x2 = abs(x);
|
||||
uint32_t y2 = abs(y);
|
||||
|
@ -1202,7 +1202,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int
|
|||
pActor->spr.zvel = (pActor->spr.zvel + nAngDeltaD) & kAngleMask;
|
||||
}
|
||||
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
|
||||
int eax = abs(bcos(pActor->spr.zvel));
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ void BuildMummy(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -264,7 +264,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
{
|
||||
case kHitWall:
|
||||
{
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
return;
|
||||
|
|
|
@ -1315,7 +1315,7 @@ void AITrap::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (nType == 15)
|
||||
{
|
||||
pBullet->spr.__int_angle = (pBullet->int_ang() - 512) & kAngleMask;
|
||||
pBullet->set_int_ang((pBullet->int_ang() - 512) & kAngleMask);
|
||||
D3PlayFX(StaticSound[kSound32], pBullet);
|
||||
}
|
||||
else
|
||||
|
@ -1502,7 +1502,7 @@ void DoFinale()
|
|||
if (!(dword_96788 & 2))
|
||||
{
|
||||
int nAng = RandomSize(11);
|
||||
pFinaleSpr->spr.__int_angle = nAng;
|
||||
pFinaleSpr->set_int_ang(nAng);
|
||||
BuildSpark(pFinaleSpr, 1);
|
||||
}
|
||||
|
||||
|
@ -1675,7 +1675,7 @@ void ExplodeEnergyBlock(DExhumedActor* pActor)
|
|||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
pActor->spr.__int_angle = RandomSize(11);
|
||||
pActor->set_int_ang(RandomSize(11));
|
||||
BuildSpark(pActor, 1); // shoot out blue orbs
|
||||
}
|
||||
|
||||
|
@ -1741,7 +1741,7 @@ void AIEnergyBlock::Damage(RunListEvent* ev)
|
|||
|
||||
auto pActor2 = insertActor(lasthitsect, 0);
|
||||
|
||||
pActor2->spr.__int_angle = ev->nParam;
|
||||
pActor2->set_int_ang(ev->nParam);
|
||||
pActor2->set_int_pos({ lasthitx, lasthity, lasthitz });
|
||||
|
||||
BuildSpark(pActor2, 0); // shoot out blue orb when damaged
|
||||
|
|
|
@ -266,7 +266,7 @@ void RestartPlayer(int nPlayer)
|
|||
pActor->set_int_pos(nNStartSprite->int_pos());
|
||||
ChangeActorSect(pActor, nNStartSprite->sector());
|
||||
plr->angle.ang = buildang(nNStartSprite->spr.__int_angle&kAngleMask);
|
||||
pActor->spr.__int_angle = plr->angle.ang.asbuild();
|
||||
pActor->set_int_ang(plr->angle.ang.asbuild());
|
||||
|
||||
floorsprt = insertActor(pActor->sector(), 0);
|
||||
|
||||
|
@ -280,7 +280,7 @@ void RestartPlayer(int nPlayer)
|
|||
{
|
||||
pActor->set_int_pos({ plr->sPlayerSave.x, plr->sPlayerSave.y, plr->sPlayerSave.pSector->int_floorz() });
|
||||
plr->angle.ang = buildang(plr->sPlayerSave.nAngle&kAngleMask);
|
||||
pActor->spr.__int_angle = plr->angle.ang.asbuild();
|
||||
pActor->set_int_ang(plr->angle.ang.asbuild());
|
||||
|
||||
floorsprt = nullptr;
|
||||
}
|
||||
|
@ -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->int_ang();
|
||||
pDActor->set_int_ang(pActor->int_ang());
|
||||
pDActor->spr.cstat = pActor->spr.cstat;
|
||||
|
||||
pDActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -593,7 +593,7 @@ static void pickupMessage(int no)
|
|||
void UpdatePlayerSpriteAngle(Player* pPlayer)
|
||||
{
|
||||
inita = pPlayer->angle.ang.asbuild();
|
||||
if (pPlayer->pActor) pPlayer->pActor->spr.__int_angle = inita;
|
||||
if (pPlayer->pActor) pPlayer->pActor->set_int_ang(inita);
|
||||
}
|
||||
|
||||
void AIPlayer::Draw(RunListEvent* ev)
|
||||
|
@ -924,7 +924,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
{
|
||||
auto ang = GetAngleToSprite(pPlayerActor, pSpiritSprite) & kAngleMask;
|
||||
PlayerList[nPlayer].angle.settarget(buildang(ang), true);
|
||||
pPlayerActor->spr.__int_angle = ang;
|
||||
pPlayerActor->set_int_ang(ang);
|
||||
|
||||
PlayerList[nPlayer].horizon.settarget(buildhoriz(0), true);
|
||||
|
||||
|
@ -2576,7 +2576,7 @@ sectdone:
|
|||
|
||||
if (pPlayerActor->sector()->pAbove != nullptr)
|
||||
{
|
||||
pDopple->spr.__int_angle = pPlayerActor->int_ang();
|
||||
pDopple->set_int_ang(pPlayerActor->int_ang());
|
||||
ChangeActorSect(pDopple, pPlayerActor->sector()->pAbove);
|
||||
pDopple->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
|
|
|
@ -342,7 +342,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val
|
|||
pActor->spr.zvel = (AngleDelta(pActor->spr.zvel, var_14, 24) + pActor->spr.zvel) & kAngleMask;
|
||||
}
|
||||
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
|
||||
int da = pActor->spr.zvel;
|
||||
int x = abs(bcos(da));
|
||||
|
@ -459,7 +459,7 @@ void BuildQueenEgg(int nQueen, int nVal)
|
|||
pActor2->spr.yoffset = 0;
|
||||
pActor2->spr.shade = -12;
|
||||
pActor2->spr.picnum = 1;
|
||||
pActor2->spr.__int_angle = (RandomSize(9) + (nAngle - 256)) & kAngleMask;
|
||||
pActor2->set_int_ang((RandomSize(9) + (nAngle - 256)) & kAngleMask);
|
||||
pActor2->backuppos();
|
||||
|
||||
if (!nVal)
|
||||
|
@ -592,7 +592,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
break;
|
||||
}
|
||||
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = bcos(nAngle, -1);
|
||||
pActor->spr.yvel = bsin(nAngle, -1);
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ void BuildQueenHead(int nQueen)
|
|||
pActor2->spr.pal = 0;
|
||||
pActor2->spr.xoffset = 0;
|
||||
pActor2->spr.yoffset = 0;
|
||||
pActor2->spr.__int_angle = nAngle;
|
||||
pActor2->set_int_ang(nAngle);
|
||||
|
||||
nVelShift = 2;
|
||||
SetHeadVel(pActor2);
|
||||
|
@ -831,7 +831,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
// original BUG - var_18 isn't being set if the check above == 0x20000 ?
|
||||
pActor->spr.__int_angle = nNewAng;
|
||||
pActor->set_int_ang(nNewAng);
|
||||
nVelShift++;
|
||||
|
||||
if (nVelShift < 5)
|
||||
|
@ -946,7 +946,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
pTActor->set_int_pos({ MoveQX[nHd], MoveQY[nHd], MoveQZ[nHd] });
|
||||
pTActor->spr.__int_angle = MoveQA[nHd];
|
||||
pTActor->set_int_ang(MoveQA[nHd]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ void BuildQueen(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
|
|
@ -97,7 +97,7 @@ void BuildRat(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
pActor->spr.picnum = 1;
|
||||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.clipdist = 30;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xrepeat = 50;
|
||||
pActor->spr.yrepeat = 50;
|
||||
pActor->spr.xvel = 0;
|
||||
|
@ -332,7 +332,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
return;
|
||||
}
|
||||
|
||||
pActor->spr.__int_angle = RandomSize(11);
|
||||
pActor->set_int_ang(RandomSize(11));
|
||||
SetRatVel(pActor);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ void BuildRex(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -208,7 +208,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
{
|
||||
auto nAngle = pActor->int_ang(); // make backup of this variable
|
||||
pActor->pTarget = FindPlayer(pActor, 60);
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
}
|
||||
case kHitWall:
|
||||
{
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->nAction = 1;
|
||||
|
@ -321,7 +321,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
SetQuake(pActor, 25);
|
||||
pActor->nCount = 60;
|
||||
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -2);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->nAction = 1;
|
||||
|
|
|
@ -58,7 +58,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, int x, int y, int z, sectortyp
|
|||
pActor->spr.picnum = 1;
|
||||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.clipdist = 60;
|
||||
pActor->spr.__int_angle = angle;
|
||||
pActor->set_int_ang(angle);
|
||||
pActor->spr.xrepeat = 40;
|
||||
pActor->spr.yrepeat = 40;
|
||||
pActor->spr.xvel = 0;
|
||||
|
@ -275,19 +275,19 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.__int_angle = GetMyAngle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
pActor->set_int_ang(GetMyAngle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y));
|
||||
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
GoRoach(pActor);
|
||||
}
|
||||
}
|
||||
else if (nMov.type == kHitWall)
|
||||
{
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
GoRoach(pActor);
|
||||
}
|
||||
else
|
||||
|
@ -304,7 +304,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.__int_angle = GetMyAngle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
pActor->set_int_ang(GetMyAngle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y));
|
||||
|
||||
pActor->nFrame = 0;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ void BuildScorp(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector,
|
|||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -370,7 +370,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
auto pSpiderActor = BuildSpider(nullptr, pActor->int_pos().X, pActor->int_pos().Y, pActor->int_pos().Z, pActor->sector(), pActor->int_ang());
|
||||
if (pSpiderActor)
|
||||
{
|
||||
pSpiderActor->spr.__int_angle = RandomSize(11);
|
||||
pSpiderActor->set_int_ang(RandomSize(11));
|
||||
|
||||
int nVel = RandomSize(5) + 1;
|
||||
|
||||
|
@ -431,7 +431,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
|
|||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.__int_angle = GetMyAngle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
pActor->set_int_ang(GetMyAngle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y));
|
||||
|
||||
pActor->nIndex = RandomSize(2) + RandomSize(3);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ void BuildSet(DExhumedActor* pActor, int x, int y, int z, sectortype* pSector, i
|
|||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.hitag = 0;
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -106,7 +106,7 @@ void BuildSoul(DExhumedActor* pSet)
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqSet, 75, 0);
|
||||
pActor->spr.__int_angle = RandomSize(11);
|
||||
pActor->set_int_ang(RandomSize(11));
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = (-256) - RandomSize(10);
|
||||
|
@ -420,7 +420,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
}
|
||||
}
|
||||
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 256) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.xvel = bcos(pActor->int_ang(), -1);
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
break;
|
||||
|
|
|
@ -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->int_ang();
|
||||
pActor->set_int_ang(pPlayerActor->int_ang());
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -376,7 +376,7 @@ void AISnake::Tick(RunListEvent* ev)
|
|||
DExhumedActor* pActor2 = SnakeList[nSnake].pSprites[i];
|
||||
if (!pActor2) continue;
|
||||
|
||||
pActor2->spr.__int_angle = nAngle;
|
||||
pActor2->set_int_ang(nAngle);
|
||||
pActor2->set_int_pos({ x, y, z });
|
||||
|
||||
ChangeActorSect(pActor2, pSector);
|
||||
|
|
|
@ -64,7 +64,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, int x, int y, int z, sectortype*
|
|||
spp->spr.pal = spp->sector()->ceilingpal;
|
||||
spp->spr.xoffset = 0;
|
||||
spp->spr.yoffset = 0;
|
||||
spp->spr.__int_angle = nAngle;
|
||||
spp->set_int_ang(nAngle);
|
||||
spp->spr.picnum = 1;
|
||||
spp->spr.hitag = 0;
|
||||
spp->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -301,7 +301,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
{
|
||||
case kHitWall:
|
||||
{
|
||||
spp->spr.__int_angle = (spp->int_ang() + 256) & 0x7EF;
|
||||
spp->set_int_ang((spp->int_ang() + 256) & 0x7EF);
|
||||
spp->spr.xvel = bcos(spp->int_ang());
|
||||
spp->spr.yvel = bsin(spp->int_ang());
|
||||
return;
|
||||
|
|
|
@ -73,7 +73,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, sectortype*
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.__int_angle = nAngle;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.zvel = 0;
|
||||
|
@ -170,7 +170,7 @@ void AIWasp::Damage(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.cstat = 0;
|
||||
pActor->spr.__int_angle = (pActor->int_ang() + 1024) & kAngleMask;
|
||||
pActor->set_int_ang((pActor->int_ang() + 1024) & kAngleMask);
|
||||
|
||||
SetWaspVel(pActor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue