Added clan tag support for CS:GO in CStrike ext (bug 5429, r=psychonic).
Added clan tag support for CS:GO in CStrike ext (
bug 5429, r=psychonic).
1.1 --- a/extensions/cstrike/natives.cpp Thu Oct 11 23:16:47 2012 -0400
1.2 +++ b/extensions/cstrike/natives.cpp Mon Aug 13 14:59:31 2012 -0400
1.3 @@ -366,11 +366,6 @@
1.4
1.5 static cell_t CS_GetClientClanTag(IPluginContext *pContext, const cell_t *params)
1.6 {
1.7 -#if SOURCE_ENGINE == SE_CSGO
1.8 - size_t len;
1.9 - pContext->StringToLocalUTF8(params[2], params[3], "", &len);
1.10 - return len;
1.11 -#else
1.12 static void *addr;
1.13 if (!addr)
1.14 {
1.15 @@ -406,14 +401,10 @@
1.16 pContext->StringToLocalUTF8(params[2], params[3], src, &len);
1.17
1.18 return len;
1.19 -#endif
1.20 }
1.21
1.22 static cell_t CS_SetClientClanTag(IPluginContext *pContext, const cell_t *params)
1.23 {
1.24 -#if SOURCE_ENGINE == SE_CSGO
1.25 - return 0;
1.26 -#else
1.27 static ICallWrapper *pWrapper = NULL;
1.28
1.29 if (!pWrapper)
1.30 @@ -448,7 +439,6 @@
1.31 pWrapper->Execute(vstk, NULL);
1.32
1.33 return 1;
1.34 -#endif
1.35 }
1.36
1.37 static cell_t CS_AliasToWeaponID(IPluginContext *pContext, const cell_t *params)
2.1 --- a/gamedata/sm-cstrike.games/game.csgo.txt Thu Oct 11 23:16:47 2012 -0400
2.2 +++ b/gamedata/sm-cstrike.games/game.csgo.txt Mon Aug 13 14:59:31 2012 -0400
2.3 @@ -49,6 +49,12 @@
2.4 "linux" "47"
2.5 "mac" "61"
2.6 }
2.7 + "ClanTagOffset"
2.8 + {
2.9 + "windows" "15"
2.10 + "linux" "41"
2.11 + "mac" "22"
2.12 + }
2.13 }
2.14 "Signatures"
2.15 {
2.16 @@ -123,6 +129,13 @@
2.17 "linux" "@_Z15AliasToWeaponIDPKc"
2.18 "mac" "@_Z15AliasToWeaponIDPKc"
2.19 }
2.20 + "SetClanTag"
2.21 + {
2.22 + "library" "server"
2.23 + "windows" "\x55\x8B\xEC\x8B\x2A\x2A\x85\xC0\x74\x2A\x6A\x10\x50\x81\xC1\x2A\x2A\x2A\x2A\x51"
2.24 + "linux" "@_ZN9CCSPlayer10SetClanTagEPKc"
2.25 + "mac" "@_ZN9CCSPlayer10SetClanTagEPKc"
2.26 + }
2.27 }
2.28 }
2.29 }
3.1 --- a/plugins/include/cstrike.inc Thu Oct 11 23:16:47 2012 -0400
3.2 +++ b/plugins/include/cstrike.inc Mon Aug 13 14:59:31 2012 -0400
3.3 @@ -250,7 +250,6 @@
3.4 * @return Number of non-null bytes written.
3.5 *
3.6 * @error Invalid client.
3.7 - * @note Only supported on CS:S. Writes 0-length string on CS:GO.
3.8 */
3.9 native CS_GetClientClanTag(client, String:buffer[], size);
3.10
3.11 @@ -261,7 +260,6 @@
3.12 * @noreturn
3.13 *
3.14 * @error Invalid client.
3.15 - * @note Only supported on CS:S. Has no effect on CS:GO.
3.16 */
3.17 native CS_SetClientClanTag(client, const String:tag[]);
3.18