From 2e86f51cfe7061695a9e90baab63bf95160e5da5 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 11 Jun 2006 21:50:19 +0000 Subject: [PATCH] fixed this --- amxmodx/messages.cpp | 6 +++--- amxmodx/modules.h | 6 ++++++ amxmodx/vector.cpp | 6 ------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/amxmodx/messages.cpp b/amxmodx/messages.cpp index 022ee7d6..858afd03 100755 --- a/amxmodx/messages.cpp +++ b/amxmodx/messages.cpp @@ -639,9 +639,9 @@ static cell AMX_NATIVE_CALL get_msg_origin(AMX *amx, cell *params) if (msgDest >= MSG_PVS && msgDest <= MSG_PAS_R) { vec3_t vRet = (Vector)msgOrigin; - cAddr[0] = amx_ftoc(vRet.x); - cAddr[1] = amx_ftoc(vRet.y); - cAddr[2] = amx_ftoc(vRet.z); + cAddr[0] = FloatToCell(vRet.x); + cAddr[1] = FloatToCell(vRet.y); + cAddr[2] = FloatToCell(vRet.z); } else { cAddr[0] = 0; cAddr[1] = 0; diff --git a/amxmodx/modules.h b/amxmodx/modules.h index a9e3326a..c44c8e60 100755 --- a/amxmodx/modules.h +++ b/amxmodx/modules.h @@ -82,4 +82,10 @@ void EnableDebugHandler(AMX *amx, Debugger *pd); bool DirExists(const char *dir); const char* GetFileName(AMX *amx); +inline cell FloatToCell(float input) +{ + double output = input; + return *(cell *)&output; +} + #endif // __MODULES_H__ diff --git a/amxmodx/vector.cpp b/amxmodx/vector.cpp index b5648861..6ba465d0 100644 --- a/amxmodx/vector.cpp +++ b/amxmodx/vector.cpp @@ -35,12 +35,6 @@ #define ANGLEVECTORS_RIGHT 2 #define ANGLEVECTORS_UP 3 -inline cell FloatToCell(float input) -{ - double output = input; - return *(cell *)&output; -} - static cell AMX_NATIVE_CALL get_distance(AMX *amx, cell *params) { cell *cpVec1 = get_amxaddr(amx, params[1]);