fixed this
This commit is contained in:
parent
84ec8ef007
commit
2e86f51cfe
|
@ -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;
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user