reapi
reapi copied to clipboard
GetMessageData() -> Param: -> Coord/Angle:
https://github.com/s1lentq/reapi/blob/627acf75c98138bfe7539e3640f19737b572e385/reapi/src/natives/natives_hookmessage.cpp#L266-L273
case IMessage::ParamType::Angle:
case IMessage::ParamType::Coord:
{
float flValue = g_activeMessageContext->getParamFloat(number);
if (PARAMS_COUNT > 2)
*dstAddr = *((cell*)&flValue);
return *((cell*)&flValue);
}
The same happens with GetMessageOrigData. I guess there must be a more "modern" way, I just did amx_ftoc.