I swear I fixed this last time. But I guess not as the crash bug with get_msg_origin seems to have cropped up again. Thank you Bailopan and JGHG for helping me figure this one out. But, do I certainly feel stupid for supposedly fixing it the last time... (Watch it happen another time though :-P)
messages.cpp
Code:
static cell AMX_NATIVE_CALL get_msg_origin(AMX *amx, cell *params)
{
if (!inhook) {
MF_RaiseAmxError(amx, AMX_ERR_NATIVE);
return 0;
}
cell *cAddr = MF_GetAmxAddr(amx, params[1]);
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);
} else {
cAddr[0] = 0;
cAddr[1] = 0;
cAddr[2] = 0;
}
return 1;
}