mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- 8x set_int_ang
This commit is contained in:
parent
775ac0564c
commit
7804e23ad0
5 changed files with 9 additions and 9 deletions
|
@ -488,7 +488,7 @@ static tspritetype* viewAddEffect(tspriteArray& tsprites, int nTSprite, VIEW_EFF
|
|||
pNSprite->pos.XY() += gView->actor->spr.angle.ToVector() * 8;
|
||||
}
|
||||
if ((pPlayer->curWeapon == kWeapLifeLeech) || (pPlayer->curWeapon == kWeapVoodooDoll)) // make lifeleech/voodoo doll always face viewer like sprite
|
||||
pNSprite->set_int_ang((pNSprite->int_ang() + 512) & 2047); // offset angle 90 degrees
|
||||
pNSprite->angle += DAngle90;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ void fxSpawnBlood(DBloodActor* actor, int)
|
|||
auto bloodactor = gFX.fxSpawnActor(FX_27, actor->sector(), actor->spr.pos, 0);
|
||||
if (bloodactor)
|
||||
{
|
||||
bloodactor->set_int_ang(1024);
|
||||
bloodactor->spr.angle = DAngle180;
|
||||
bloodactor->vel.X = Random2F(0x6aaaa);
|
||||
bloodactor->vel.Y = Random2F(0x6aaaa);
|
||||
bloodactor->vel.Z = -Random2F(0x10aaaa) - FixedToFloat(100);
|
||||
|
@ -312,7 +312,7 @@ void fxSpawnPodStuff(DBloodActor* actor, int)
|
|||
spawnactor = gFX.fxSpawnActor(FX_54, actor->sector(), actor->spr.pos, 0);
|
||||
if (spawnactor)
|
||||
{
|
||||
spawnactor->set_int_ang(1024);
|
||||
spawnactor->spr.angle = DAngle180;
|
||||
spawnactor->vel.X = Random2F(0x6aaaa);
|
||||
spawnactor->vel.Y = Random2F(0x6aaaa);
|
||||
spawnactor->vel.Z = -Random2F(0x10aaaa) - FixedToFloat(100);
|
||||
|
@ -336,7 +336,7 @@ void fxSpawnEjectingBrass(DBloodActor* actor, int z, int a3, int a4)
|
|||
if (pBrass)
|
||||
{
|
||||
if (!VanillaMode())
|
||||
pBrass->set_int_ang(Random(2047));
|
||||
pBrass->spr.angle = RandomAngle();
|
||||
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
|
||||
int nAngle = actor->int_ang() + Random2(56) + 512;
|
||||
pBrass->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30));
|
||||
|
@ -361,7 +361,7 @@ void fxSpawnEjectingShell(DBloodActor* actor, int z, int a3, int a4)
|
|||
if (pShell)
|
||||
{
|
||||
if (!VanillaMode())
|
||||
pShell->set_int_ang(Random(2047));
|
||||
pShell->spr.angle = RandomAngle();
|
||||
int nDist = (a4 << 18) / 120 + Random2(((a4 / 4) << 18) / 120);
|
||||
int nAngle = actor->int_ang() + Random2(56) + 512;
|
||||
pShell->set_int_bvel_x(MulScale(nDist, Cos(nAngle), 30));
|
||||
|
|
|
@ -3455,7 +3455,7 @@ void useSectorWindGen(DBloodActor* sourceactor, sectortype* pSector)
|
|||
if ((sourceactor->xspr.data1 & 0x0002))
|
||||
{
|
||||
while (sourceactor->int_ang() == ang)
|
||||
sourceactor->set_int_ang(nnExtRandom(-kAng360, kAng360) & 2047);
|
||||
sourceactor->spr.angle = RandomAngle();
|
||||
}
|
||||
}
|
||||
else if (sourceactor->spr.cstat & CSTAT_SPRITE_MOVE_FORWARD) sourceactor->spr.angle += mapangle(sourceactor->xspr.data4);
|
||||
|
|
|
@ -1503,7 +1503,7 @@ int ActionScan(PLAYER* pPlayer, HitInfo* out)
|
|||
|
||||
void UpdatePlayerSpriteAngle(PLAYER* pPlayer)
|
||||
{
|
||||
pPlayer->actor->set_int_ang(pPlayer->angle.ang.Buildang());
|
||||
pPlayer->actor->spr.angle = pPlayer->angle.ang;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -1719,7 +1719,7 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
auto spawned = actSpawnDude(pactor, kDudeHand, pPlayer->actor->native_clipdist() << 1, 0);
|
||||
if (spawned)
|
||||
{
|
||||
spawned->set_int_ang((pPlayer->actor->int_ang() + 1024) & 2047);
|
||||
spawned->spr.angle += DAngle180;
|
||||
int x = bcos(pPlayer->actor->int_ang());
|
||||
int y = bsin(pPlayer->actor->int_ang());
|
||||
spawned->set_int_bvel_x(pPlayer->actor->int_vel().X + MulScale(0x155555, x, 14));
|
||||
|
|
|
@ -1970,7 +1970,7 @@ void FireLifeLeech(int nTrigger, PLAYER* pPlayer)
|
|||
if (missileActor)
|
||||
{
|
||||
missileActor->SetTarget(pPlayer->aimTarget);
|
||||
missileActor->set_int_ang((nTrigger == 2) ? 1024 : 0);
|
||||
missileActor->spr.angle = ((nTrigger == 2) ? DAngle180 : nullAngle);
|
||||
}
|
||||
if (checkAmmo2(pPlayer, 8, 1))
|
||||
UseAmmo(pPlayer, 8, 1);
|
||||
|
|
Loading…
Reference in a new issue