- floatify VelFromAngle

This commit is contained in:
Christoph Oelckers 2022-09-03 13:08:44 +02:00
parent b462c3d998
commit 486ef8bfc5
2 changed files with 6 additions and 13 deletions

View file

@ -608,18 +608,6 @@ std::pair<DVector3, DAngle> GameInterface::GetCoordinates()
}
/*
void DExhumedActor::VelFromAngle(int shift = 0)
{
vel.XY() = spr.angle.ToVector() * (1 << (14 + shift));
}
*/
void DExhumedActor::VelFromAngle(int shift)
{
set_int_xvel(bcos(int_ang(), shift));
set_int_yvel(bsin(int_ang(), shift));
}
void DExhumedActor::Serialize(FSerializer& arc)
{
Super::Serialize(arc);

View file

@ -43,7 +43,12 @@ public:
DExhumedActor() = default;
void Serialize(FSerializer& arc) override;
void VelFromAngle(int shift = 0);
void VelFromAngle(int shift = 0)
{
vel.XY() = spr.angle.ToVector() * (1 << (10 + shift));
}
};
// subclassed to add a game specific actor() method