From 35fcca8a6637b5615a44c18e7e4c67da4999b1ea Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Fri, 26 Jan 2007 06:08:29 +0000 Subject: [PATCH] Merged revision 3258 from 1.77; forward_return with non-string values --- dlls/fakemeta/forward.cpp | 4 ++-- plugins/include/fakemeta_const.inc | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/fakemeta/forward.cpp b/dlls/fakemeta/forward.cpp index 0aaaaee3..fda60542 100755 --- a/dlls/fakemeta/forward.cpp +++ b/dlls/fakemeta/forward.cpp @@ -57,12 +57,12 @@ static cell AMX_NATIVE_CALL fm_return(AMX *amx, cell *params) } case FMV_FLOAT: { - mFloatResult = amx_ctof(params[2]); + mFloatResult = amx_ctof(*(MF_GetAmxAddr(amx,params[2]))); break; } case FMV_CELL: { - mCellResult = params[2]; + mCellResult = *(MF_GetAmxAddr(amx,params[2])); break; } default: diff --git a/plugins/include/fakemeta_const.inc b/plugins/include/fakemeta_const.inc index 7ea01bdc..fdb05f5c 100755 --- a/plugins/include/fakemeta_const.inc +++ b/plugins/include/fakemeta_const.inc @@ -20,10 +20,11 @@ /* The actual return value of the function, use these instead of PLUGIN_HANDLED etc when * returning from registered forwards. */ -#define FMRES_HANDLED 2 -#define FMRES_SUPERCEDE 4 -#define FMRES_IGNORED 1 -#define FMRES_OVERRIDE 3 +#define FMRES_IGNORED 1 // Calls target function, returns normal value +#define FMRES_HANDLED 2 // Tells metamod you did something, still calls target function and returns normal value +#define FMRES_OVERRIDE 3 // Supposed to still call the target function but return your value instead + // however this does not work properly with metamod; use supercede instead. +#define FMRES_SUPERCEDE 4 // Block the target call, and use your return value (if applicable) // Use this with GetInfoKeyBuffer if you want the server's localinfo buffer #define FM_NULLENT -1