mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- simple angle stuff.
This commit is contained in:
parent
7dab26f04d
commit
e5b2a0f0a6
8 changed files with 25 additions and 25 deletions
|
@ -289,7 +289,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
if (nMov.type == kHitWall)
|
||||
{
|
||||
// loc_378FA:
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-1);
|
||||
break;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
// loc_378FA:
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-1);
|
||||
break;
|
||||
}
|
||||
|
@ -443,7 +443,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
// loc_378FA:
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-1);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -637,7 +637,7 @@ Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
|||
|
||||
ChangeActorSect(pActor, pSectorPre);
|
||||
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-2);
|
||||
Collision c;
|
||||
c.setNone();
|
||||
|
|
|
@ -285,7 +285,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
}
|
||||
case kHitWall:
|
||||
{
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-2);
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -315,7 +315,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
SetQuake(pActor, 25);
|
||||
pActor->nCount = 60;
|
||||
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-2);
|
||||
pActor->nAction = 1;
|
||||
pActor->nFrame = 0;
|
||||
|
|
|
@ -279,13 +279,13 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
GoRoach(pActor);
|
||||
}
|
||||
}
|
||||
else if (nMov.type == kHitWall)
|
||||
{
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
GoRoach(pActor);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -417,7 +417,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
}
|
||||
}
|
||||
|
||||
pActor->set_int_ang((pActor->int_ang() + 256) & kAngleMask);
|
||||
pActor->spr.angle += DAngle45;
|
||||
pActor->VelFromAngle(-1);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ void AIWasp::Damage(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.cstat = 0;
|
||||
pActor->set_int_ang((pActor->int_ang() + 1024) & kAngleMask);
|
||||
pActor->spr.angle += DAngle180;
|
||||
|
||||
SetWaspVel(pActor);
|
||||
|
||||
|
|
|
@ -2106,7 +2106,7 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
{
|
||||
actorNew->spr.angle = actor->spr.angle;
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 512));
|
||||
actorNew->spr.angle -= DAngle90;
|
||||
HelpMissileLateral(actorNew,1000); // Was 1500
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 712));
|
||||
}
|
||||
|
@ -2114,12 +2114,12 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
{
|
||||
actorNew->spr.angle = actor->spr.angle;
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 512));
|
||||
actorNew->spr.angle += DAngle90;
|
||||
HelpMissileLateral(actorNew,1500);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 128));
|
||||
}
|
||||
actorNew->add_int_ang((RANDOM_P2(128<<5)>>5) - (128 / 2));
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
actorNew->norm_ang();
|
||||
|
||||
// Set the shell number
|
||||
actorNew->user.ShellNum = ShellCount;
|
||||
|
@ -2129,11 +2129,11 @@ int SpawnShell(DSWActor* actor, int ShellNum)
|
|||
actorNew->spr.pos.Z -= 13;
|
||||
actorNew->spr.angle = actor->spr.angle;
|
||||
HelpMissileLateral(actorNew,2500);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() + 512));
|
||||
actorNew->spr.angle += DAngle90;
|
||||
HelpMissileLateral(actorNew,1300);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->spr.int_ang() - 128 - 64));
|
||||
actorNew->add_int_ang((RANDOM_P2(128<<5)>>5) - (128 / 2));
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
actorNew->norm_ang();
|
||||
|
||||
// Set the shell number
|
||||
actorNew->user.ShellNum = ShellCount;
|
||||
|
|
|
@ -12822,7 +12822,7 @@ int InitLaser(PLAYER* pp)
|
|||
|
||||
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5));
|
||||
actorNew->spr.angle -= DAngle::fromBuild(5);
|
||||
}
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
@ -12900,7 +12900,7 @@ int InitRail(PLAYER* pp)
|
|||
actorNew->set_int_zvel(zvel >> 1);
|
||||
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 4));
|
||||
actorNew->spr.angle -= DAngle::fromBuild(4);
|
||||
}
|
||||
else
|
||||
zvel = actorNew->int_zvel(); // Let autoaiming set zvel now
|
||||
|
@ -13073,7 +13073,7 @@ int InitRocket(PLAYER* pp)
|
|||
actorNew->set_int_zvel(zvel >> 1);
|
||||
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5));
|
||||
actorNew->spr.angle -= DAngle::fromBuild(5);
|
||||
}
|
||||
else
|
||||
zvel = actorNew->int_zvel(); // Let autoaiming set zvel now
|
||||
|
@ -13173,7 +13173,7 @@ int InitBunnyRocket(PLAYER* pp)
|
|||
actorNew->set_int_zvel(zvel >> 1);
|
||||
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5));
|
||||
actorNew->spr.angle -= DAngle::fromBuild(5);
|
||||
}
|
||||
else
|
||||
zvel = actorNew->int_zvel(); // Let autoaiming set zvel now
|
||||
|
@ -13261,7 +13261,7 @@ int InitNuke(PLAYER* pp)
|
|||
actorNew->set_int_zvel(zvel >> 1);
|
||||
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5));
|
||||
actorNew->spr.angle -= DAngle::fromBuild(5);
|
||||
}
|
||||
else
|
||||
zvel = actorNew->int_zvel(); // Let autoaiming set zvel now
|
||||
|
@ -13337,7 +13337,7 @@ int InitEnemyNuke(DSWActor* actor)
|
|||
actorNew->set_int_zvel(zvel >> 1);
|
||||
if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() - 5));
|
||||
actorNew->spr.angle -= DAngle::fromBuild(5);
|
||||
}
|
||||
else
|
||||
zvel = actorNew->int_zvel(); // Let autoaiming set zvel now
|
||||
|
@ -14897,7 +14897,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
|
|||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
actorNew->add_int_ang(RandomRange(30) - 15);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
actorNew->norm_ang();
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
||||
|
@ -15063,7 +15063,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
|
|||
WeaponAutoAim(actor, actorNew, 64, false);
|
||||
// a bit of randomness
|
||||
actorNew->add_int_ang(RandomRange(30) - 15);
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
actorNew->norm_ang();
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
||||
|
@ -15106,7 +15106,7 @@ int InitTurretRail(DSWActor* actor, PLAYER* pp)
|
|||
|
||||
if (WeaponAutoAim(pp->actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
actorNew->norm_ang();
|
||||
}
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
@ -15144,7 +15144,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp)
|
|||
|
||||
if (WeaponAutoAim(actor, actorNew, 32, false) == -1)
|
||||
{
|
||||
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang()));
|
||||
actorNew->norm_ang();
|
||||
}
|
||||
|
||||
UpdateChange(actorNew);
|
||||
|
|
Loading…
Reference in a new issue