mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- changed a few vel setter calls.
This commit is contained in:
parent
e00eda6cb8
commit
5c6cac49c8
4 changed files with 8 additions and 10 deletions
|
@ -304,8 +304,7 @@ void aiMoveForward(DBloodActor* actor)
|
||||||
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
actor->spr.angle += clamp(nAng, -nTurnRange, nTurnRange);
|
||||||
if (abs(nAng) > DAngle60)
|
if (abs(nAng) > DAngle60)
|
||||||
return;
|
return;
|
||||||
actor->add_int_bvel_x(MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30));
|
actor->vel.XY() += actor->spr.angle.ToVector() * pDudeInfo->FrontSpeed();
|
||||||
actor->add_int_bvel_y(MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -402,8 +402,7 @@ static void beastMoveForward(DBloodActor* actor)
|
||||||
int nDist = approxDist(dvec);
|
int nDist = approxDist(dvec);
|
||||||
if (nDist <= 0x400 && Random(64) < 32)
|
if (nDist <= 0x400 && Random(64) < 32)
|
||||||
return;
|
return;
|
||||||
actor->add_int_bvel_x(MulScale(pDudeInfo->frontSpeed, Cos(actor->int_ang()), 30));
|
actor->vel.XY() += actor->spr.angle.ToVector() * pDudeInfo->FrontSpeed();
|
||||||
actor->add_int_bvel_y(MulScale(pDudeInfo->frontSpeed, Sin(actor->int_ang()), 30));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sub_628A0(DBloodActor* actor)
|
static void sub_628A0(DBloodActor* actor)
|
||||||
|
|
|
@ -64,15 +64,15 @@ struct DUDEINFO {
|
||||||
return seeDist * maptoworld;
|
return seeDist * maptoworld;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline double EyeHeight() const
|
|
||||||
{
|
|
||||||
return eyeHeight * maptoworld;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline DAngle Periphery() const
|
inline DAngle Periphery() const
|
||||||
{
|
{
|
||||||
return mapangle(periphery);
|
return mapangle(periphery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline double FrontSpeed() const
|
||||||
|
{
|
||||||
|
return FixedToFloat(frontSpeed);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
extern DUDEINFO dudeInfo[kDudeMax - kDudeBase];
|
extern DUDEINFO dudeInfo[kDudeMax - kDudeBase];
|
||||||
|
|
|
@ -265,7 +265,7 @@ void CFX::fxProcess(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
actor->add_int_bvel_z(pFXData->gravity);
|
actor->vel.Z += FixedToFloat(pFXData->gravity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue