From 44615b7ade181b14e7adb95088f1b49a2ddb3772 Mon Sep 17 00:00:00 2001 From: Scags Date: Fri, 8 May 2020 16:54:01 -0500 Subject: [PATCH] Prevent uncessary re-tagging for address functions (#1250) --- plugins/include/sourcemod.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/include/sourcemod.inc b/plugins/include/sourcemod.inc index 01dc54562..3bb0bf9dc 100644 --- a/plugins/include/sourcemod.inc +++ b/plugins/include/sourcemod.inc @@ -676,9 +676,10 @@ enum Address * * @param addr Address to a memory location. * @param size How many bytes should be read. + * If loading a floating-point value, use NumberType_Int32. * @return The value that is stored at that address. */ -native int LoadFromAddress(Address addr, NumberType size); +native any LoadFromAddress(Address addr, NumberType size); /** * Store up to 4 bytes to a memory address. @@ -686,8 +687,9 @@ native int LoadFromAddress(Address addr, NumberType size); * @param addr Address to a memory location. * @param data Value to store at the address. * @param size How many bytes should be written. + * If storing a floating-point value, use NumberType_Int32. */ -native void StoreToAddress(Address addr, int data, NumberType size); +native void StoreToAddress(Address addr, any data, NumberType size); methodmap FrameIterator < Handle { // Creates a stack frame iterator to build your own stack traces.