Skip to content

Commit 1fe3687

Browse files
committed
Fix very wrong SDKCall handle assignment
1 parent 70e998e commit 1fe3687

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripting/tf2utils.sp

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
#include <stocksoup/memory>
1313

14-
#define PLUGIN_VERSION "0.6.0"
14+
#define PLUGIN_VERSION "0.6.1"
1515
public Plugin myinfo = {
1616
name = "TF2 Utils",
1717
author = "nosoop",
@@ -88,11 +88,12 @@ public void OnPluginStart() {
8888
StartPrepSDKCall(SDKCall_Entity);
8989
PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "CTFWeaponBase::GetWeaponID()");
9090
PrepSDKCall_SetReturnInfo(SDKType_PlainOldData, SDKPass_Plain);
91-
g_SDKCallIsEntityWeapon = EndPrepSDKCall();
91+
g_SDKCallWeaponGetID = EndPrepSDKCall();
9292

9393
// networked CUtlVector offset support landed in 1.11; try to locate an offset there first
94-
offs_CTFPlayer_hMyWearables = FindSendPropInfo("CTFPlayer", "m_hMyWearables");
95-
if (offs_CTFPlayer_hMyWearables <= 0) {
94+
offs_CTFPlayer_hMyWearables =
95+
view_as<Address>(FindSendPropInfo("CTFPlayer", "m_hMyWearables"));
96+
if (offs_CTFPlayer_hMyWearables <= Address_Null) {
9697
offs_CTFPlayer_hMyWearables = GameConfGetAddressOffset(hGameConf,
9798
"CTFPlayer::m_hMyWearables");
9899
}

0 commit comments

Comments
 (0)