fixed this

This commit is contained in:
David Anderson 2006-06-11 21:50:19 +00:00
parent 84ec8ef007
commit 2e86f51cfe
3 changed files with 9 additions and 9 deletions

View File

@ -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;

View File

@ -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__

View File

@ -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]);