mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- the angle in aiChooseDirection must be precisely what it was in Build.
60° may only be 1/3 Build angle unit off, but it is already too much.
This commit is contained in:
parent
a739928d29
commit
1a9e255265
1 changed files with 3 additions and 2 deletions
|
@ -254,9 +254,10 @@ void aiChooseDirection(DBloodActor* actor, DAngle direction)
|
|||
double nCos = actor->spr.angle.Cos();
|
||||
double nSin = actor->spr.angle.Sin();
|
||||
double t1 = actor->vel.X * nCos + actor->vel.Y * nSin;
|
||||
auto almost60deg = DAngle::fromBuild(341); // 60° does not work correctly - this is a little bit less, actually.
|
||||
|
||||
int range = FloatToFixed(t1 * (15 / 8192.));
|
||||
DAngle v8 = vc.Sgn() == -1 ? -DAngle60 : DAngle60;
|
||||
DAngle v8 = vc.Sgn() == -1 ? -almost60deg : almost60deg;
|
||||
|
||||
if (CanMove(actor, actor->GetTarget(), actor->spr.angle + vc, range))
|
||||
actor->xspr.goalAng = actor->spr.angle + vc;
|
||||
|
@ -273,7 +274,7 @@ void aiChooseDirection(DBloodActor* actor, DAngle direction)
|
|||
//else if (actor->spr.flags&2)
|
||||
//actor->xspr.goalAng = actor->spr.angle+341;
|
||||
else // Weird..
|
||||
actor->xspr.goalAng = actor->spr.angle + DAngle180/3;
|
||||
actor->xspr.goalAng = actor->spr.angle + almost60deg;
|
||||
if (Chance(0x8000))
|
||||
actor->xspr.dodgeDir = 1;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue