fixed some bad copy/pasted dudeSlope calculations.

This commit is contained in:
Christoph Oelckers 2024-02-04 12:21:57 +01:00
parent 57f4dc7338
commit 0ad7e198d8
3 changed files with 3 additions and 3 deletions

View file

@ -239,7 +239,7 @@ static void beastThinkChase(DBloodActor* actor)
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
{
aiSetTarget(actor, actor->GetTarget());
actor->dudeSlope = nDist == 0 ? 0 : int(target->spr.pos.Z - actor->spr.pos.Z / nDist);
actor->dudeSlope = nDist == 0 ? 0 : (target->spr.pos.Z - actor->spr.pos.Z) / nDist;
if (nDist < 0x140 && nDist > 0xa0 && nDeltaAngle < DAngle15 && (target->spr.flags & 2)
&& target->IsPlayerActor() && Chance(0x8000))
{

View file

@ -158,7 +158,7 @@ static void calebThinkChase(DBloodActor* actor)
if (nDist < pDudeInfo->SeeDist() && nDeltaAngle <= pDudeInfo->Periphery())
{
aiSetTarget(actor, actor->GetTarget());
actor->dudeSlope = nDist == 0 ? 0 : target->spr.pos.Z - actor->spr.pos.Z / nDist;
actor->dudeSlope = nDist == 0 ? 0 : (target->spr.pos.Z - actor->spr.pos.Z) / nDist;
if (nDist < 89.5625 && abs(nDeltaAngle) < DAngle1 * 5)
{
int hit = HitScan(actor, actor->spr.pos.Z, DVector3(dvec, 0), CLIPMASK1, 0);

View file

@ -527,7 +527,7 @@ static void unicultThinkChase(DBloodActor* actor)
if ((PlayClock & 64) == 0 && Chance(0x3000) && !spriteIsUnderwater(actor, false))
playGenDudeSound(actor, kGenDudeSndChasing);
actor->dudeSlope = dist == 0 ? 0 : target->spr.pos.Z - actor->spr.pos.Z / dist;
actor->dudeSlope = dist == 0 ? 0 : (target->spr.pos.Z - actor->spr.pos.Z) / dist;
int curWeapon = actor->genDudeExtra.curWeapon;
int weaponType = actor->genDudeExtra.weaponType;