Merged revision 3258 from 1.77; forward_return with non-string values

This commit is contained in:
Steve Dudenhoeffer 2007-01-26 06:08:29 +00:00
parent 7a01503478
commit 35fcca8a66
2 changed files with 7 additions and 6 deletions

View File

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

View File

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