mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 12:30:40 +00:00
- floatify VelFromAngle
This commit is contained in:
parent
b462c3d998
commit
486ef8bfc5
2 changed files with 6 additions and 13 deletions
|
@ -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)
|
void DExhumedActor::Serialize(FSerializer& arc)
|
||||||
{
|
{
|
||||||
Super::Serialize(arc);
|
Super::Serialize(arc);
|
||||||
|
|
|
@ -43,7 +43,12 @@ public:
|
||||||
DExhumedActor() = default;
|
DExhumedActor() = default;
|
||||||
|
|
||||||
void Serialize(FSerializer& arc) override;
|
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
|
// subclassed to add a game specific actor() method
|
||||||
|
|
Loading…
Reference in a new issue