mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
- set_int_yvel
This commit is contained in:
parent
b0e67ab88d
commit
490d4d3555
17 changed files with 56 additions and 56 deletions
|
@ -158,7 +158,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
ap->pTarget = pTarget;
|
||||
|
||||
ap->set_int_xvel(bcos(ap->int_ang(), -2));
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
ap->set_int_yvel(bsin(ap->int_ang(), -2));
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
@ -171,7 +171,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
|
||||
int nAngle = ap->int_ang() & 0xFFF8;
|
||||
ap->set_int_xvel(bcos(nAngle, -2));
|
||||
ap->spr.yvel = bsin(nAngle, -2);
|
||||
ap->set_int_yvel(bsin(nAngle, -2));
|
||||
}
|
||||
|
||||
switch (move.type)
|
||||
|
@ -195,7 +195,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
{
|
||||
ap->set_int_ang((ap->int_ang() + 256) & kAngleMask);
|
||||
ap->set_int_xvel(bcos(ap->int_ang(), -2));
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
ap->set_int_yvel(bsin(ap->int_ang(), -2));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
ap->nAction = 1;
|
||||
|
||||
ap->set_int_xvel(bcos(ap->int_ang(), -2));
|
||||
ap->spr.yvel = bsin(ap->int_ang(), -2);
|
||||
ap->set_int_yvel(bsin(ap->int_ang(), -2));
|
||||
ap->nFrame = 0;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -230,7 +230,7 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo
|
|||
int nAngle = (pActor->int_ang() + 256) - RandomSize(9);
|
||||
|
||||
pHitActor->set_int_xvel(bcos(nAngle, 1));
|
||||
pHitActor->spr.yvel = bsin(nAngle, 1);
|
||||
pHitActor->set_int_yvel(bsin(nAngle, 1));
|
||||
pHitActor->set_int_zvel((-(RandomSize(3) + 1)) << 8);
|
||||
}
|
||||
else
|
||||
|
@ -239,12 +239,12 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo
|
|||
int yVel = pHitActor->spr.yvel;
|
||||
|
||||
pHitActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pHitActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pHitActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
|
||||
MoveCreature(pHitActor);
|
||||
|
||||
pHitActor->set_int_xvel(xVel);
|
||||
pHitActor->spr.yvel = yVel;
|
||||
pHitActor->set_int_yvel(yVel);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -52,7 +52,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
|
|||
pChunkActor->spr.shade = -12;
|
||||
pChunkActor->spr.pal = 0;
|
||||
pChunkActor->set_int_xvel((RandomSize(5) - 16) << 8);
|
||||
pChunkActor->spr.yvel = (RandomSize(5) - 16) << 8;
|
||||
pChunkActor->set_int_yvel((RandomSize(5) - 16) << 8);
|
||||
pChunkActor->spr.xrepeat = 64;
|
||||
pChunkActor->spr.yrepeat = 64;
|
||||
pChunkActor->spr.xoffset = 0;
|
||||
|
@ -188,7 +188,7 @@ void IdleFish(DExhumedActor* pActor, int edx)
|
|||
pActor->norm_ang();
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -8));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -8);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -8));
|
||||
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -374,7 +374,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
if (z <= nHeight)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -5) - bcos(pActor->int_ang(), -7));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -5) - bsin(pActor->int_ang(), -7);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -5) - bsin(pActor->int_ang(), -7));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ DExhumedActor* BuildLavaLimb(DExhumedActor* pActor, int move, int ebx)
|
|||
pLimbActor->spr.shade = -127;
|
||||
pLimbActor->spr.pal = 1;
|
||||
pLimbActor->set_int_xvel((RandomSize(5) - 16) << 8);
|
||||
pLimbActor->spr.yvel = (RandomSize(5) - 16) << 8;
|
||||
pLimbActor->set_int_yvel((RandomSize(5) - 16) << 8);
|
||||
pLimbActor->set_int_zvel(2560 - (RandomSize(5) << 8));
|
||||
pLimbActor->spr.xoffset = 0;
|
||||
pLimbActor->spr.yoffset = 0;
|
||||
|
@ -265,7 +265,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
PlotCourseToSprite(pActor, pTarget);
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
|
||||
if (pTarget && !RandomSize(1))
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
break;
|
||||
}
|
||||
else if (coll.type == kHitSprite)
|
||||
|
|
|
@ -237,7 +237,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
pActor->pTarget = pTarget;
|
||||
return;
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->set_int_ang(RandomWord() & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -279,12 +279,12 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (pActor->spr.cstat & CSTAT_SPRITE_INVISIBLE)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(nAng, 1));
|
||||
pActor->spr.yvel = bsin(nAng, 1);
|
||||
pActor->set_int_yvel(bsin(nAng, 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
pActor->set_int_xvel(bcos(nAng, -1));
|
||||
pActor->spr.yvel = bsin(nAng, -1);
|
||||
pActor->set_int_yvel(bsin(nAng, -1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
// loc_378FA:
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
break;
|
||||
}
|
||||
else if (nMov.type == kHitSprite)
|
||||
|
@ -324,7 +324,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
// loc_378FA:
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->nAction = 6;
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()) - bcos(pActor->int_ang(), -3));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang()) - bsin(pActor->int_ang(), -3);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()) - bsin(pActor->int_ang(), -3));
|
||||
D3PlayFX(StaticSound[kSound24], pActor);
|
||||
}
|
||||
|
||||
|
@ -449,7 +449,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
// loc_378FA:
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->nAction = 6;
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()) - bcos(pActor->int_ang(), -3));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang()) - bsin(pActor->int_ang(), -3);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()) - bsin(pActor->int_ang(), -3));
|
||||
D3PlayFX(StaticSound[kSound24], pActor);
|
||||
}
|
||||
|
||||
|
|
|
@ -639,7 +639,7 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
|||
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
Collision c;
|
||||
c.setNone();
|
||||
return c;
|
||||
|
@ -1315,7 +1315,7 @@ DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial)
|
|||
pActor->spr.pal = 0;
|
||||
|
||||
pActor->set_int_xvel((RandomSize(5) - 16) << 7);
|
||||
pActor->spr.yvel = (RandomSize(5) - 16) << 7;
|
||||
pActor->set_int_yvel((RandomSize(5) - 16) << 7);
|
||||
pActor->set_int_zvel((-(RandomSize(8) + 512)) << 3);
|
||||
|
||||
if (bSpecial)
|
||||
|
@ -1402,7 +1402,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
|
|||
+ (pActor->int_xvel() >> 10) * (pActor->int_xvel() >> 10)) >> 8);
|
||||
|
||||
pActor->set_int_xvel(bcos(nAngle) * (nSqrt >> 1));
|
||||
pActor->spr.yvel = bsin(nAngle) * (nSqrt >> 1);
|
||||
pActor->set_int_yvel(bsin(nAngle) * (nSqrt >> 1));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->nCount = 90;
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
if (!pActor->nFrame)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
}
|
||||
|
||||
if (pActor->float_xvel() != 0 || pActor->spr.yvel)
|
||||
|
@ -261,7 +261,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->set_int_ang((pActor->int_ang() + ((RandomWord() & 0x3FF) + 1024)) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1385,12 +1385,12 @@ DExhumedActor* BuildSpark(DExhumedActor* pActor, int nVal)
|
|||
if (nVal)
|
||||
{
|
||||
pSpark->set_int_xvel(bcos(nAngle, -5));
|
||||
pSpark->spr.yvel = bsin(nAngle, -5);
|
||||
pSpark->set_int_yvel(bsin(nAngle, -5));
|
||||
}
|
||||
else
|
||||
{
|
||||
pSpark->set_int_xvel(bcos(nAngle, -6));
|
||||
pSpark->spr.yvel = bsin(nAngle, -6);
|
||||
pSpark->set_int_yvel(bsin(nAngle, -6));
|
||||
}
|
||||
|
||||
pSpark->set_int_zvel(-(RandomSize(4) << 7));
|
||||
|
|
|
@ -748,7 +748,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
PlayerList[nPlayer].oeyelevel = PlayerList[nPlayer].eyelevel;
|
||||
|
||||
pPlayerActor->set_int_xvel(sPlayerInput[nPlayer].xVel >> 14);
|
||||
pPlayerActor->spr.yvel = sPlayerInput[nPlayer].yVel >> 14;
|
||||
pPlayerActor->set_int_yvel(sPlayerInput[nPlayer].yVel >> 14);
|
||||
|
||||
if (sPlayerInput[nPlayer].nItem > -1)
|
||||
{
|
||||
|
|
|
@ -281,7 +281,7 @@ void SetHeadVel(DExhumedActor* pActor)
|
|||
int nAngle = pActor->int_ang();
|
||||
|
||||
pActor->set_int_xvel(bcos(nAngle, nVelShift));
|
||||
pActor->spr.yvel = bsin(nAngle, nVelShift);
|
||||
pActor->set_int_yvel(bsin(nAngle, nVelShift));
|
||||
}
|
||||
|
||||
Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val1, int val2)
|
||||
|
@ -445,7 +445,7 @@ void BuildQueenEgg(int nQueen, int nVal)
|
|||
pActor2->spr.xrepeat = 30;
|
||||
pActor2->spr.yrepeat = 30;
|
||||
pActor2->set_int_xvel(bcos(pActor2->int_ang()));
|
||||
pActor2->spr.yvel = bsin(pActor2->int_ang());
|
||||
pActor2->set_int_yvel(bsin(pActor2->int_ang()));
|
||||
pActor2->set_int_zvel(-6000);
|
||||
pActor2->spr.cstat = 0;
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->set_int_xvel(bcos(nAngle, -1));
|
||||
pActor->spr.yvel = bsin(nAngle, -1);
|
||||
pActor->set_int_yvel(bsin(nAngle, -1));
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -605,7 +605,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
|
|||
pActor->set_int_ang((RandomSize(9) + 768));
|
||||
pActor->norm_ang();
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -3));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -3);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -3));
|
||||
pActor->set_int_zvel(-RandomSize(5));
|
||||
break;
|
||||
}
|
||||
|
@ -1129,7 +1129,7 @@ void BuildQueen(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
void SetQueenSpeed(DExhumedActor* pActor, int nSpeed)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -(2 - nSpeed)));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -(2 - nSpeed));
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -(2 - nSpeed)));
|
||||
}
|
||||
|
||||
void AIQueen::Tick(RunListEvent* ev)
|
||||
|
|
|
@ -70,7 +70,7 @@ void InitRats()
|
|||
void SetRatVel(DExhumedActor* pActor)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
}
|
||||
|
||||
void BuildRat(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, int nAngle)
|
||||
|
|
|
@ -222,7 +222,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
|
||||
D3PlayFX(StaticSound[kSound48], pActor);
|
||||
|
||||
|
@ -256,7 +256,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
{
|
||||
int nAngle = pActor->int_ang() & 0xFFF8;
|
||||
pActor->set_int_xvel(bcos(nAngle, -2));
|
||||
pActor->spr.yvel = bsin(nAngle, -2);
|
||||
pActor->set_int_yvel(bsin(nAngle, -2));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -288,7 +288,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
nAction = 1;
|
||||
|
@ -307,7 +307,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
PlotCourseToSprite(pActor, pTarget);
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
|
||||
auto nMov = MoveCreatureWithCaution(pActor);
|
||||
|
||||
|
@ -320,7 +320,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -2));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -2);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -2));
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
nAction = 1;
|
||||
|
|
|
@ -92,7 +92,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, const DVector3& pos, sectortyp
|
|||
void GoRoach(DExhumedActor* pActor)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1) - bcos(pActor->int_ang(), -3));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1) - bsin(pActor->int_ang(), -3);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1) - bsin(pActor->int_ang(), -3));
|
||||
}
|
||||
|
||||
void AIRoach::Draw(RunListEvent* ev)
|
||||
|
|
|
@ -218,7 +218,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->nFrame = 0;
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
|
||||
pActor->nAction = 1;
|
||||
pActor->pTarget = pTarget;
|
||||
|
@ -303,7 +303,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 1;
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
|
||||
pActor->nFrame = 0;
|
||||
return;
|
||||
|
@ -372,7 +372,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
int nVel = RandomSize(5) + 1;
|
||||
|
||||
pSpiderActor->set_int_xvel(bcos(pSpiderActor->int_ang(), -8) * nVel);
|
||||
pSpiderActor->spr.yvel = bsin(pSpiderActor->int_ang(), -8) * nVel;
|
||||
pSpiderActor->set_int_yvel(bsin(pSpiderActor->int_ang(), -8) * nVel);
|
||||
pSpiderActor->set_int_zvel((-(RandomSize(5) + 3)) << 8);
|
||||
}
|
||||
|
||||
|
@ -411,7 +411,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
|
|||
pActor->norm_ang();
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
}
|
||||
if (mode <= 1)
|
||||
{
|
||||
|
|
|
@ -296,7 +296,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->pTarget = pTarget;
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
// loc_338E2
|
||||
int nAngle = pActor->int_ang() & 0xFFF8;
|
||||
pActor->set_int_xvel(bcos(nAngle, -1));
|
||||
pActor->spr.yvel = bsin(nAngle, -1);
|
||||
pActor->set_int_yvel(bsin(nAngle, -1));
|
||||
|
||||
if (pActor->nIndex2)
|
||||
{
|
||||
|
@ -420,7 +420,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang(), -1));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang(), -1);
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang(), -1));
|
||||
break;
|
||||
}
|
||||
else if (nMov.type == kHitSprite)
|
||||
|
@ -523,7 +523,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
spp->pTarget = pTarget;
|
||||
|
||||
spp->set_int_xvel(bcos(spp->int_ang()));
|
||||
spp->spr.yvel = bsin(spp->int_ang());
|
||||
spp->set_int_yvel(bsin(spp->int_ang()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
if (RandomSize(3))
|
||||
{
|
||||
spp->set_int_xvel(bcos(spp->int_ang()));
|
||||
spp->spr.yvel = bsin(spp->int_ang());
|
||||
spp->set_int_yvel(bsin(spp->int_ang()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
{
|
||||
spp->set_int_ang((spp->int_ang() + 256) & 0x7EF);
|
||||
spp->set_int_xvel(bcos(spp->int_ang()));
|
||||
spp->spr.yvel = bsin(spp->int_ang());
|
||||
spp->set_int_yvel(bsin(spp->int_ang()));
|
||||
return;
|
||||
}
|
||||
case kHitSprite:
|
||||
|
|
|
@ -37,7 +37,7 @@ static actionSeq WaspSeq[] = {
|
|||
void SetWaspVel(DExhumedActor* pActor)
|
||||
{
|
||||
pActor->set_int_xvel(bcos(pActor->int_ang()));
|
||||
pActor->spr.yvel = bsin(pActor->int_ang());
|
||||
pActor->set_int_yvel(bsin(pActor->int_ang()));
|
||||
}
|
||||
|
||||
DExhumedActor* BuildWasp(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, int nAngle, bool bEggWasp)
|
||||
|
|
Loading…
Reference in a new issue