From 486ef8bfc5888b61b23c0456cf5ba13cbb15a697 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 3 Sep 2022 13:08:44 +0200 Subject: [PATCH] - floatify VelFromAngle --- source/games/exhumed/src/exhumed.cpp | 12 ------------ source/games/exhumed/src/exhumedactor.h | 7 ++++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/source/games/exhumed/src/exhumed.cpp b/source/games/exhumed/src/exhumed.cpp index a5b2b7ec6..16610e304 100644 --- a/source/games/exhumed/src/exhumed.cpp +++ b/source/games/exhumed/src/exhumed.cpp @@ -608,18 +608,6 @@ std::pair 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); diff --git a/source/games/exhumed/src/exhumedactor.h b/source/games/exhumed/src/exhumedactor.h index 2748a4e34..dee95c412 100644 --- a/source/games/exhumed/src/exhumedactor.h +++ b/source/games/exhumed/src/exhumedactor.h @@ -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