mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-12 23:08:03 +03:00
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)
|
if (msgDest >= MSG_PVS && msgDest <= MSG_PAS_R)
|
||||||
{
|
{
|
||||||
vec3_t vRet = (Vector)msgOrigin;
|
vec3_t vRet = (Vector)msgOrigin;
|
||||||
cAddr[0] = amx_ftoc(vRet.x);
|
cAddr[0] = FloatToCell(vRet.x);
|
||||||
cAddr[1] = amx_ftoc(vRet.y);
|
cAddr[1] = FloatToCell(vRet.y);
|
||||||
cAddr[2] = amx_ftoc(vRet.z);
|
cAddr[2] = FloatToCell(vRet.z);
|
||||||
} else {
|
} else {
|
||||||
cAddr[0] = 0;
|
cAddr[0] = 0;
|
||||||
cAddr[1] = 0;
|
cAddr[1] = 0;
|
||||||
|
@ -82,4 +82,10 @@ void EnableDebugHandler(AMX *amx, Debugger *pd);
|
|||||||
bool DirExists(const char *dir);
|
bool DirExists(const char *dir);
|
||||||
const char* GetFileName(AMX *amx);
|
const char* GetFileName(AMX *amx);
|
||||||
|
|
||||||
|
inline cell FloatToCell(float input)
|
||||||
|
{
|
||||||
|
double output = input;
|
||||||
|
return *(cell *)&output;
|
||||||
|
}
|
||||||
|
|
||||||
#endif // __MODULES_H__
|
#endif // __MODULES_H__
|
||||||
|
@ -35,12 +35,6 @@
|
|||||||
#define ANGLEVECTORS_RIGHT 2
|
#define ANGLEVECTORS_RIGHT 2
|
||||||
#define ANGLEVECTORS_UP 3
|
#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)
|
static cell AMX_NATIVE_CALL get_distance(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
cell *cpVec1 = get_amxaddr(amx, params[1]);
|
cell *cpVec1 = get_amxaddr(amx, params[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user