mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-21 00:20:59 +00:00
- getangle calls
This commit is contained in:
parent
d5bcc64206
commit
9d5acf8350
7 changed files with 8 additions and 8 deletions
|
@ -180,7 +180,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 nAng = getangle(pTarget->spr.pos - ap->spr.pos);
|
||||
int nAngDiff = AngleDiff(ap->int_ang(), nAng);
|
||||
|
||||
if (nAngDiff < 64)
|
||||
|
|
|
@ -310,7 +310,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);
|
||||
int nAng = getangle(pTarget->spr.pos - pActor->spr.pos);
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
|
|
|
@ -309,7 +309,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
int nAng = getangle(pTarget->int_pos().X - pActor->int_pos().X, pTarget->int_pos().Y - pActor->int_pos().Y);
|
||||
int nAng = getangle(pTarget->spr.pos - pActor->spr.pos);
|
||||
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
|
@ -442,7 +442,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);
|
||||
int nAng = getangle(pTarget->spr.pos - pActor->spr.pos);
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 3;
|
||||
|
|
|
@ -270,7 +270,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);
|
||||
int nAngle = getangle(pTarget->spr.pos - pActor->spr.pos);
|
||||
if (AngleDiff(pActor->int_ang(), nAngle) < 64)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
|
|
|
@ -245,7 +245,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);
|
||||
int nAngle = getangle(pTarget->spr.pos - pActor->spr.pos);
|
||||
if (AngleDiff(pActor->int_ang(), nAngle) < 64)
|
||||
{
|
||||
pActor->nAction = 2;
|
||||
|
|
|
@ -427,7 +427,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);
|
||||
int nAng = getangle(pTarget->spr.pos - pActor->spr.pos);
|
||||
if (AngleDiff(pActor->int_ang(), nAng) < 64)
|
||||
{
|
||||
pActor->nAction = 4;
|
||||
|
|
|
@ -308,7 +308,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);
|
||||
int nAng = getangle(pTarget->spr.pos - spp->spr.pos);
|
||||
if (AngleDiff(spp->int_ang(), nAng) < 64)
|
||||
{
|
||||
spp->nAction = 2;
|
||||
|
|
Loading…
Reference in a new issue