Skip to content

Commit

Permalink
Merge branch '1.8-dev' of https://github.com/alliedmodders/sourcemod
Browse files Browse the repository at this point in the history
…into 1.8-dev
  • Loading branch information
psychonic committed Aug 19, 2017
2 parents 3b65422 + ea73bb0 commit 79a8bdd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
11 changes: 2 additions & 9 deletions extensions/cstrike/forwards.cpp
Expand Up @@ -21,15 +21,8 @@ CDetour *DCSWeaponDrop = NULL;

int weaponNameOffset = -1;

//Windows CS:GO
// int __userpurge HandleCommand_Buy_Internal<eax>(int a1<ecx>, float a2<xmm0>, int a3, int a4, char a5)
// a1 - this
// a2 - CCSGameRules::GetWarmupPeriodEndTime(g_pGameRules)
// a3 - weapon
// a4 - unknown
// a5 - bRebuy
#if SOURCE_ENGINE == SE_CSGO
DETOUR_DECL_MEMBER3(DetourHandleBuy, int, const char *, weapon, int, iUnknown, bool, bRebuy)
DETOUR_DECL_MEMBER3(DetourHandleBuy, int, int, iUnknown, const char *, weapon, bool, bRebuy)
#else
DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
#endif
Expand All @@ -51,7 +44,7 @@ DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
}

#if SOURCE_ENGINE == SE_CSGO
int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon, iUnknown, bRebuy);
int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(iUnknown, weapon, bRebuy);
#else
int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon);
#endif
Expand Down
4 changes: 2 additions & 2 deletions extensions/cstrike/util_cstrike.cpp
Expand Up @@ -38,7 +38,7 @@
void *addr; \
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
{ \
g_pSM->LogError(myself, "Failed to locate function."); \
g_pSM->LogError(myself, "Failed to lookup %s signature.", name); \
return defaultret; \
} \
code; \
Expand All @@ -47,7 +47,7 @@
#define GET_MEMSIG(name, defaultret) \
if (!g_pGameConf->GetMemSig(name, &addr) || !addr) \
{ \
g_pSM->LogError(myself, "Failed to locate function."); \
g_pSM->LogError(myself, "Failed to lookup %s signature.", name); \
return defaultret;\
}

Expand Down
18 changes: 9 additions & 9 deletions gamedata/sdktools.games/engine.csgo.txt
Expand Up @@ -219,9 +219,9 @@
{
"GiveNamedItem"
{
"windows" "449"
"linux" "450"
"mac" "450"
"windows" "450"
"linux" "451"
"mac" "451"
}
"RemovePlayerItem"
{
Expand Down Expand Up @@ -255,9 +255,9 @@
}
"CommitSuicide"
{
"windows" "499"
"linux" "499"
"mac" "499"
"windows" "500"
"linux" "500"
"mac" "500"
}
"GetVelocity"
{
Expand Down Expand Up @@ -297,9 +297,9 @@
}
"PlayerRunCmd"
{
"windows" "469"
"linux" "470"
"mac" "470"
"windows" "470"
"linux" "471"
"mac" "471"
}
"GiveAmmo"
{
Expand Down
10 changes: 5 additions & 5 deletions gamedata/sm-cstrike.games/game.csgo.txt
Expand Up @@ -57,8 +57,8 @@
//Offset into HandleCommand_Buy_Internal
"CCSPlayerInventoryOffset"
{
"windows" "55"
"linux" "87"
"windows" "60"
"linux" "97"
"mac" "109"
}
"GetItemInLoadout"
Expand Down Expand Up @@ -96,8 +96,8 @@
"HandleCommand_Buy_Internal"//Wildcard first 6 bytes for getting address for weapon price.
{
"library" "server"
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x81\xEC\x7C\x01\x00\x00\x53\x56\x57\x6A\x00"
"linux" "\x2A\x2A\x2A\x2A\x2A\x2A\x81\xEC\x9C\x01\x00\x00\x0F\xB6\x55\x14"
"windows" "\x2A\x2A\x2A\x2A\x2A\x2A\x83\xEC\x0C\x53\x56\x57\x6A\x01"
"linux" "\x2A\x2A\x2A\x2A\x2A\x2A\x0F\xB6\x55\x14\x89\x75\xF8\x8B\x75\x08"
}
"CSWeaponDrop"//Wildcard first 6 bytes for CS:S DM (kept for backcompat with old SM versions)
{
Expand Down Expand Up @@ -151,7 +151,7 @@
"SetClanTag"
{
"library" "server"
"windows" "\x55\x8B\xEC\x8B\x55\x08\x85\xD2\x74\x2A\x8D\x81\x5C\x29\x00\x00"
"windows" "\x55\x8B\xEC\x8B\x55\x08\x85\xD2\x74\x2A\x8D\x81\x34\x25\x00\x00"
"linux" "\x55\x89\xE5\x83\xEC\x18\x8B\x45\x0C\x85\xC0\x74\x2A\x89\x44\x24\x04\x8B\x45\x08\xC7\x44\x24\x08\x10\x00\x00\x00"
}
// Since it's not possible to make a unique signature for CCSWeaponInfo::GetWeaponInfo, this is instead a signature to a
Expand Down

2 comments on commit 79a8bdd

@inklesspen1rus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix gamedata for sdkhooks:
REload for windows: 306
for linux: 312

@psychonic
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was in the previous commit. 3b65422

Please sign in to comment.