From 5b566d01a77224e445ebb683184a1c59830a10b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Mon, 19 Dec 2016 23:10:56 +0100 Subject: [PATCH] Fixed methods signatures to fix build --- Source/Game.hpp | 4 ++++ Source/GameTick.cpp | 8 ++++---- Source/Objects/Person.cpp | 4 ---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Game.hpp b/Source/Game.hpp index efa119e..f276ef0 100644 --- a/Source/Game.hpp +++ b/Source/Game.hpp @@ -156,6 +156,10 @@ void fireSound(int sound = fireendsound); void inputText(std::string& str, unsigned* charselected); void flash(float amount = 1, int delay = 1); } +float roughDirection(XYZ vec); +float roughDirectionTo(XYZ start, XYZ end); +float pitchTo(XYZ start, XYZ end); +float sq(float n); #ifndef __forceinline # ifdef __GNUC__ diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index f4b9a7c..7d66b43 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -176,7 +176,7 @@ STATIC_ASSERT (rabbittype == 0 && wolftype == 1) // utility functions // TODO: this is slightly incorrect -inline float roughDirection(XYZ vec) +float roughDirection(XYZ vec) { Normalise(&vec); float angle = -asin(-vec.x) * 180 / M_PI; @@ -184,7 +184,7 @@ inline float roughDirection(XYZ vec) angle = 180 - angle; return angle; } -inline float roughDirectionTo(XYZ start, XYZ end) +float roughDirectionTo(XYZ start, XYZ end) { return roughDirection(end - start); } @@ -193,11 +193,11 @@ inline float pitchOf(XYZ vec) Normalise(&vec); return -asin(vec.y) * 180 / M_PI; } -inline float pitchTo(XYZ start, XYZ end) +float pitchTo(XYZ start, XYZ end) { return pitchOf(end - start); } -inline float sq(float n) +float sq(float n) { return n * n; } diff --git a/Source/Objects/Person.cpp b/Source/Objects/Person.cpp index ced39db..6e286f4 100644 --- a/Source/Objects/Person.cpp +++ b/Source/Objects/Person.cpp @@ -6945,10 +6945,6 @@ bool Person::addClothes(const int& clothesId) } } -extern float sq(float n); -extern float roughDirectionTo(XYZ start, XYZ end); -extern float pitchTo(XYZ start, XYZ end); - void Person::doAI() { if (aitype != playercontrolled && !Dialog::inDialog()) { -- 2.39.2