diff --git a/.github/workflows/scripting.yml b/.github/workflows/scripting.yml index 32fa5530c..96ecba37a 100644 --- a/.github/workflows/scripting.yml +++ b/.github/workflows/scripting.yml @@ -31,9 +31,9 @@ jobs: # Setup Python for AMBuild - uses: actions/setup-python@v6 - name: Setup Python 3.8 + name: Setup Python 3.12 with: - python-version: 3.8 + python-version: 3.12 - name: Install AMBuild run: | python -m pip install --upgrade pip setuptools wheel @@ -67,7 +67,7 @@ jobs: echo "SM_VERSION=$(cat ../product.version)" >> $GITHUB_ENV - name: Archive tooling - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: sourcemod-tooling-${{ env.SM_VERSION }}-${{ matrix.os_short }} path: build/package diff --git a/bridge/include/IFileSystemBridge.h b/bridge/include/IFileSystemBridge.h index 4c62506f7..1ea90e55b 100644 --- a/bridge/include/IFileSystemBridge.h +++ b/bridge/include/IFileSystemBridge.h @@ -58,6 +58,7 @@ public: virtual bool IsDirectory(const char *pFileName, const char *pathID = 0) = 0; virtual void CreateDirHierarchy(const char *path, const char *pathID = 0) = 0; virtual int GetSearchPath(const char* pathID, bool bGetPackFiles, char* pPath, int nMaxLen) = 0; + virtual const char * GetGameBinArchSubdirectory() = 0; }; } // namespace SourceMod diff --git a/core/logic/GameConfigs.cpp b/core/logic/GameConfigs.cpp index 64018008d..b141335c1 100644 --- a/core/logic/GameConfigs.cpp +++ b/core/logic/GameConfigs.cpp @@ -1094,13 +1094,18 @@ void GameBinPathManager::Init() std::istringstream iss(search_path); for (std::string path; std::getline(iss, path, ';');) { - if (path.length() > 0 - && path.find(addons_folder) == std::string::npos - && m_lookup.find(path) == m_lookup.cend() - ) + if (path.length() > 0) { - m_lookup.insert(path); - m_ordered.push_back(path); + const char* arch_subdir = bridge->filesystem->GetGameBinArchSubdirectory(); + std::string full_path = path + arch_subdir; + if (full_path.find(addons_folder) == std::string::npos + && m_lookup.find(full_path) == m_lookup.cend() + ) + { + m_lookup.insert(full_path); + m_ordered.push_back(full_path); + + } } } diff --git a/core/logic/sprintf.cpp b/core/logic/sprintf.cpp index 6263ddfb7..de0dd87f6 100644 --- a/core/logic/sprintf.cpp +++ b/core/logic/sprintf.cpp @@ -188,6 +188,15 @@ bool AddString(char **buf_p, size_t &maxlen, const char *string, int width, int width -= size; + if (!(flags & LADJUST)) + { + while ((width-- > 0) && maxlen) + { + *buf++ = ' '; + maxlen--; + } + } + if (g_FormatEscapeDatabase && (flags & NOESCAPE) == 0) { char *tempBuffer = NULL; @@ -226,10 +235,13 @@ bool AddString(char **buf_p, size_t &maxlen, const char *string, int width, int } } - while ((width-- > 0) && maxlen) + if (flags & LADJUST) { - *buf++ = ' '; - maxlen--; + while ((width-- > 0) && maxlen) + { + *buf++ = ' '; + maxlen--; + } } *buf_p = buf; @@ -254,6 +266,12 @@ void AddFloat(char **buf_p, size_t &maxlen, double fval, int width, int prec, in return; } + if (ke::IsInfinite(static_cast(fval))) + { + AddString(buf_p, maxlen, "Inf", width, prec, flags | NOESCAPE); + return; + } + // default precision if (prec < 0) { @@ -485,13 +503,15 @@ void AddInt(char **buf_p, size_t &maxlen, int val, int width, int flags) unsignedVal /= 10; } while (unsignedVal); - if (signedVal < 0) - { - text[digits++] = '-'; - } - buf = *buf_p; + // minus sign BEFORE left padding if padding with zeros + if (signedVal < 0 && maxlen && (flags & ZEROPAD)) + { + *buf++ = '-'; + maxlen--; + } + if (!(flags & LADJUST)) { while ((digits < width) && maxlen) @@ -502,6 +522,13 @@ void AddInt(char **buf_p, size_t &maxlen, int val, int width, int flags) } } + // minus sign AFTER left padding if padding with spaces + if (signedVal < 0 && maxlen && !(flags & ZEROPAD)) + { + *buf++ = '-'; + maxlen--; + } + while (digits-- && maxlen) { *buf++ = text[digits]; diff --git a/core/logic_bridge.cpp b/core/logic_bridge.cpp index 4e0e8d88a..fe1f3377f 100644 --- a/core/logic_bridge.cpp +++ b/core/logic_bridge.cpp @@ -194,6 +194,25 @@ public: { return filesystem->GetSearchPath(pathID, bGetPackFiles, pPath, nMaxLen); } + const char* GetGameBinArchSubdirectory() override + { +#if defined( KE_ARCH_X64 ) && SOURCE_ENGINE >= SE_BLADE +#if defined( PLATFORM_WINDOWS ) +#if SOURCE_ENGINE == SE_MCV + return "win64" PLATFORM_SEP; +#else + return "x64" PLATFORM_SEP; +#endif // SOURCE_ENGINE == SE_MCV +#elif defined( PLATFORM_LINUX ) + return "linux64" PLATFORM_SEP; +#else +#error "Unsupported platform" +#endif // PLATFORM +#else + // Already included in the GameBin path(s), if required + return ""; +#endif // defined( KE_ARCH_X64 ) && SOURCE_ENGINE >= SE_BLADE + } } fs_wrapper; class VPlayerInfo_Logic : public IPlayerInfoBridge diff --git a/extensions/dhooks/dynhooks_sourcepawn.cpp b/extensions/dhooks/dynhooks_sourcepawn.cpp index 927f3d66c..6ad744d16 100644 --- a/extensions/dhooks/dynhooks_sourcepawn.cpp +++ b/extensions/dhooks/dynhooks_sourcepawn.cpp @@ -532,6 +532,7 @@ CDynamicHooksSourcePawn::CDynamicHooksSourcePawn(HookSetup *setup, CHook *pDetou this->hookType = setup->hookType; this->m_pDetour = pDetour; this->callConv = setup->callConv; + this->thisFuncCallConv = setup->callConv; } HookReturnStruct *CDynamicHooksSourcePawn::GetReturnStruct() diff --git a/extensions/dhooks/natives.cpp b/extensions/dhooks/natives.cpp index f228fcf30..82b154ada 100644 --- a/extensions/dhooks/natives.cpp +++ b/extensions/dhooks/natives.cpp @@ -42,6 +42,8 @@ enum SDKFuncConfSource SDKConf_Address }; +using ParamVector = SourceHook::CVector; + bool GetHandleIfValidOrError(HandleType_t type, void **object, IPluginContext *pContext, cell_t param) { if(param == BAD_HANDLE) @@ -81,6 +83,56 @@ bool GetCallbackArgHandleIfValidOrError(HandleType_t type, HandleType_t otherTyp return true; } +bool GetObjectAddrOrThis(IPluginContext *pContext, const cell_t *params, void *&retAddr) +{ + HookParamsStruct *paramStruct = NULL; + retAddr = NULL; + + if(!GetCallbackArgHandleIfValidOrError(g_HookParamsHandle, g_HookReturnHandle, (void **)¶mStruct, pContext, params[1])) + { + return false; + } + + if(params[2] != 0) + { + const ParamVector ¶msVec = paramStruct->dg->params; + + if(params[2] < 0 || params[2] > static_cast(paramsVec.size())) + { + return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramsVec.size()); + } + + int index = params[2] - 1; + const ParamInfo ¶m = paramsVec.at(index); + + if(param.type != HookParamType_ObjectPtr && param.type != HookParamType_Object) + { + return pContext->ThrowNativeError("Invalid object value type %i", param.type); + } + + size_t offset = GetParamOffset(paramStruct, index); + retAddr = GetObjectAddr(param.type, param.flags, paramStruct->orgParams, offset); + return true; + } + + const DHooksInfo* dgInfo = paramStruct->dg; + + if(dgInfo->thisFuncCallConv != CallConv_THISCALL) + { + return pContext->ThrowNativeError("Parameter 'this' is only available in member functions"); + } + + if(dgInfo->thisType != ThisPointer_Address + && dgInfo->thisType != ThisPointer_CBaseEntity + && dgInfo->hookType != HookType_GameRules) + { + return pContext->ThrowNativeError("Parameter 'this' is not specified as an address, it is not available"); + } + + retAddr = g_SHPtr->GetIfacePtr(); + return true; +} + IPluginFunction *GetCallback(IPluginContext *pContext, HookSetup * setup, const cell_t *params, cell_t callback_index) { IPluginFunction *ret = NULL; @@ -1089,28 +1141,12 @@ cell_t Native_RemoveEntityListener(IPluginContext *pContext, const cell_t *param //native any:DHookGetParamObjectPtrVar(Handle:hParams, num, offset, ObjectValueType:type); cell_t Native_GetParamObjectPtrVar(IPluginContext *pContext, const cell_t *params) { - HookParamsStruct *paramStruct; - - if(!GetCallbackArgHandleIfValidOrError(g_HookParamsHandle, g_HookReturnHandle, (void **)¶mStruct, pContext, params[1])) + void *addr = NULL; + if(!GetObjectAddrOrThis(pContext, params, addr)) { return 0; } - if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) - { - return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); - } - - int index = params[2] - 1; - - if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) - { - return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); - } - - size_t offset = GetParamOffset(paramStruct, index); - void *addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->dg->params.at(index).flags, paramStruct->orgParams, offset); - switch((ObjectValueType)params[4]) { case ObjectValueType_Int: @@ -1160,28 +1196,12 @@ cell_t Native_GetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param //native DHookSetParamObjectPtrVar(Handle:hParams, num, offset, ObjectValueType:type, value) cell_t Native_SetParamObjectPtrVar(IPluginContext *pContext, const cell_t *params) { - HookParamsStruct *paramStruct; - - if(!GetCallbackArgHandleIfValidOrError(g_HookParamsHandle, g_HookReturnHandle, (void **)¶mStruct, pContext, params[1])) + void *addr = NULL; + if(!GetObjectAddrOrThis(pContext, params, addr)) { return 0; } - if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) - { - return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); - } - - int index = params[2] - 1; - - if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) - { - return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); - } - - size_t offset = GetParamOffset(paramStruct, index); - void *addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->dg->params.at(index).flags, paramStruct->orgParams, offset); - switch((ObjectValueType)params[4]) { case ObjectValueType_Int: @@ -1245,28 +1265,12 @@ cell_t Native_SetParamObjectPtrVar(IPluginContext *pContext, const cell_t *param //native DHookGetParamObjectPtrVarVector(Handle:hParams, num, offset, ObjectValueType:type, Float:buffer[3]); cell_t Native_GetParamObjectPtrVarVector(IPluginContext *pContext, const cell_t *params) { - HookParamsStruct *paramStruct; - - if(!GetCallbackArgHandleIfValidOrError(g_HookParamsHandle, g_HookReturnHandle, (void **)¶mStruct, pContext, params[1])) + void *addr = NULL; + if(!GetObjectAddrOrThis(pContext, params, addr)) { return 0; } - if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) - { - return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); - } - - int index = params[2] - 1; - - if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) - { - return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); - } - - size_t offset = GetParamOffset(paramStruct, index); - void *addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->dg->params.at(index).flags, paramStruct->orgParams, offset); - cell_t *buffer; pContext->LocalToPhysAddr(params[5], &buffer); @@ -1299,28 +1303,12 @@ cell_t Native_GetParamObjectPtrVarVector(IPluginContext *pContext, const cell_t //native DHookSetParamObjectPtrVarVector(Handle:hParams, num, offset, ObjectValueType:type, Float:value[3]); cell_t Native_SetParamObjectPtrVarVector(IPluginContext *pContext, const cell_t *params) { - HookParamsStruct *paramStruct; - - if(!GetCallbackArgHandleIfValidOrError(g_HookParamsHandle, g_HookReturnHandle, (void **)¶mStruct, pContext, params[1])) + void *addr = NULL; + if(!GetObjectAddrOrThis(pContext, params, addr)) { return 0; } - if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) - { - return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); - } - - int index = params[2] - 1; - - if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) - { - return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); - } - - size_t offset = GetParamOffset(paramStruct, index); - void *addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->dg->params.at(index).flags, paramStruct->orgParams, offset); - cell_t *buffer; pContext->LocalToPhysAddr(params[5], &buffer); @@ -1352,28 +1340,12 @@ cell_t Native_SetParamObjectPtrVarVector(IPluginContext *pContext, const cell_t //native DHookGetParamObjectPtrString(Handle:hParams, num, offset, ObjectValueType:type, String:buffer[], size) cell_t Native_GetParamObjectPtrString(IPluginContext *pContext, const cell_t *params) { - HookParamsStruct *paramStruct; - - if(!GetCallbackArgHandleIfValidOrError(g_HookParamsHandle, g_HookReturnHandle, (void **)¶mStruct, pContext, params[1])) + void *addr = NULL; + if (!GetObjectAddrOrThis(pContext, params, addr)) { return 0; } - if(params[2] <= 0 || params[2] > (int)paramStruct->dg->params.size()) - { - return pContext->ThrowNativeError("Invalid param number %i max params is %i", params[2], paramStruct->dg->params.size()); - } - - int index = params[2] - 1; - - if(paramStruct->dg->params.at(index).type != HookParamType_ObjectPtr && paramStruct->dg->params.at(index).type != HookParamType_Object) - { - return pContext->ThrowNativeError("Invalid object value type %i", paramStruct->dg->params.at(index).type); - } - - size_t offset = GetParamOffset(paramStruct, index); - void *addr = GetObjectAddr(paramStruct->dg->params.at(index).type, paramStruct->dg->params.at(index).flags, paramStruct->orgParams, offset); - switch((ObjectValueType)params[4]) { case ObjectValueType_CharPtr: diff --git a/extensions/dhooks/vhook.h b/extensions/dhooks/vhook.h index e68d2ef72..941a975f5 100644 --- a/extensions/dhooks/vhook.h +++ b/extensions/dhooks/vhook.h @@ -162,6 +162,7 @@ public: int entity; ThisPointerType thisType; HookType hookType; + CallingConvention thisFuncCallConv; }; class DHooksCallback : public SourceHook::ISHDelegate, public DHooksInfo diff --git a/gamedata/sdkhooks.games/game.zpanic.txt b/gamedata/sdkhooks.games/game.zpanic.txt index 9fefa4c39..584a58182 100644 --- a/gamedata/sdkhooks.games/game.zpanic.txt +++ b/gamedata/sdkhooks.games/game.zpanic.txt @@ -4,26 +4,32 @@ { "Offsets" { + "CanBeAutobalanced" + { + "windows" "465" + "linux" "466" + } "GroundEntChanged" { - "windows" "188" - "linux" "190" + "windows" "178" + "linux" "180" } "OnTakeDamage_Alive" { - "windows" "287" - "linux" "288" + "windows" "283" + "linux" "284" } "GetMaxHealth" { - "windows" "126" - "linux" "127" + "windows" "118" + "linux" "119" } "Blocked" { - "windows" "109" - "linux" "110" + "windows" "101" + "linux" "102" } + /* CBaseCombatWeapon::Reload */ "Reload" { "windows" "287" @@ -31,18 +37,19 @@ } "EndTouch" { - "windows" "107" - "linux" "108" + "windows" "99" + "linux" "100" } + /* CBaseEntity::FireBullets(FireBulletsInfo_t const&) */ "FireBullets" { - "windows" "121" - "linux" "121" + "windows" "113" + "linux" "113" } "OnTakeDamage" { - "windows" "69" - "linux" "70" + "windows" "61" + "linux" "62" } "PreThink" { @@ -56,8 +63,8 @@ } "SetTransmit" { - "windows" "28" - "linux" "29" + "windows" "20" + "linux" "21" } "ShouldCollide" { @@ -66,64 +73,64 @@ } "Spawn" { - "windows" "30" - "linux" "31" + "windows" "22" + "linux" "23" } "StartTouch" { - "windows" "105" - "linux" "106" + "windows" "97" + "linux" "98" } "Think" { - "windows" "57" - "linux" "58" + "windows" "49" + "linux" "50" } "Touch" { - "windows" "106" - "linux" "107" + "windows" "98" + "linux" "99" } "TraceAttack" { - "windows" "67" - "linux" "68" + "windows" "59" + "linux" "60" } "Use" { - "windows" "104" - "linux" "105" + "windows" "96" + "linux" "97" } "VPhysicsUpdate" { - "windows" "168" - "linux" "169" + "windows" "158" + "linux" "159" } "Weapon_CanSwitchTo" { - "windows" "278" - "linux" "279" + "windows" "277" + "linux" "278" } "Weapon_CanUse" + { + "windows" "271" + "linux" "272" + } + "Weapon_Drop" + { + "windows" "274" + "linux" "275" + } + "Weapon_Equip" { "windows" "272" "linux" "273" } - "Weapon_Drop" + "Weapon_Switch" { "windows" "275" "linux" "276" } - "Weapon_Equip" - { - "windows" "273" - "linux" "274" - } - "Weapon_Switch" - { - "windows" "276" - "linux" "277" - } } } } diff --git a/gamedata/sdktools.games/game.zpanic.txt b/gamedata/sdktools.games/game.zpanic.txt index e1794bffe..08cecfec2 100644 --- a/gamedata/sdktools.games/game.zpanic.txt +++ b/gamedata/sdktools.games/game.zpanic.txt @@ -23,13 +23,13 @@ } "RemovePlayerItem" { - "windows" "285" - "linux" "286" + "windows" "281" + "linux" "282" } "Weapon_GetSlot" { - "windows" "280" - "linux" "281" + "windows" "279" + "linux" "280" } "Ignite" { @@ -43,8 +43,8 @@ } "Teleport" { - "windows" "115" - "linux" "116" + "windows" "107" + "linux" "108" } "CommitSuicide" { @@ -53,33 +53,33 @@ } "GetVelocity" { - "windows" "151" - "linux" "152" + "windows" "141" + "linux" "142" } "EyeAngles" { - "windows" "142" - "linux" "143" + "windows" "132" + "linux" "133" } "AcceptInput" { - "windows" "44" - "linux" "45" + "windows" "36" + "linux" "37" } "SetEntityModel" { - "windows" "32" - "linux" "33" + "windows" "24" + "linux" "25" } "WeaponEquip" { - "windows" "273" - "linux" "274" + "windows" "272" + "linux" "273" } "Activate" { - "windows" "41" - "linux" "42" + "windows" "33" + "linux" "34" } "PlayerRunCmd" { @@ -93,13 +93,13 @@ } "SetOwnerEntity" { - "windows" "25" - "linux" "26" + "windows" "17" + "linux" "18" } "GiveAmmo" { - "windows" "264" - "linux" "265" + "windows" "263" + "linux" "264" } } "Signatures" diff --git a/hl2sdk-manifests b/hl2sdk-manifests index 41cb9169c..c018a9944 160000 --- a/hl2sdk-manifests +++ b/hl2sdk-manifests @@ -1 +1 @@ -Subproject commit 41cb9169cb613c8455d0c8958e675ed88bd02c5b +Subproject commit c018a994478d6c31f70ded7adec7aa9e2c40bb1a diff --git a/plugins/include/dhooks.inc b/plugins/include/dhooks.inc index 99f17e7e8..fa36aa010 100644 --- a/plugins/include/dhooks.inc +++ b/plugins/include/dhooks.inc @@ -310,7 +310,7 @@ methodmap DHookParam < Handle // Gets an object's variable value. // - // @param num Parameter number to get, starting at 1. + // @param num Parameter number to get, 0 for param "this", other parameters start from 1 // @param offset Byte offset within the object to the var to get. // @param type Type of var it is. // @@ -320,7 +320,7 @@ methodmap DHookParam < Handle // Gets an object's vector variable value. // - // @param num Parameter number to get, starting at 1. + // @param num Parameter number to get, 0 for param "this", other parameters start from 1. // @param offset Byte offset within the object to the var to get. // @param type Type of var it is. // @param vec Buffer to store the result vector. @@ -330,7 +330,7 @@ methodmap DHookParam < Handle // Gets an object's string variable value. // - // @param num Parameter number to get, starting at 1. + // @param num Parameter number to get, 0 for param "this", other parameters start from 1. // @param offset Byte offset within the object to the var to get. // @param type Type of var it is. // @param buffer Buffer to store the result string. @@ -344,7 +344,7 @@ methodmap DHookParam < Handle // The changes are only applied when MRES_ChangedHandled or MRES_ChangedOverride // is returned in the callback. // - // @param num Parameter number to set, starting at 1. + // @param num Parameter number to set, 0 for param "this", other parameters start from 1. // @param offset Byte offset within the object to the var to set. // @param type Type of var it is. // @param value The value to set the var to. @@ -357,7 +357,7 @@ methodmap DHookParam < Handle // The changes are only applied when MRES_ChangedHandled or MRES_ChangedOverride // is returned in the callback. // - // @param num Parameter number to set, starting at 1. + // @param num Parameter number to set, 0 for param "this", other parameters start from 1. // @param offset Byte offset within the object to the var to set. // @param type Type of var it is. // @param vec The value to set the vector var to. @@ -928,7 +928,7 @@ native void DHookSetReturnString(Handle hReturn, char[] value); * Gets an objects variable value * * @param hParams Handle to params structure - * @param num Param number to get. + * @param num Param number to get, 0 for param "this". * @param offset Offset within the object to the var to get. * @param type Type of var it is * @@ -941,7 +941,7 @@ native any DHookGetParamObjectPtrVar(Handle hParams, int num, int offset, Object * Sets an objects variable value * * @param hParams Handle to params structure - * @param num Param number to set. + * @param num Param number to set, 0 for param "this". * @param offset Offset within the object to the var to set. * @param type Type of var it is * @param value The value to set the var to. @@ -954,7 +954,7 @@ native void DHookSetParamObjectPtrVar(Handle hParams, int num, int offset, Objec * Gets an objects vector variable value * * @param hParams Handle to params structure - * @param num Param number to get. + * @param num Param number to get, 0 for param "this". * @param offset Offset within the object to the var to get. * @param type Type of var it is * @param buffer Buffer to store the result vector @@ -967,7 +967,7 @@ native void DHookGetParamObjectPtrVarVector(Handle hParams, int num, int offset, * Sets an objects vector variable value * * @param hParams Handle to params structure - * @param num Param number to set. + * @param num Param number to set, 0 for param "this". * @param offset Offset within the object to the var to set. * @param type Type of var it is * @param value The value to set the vector var to. @@ -980,7 +980,7 @@ native void DHookSetParamObjectPtrVarVector(Handle hParams, int num, int offset, * Gets an objects string variable value * * @param hParams Handle to params structure - * @param num Param number to get. + * @param num Param number to get, 0 for param "this". * @param offset Offset within the object to the var to get. * @param type Type of var it is * @param buffer Buffer to store the result vector