reapi icon indicating copy to clipboard operation
reapi copied to clipboard

GetMessageData() -> Param: -> Coord/Angle:

Open Destro- opened this issue 1 year ago • 0 comments

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.

Destro- avatar Oct 15 '24 23:10 Destro-