From 26465afbf786b432bf4a44b716ffd62d5c972b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bergstr=C3=B6m?= Date: Tue, 14 Sep 2004 17:57:34 +0000 Subject: [PATCH] Fixed cs_set_hostage_follow for amd64 --- dlls/cstrike/cstrike.cpp | 5 +++++ dlls/cstrike/cstrike.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dlls/cstrike/cstrike.cpp b/dlls/cstrike/cstrike.cpp index 5bcdf384..fee2853f 100755 --- a/dlls/cstrike/cstrike.cpp +++ b/dlls/cstrike/cstrike.cpp @@ -1235,7 +1235,12 @@ static cell AMX_NATIVE_CALL cs_set_hostage_follow(AMX *amx, cell *params) // cs_ // Set to not follow anything? if (params[2] == 0) { +#if !defined __amd64__ *((int *)pHostage->pvPrivateData + OFFSET_HOSTAGEFOLLOW) = 0; +#else + *((long *)pHostage->pvPrivateData + OFFSET_HOSTAGEFOLLOW) = 0; +#endif + return 1; } diff --git a/dlls/cstrike/cstrike.h b/dlls/cstrike/cstrike.h index cfecac3a..d1fead7f 100755 --- a/dlls/cstrike/cstrike.h +++ b/dlls/cstrike/cstrike.h @@ -115,7 +115,7 @@ #define OFFSET_CLIPAMMO 65 + EXTRAOFFSET // +14 #define OFFSET_SILENCER_FIREMODE 88 + EXTRAOFFSET // +14 // "hostage_entity" entities - #define OFFSET_HOSTAGEFOLLOW 107 + EXTRAOFFSET // +21 + #define OFFSET_HOSTAGEFOLLOW 51 + EXTRAOFFSET // +21, long=51, int=107! (must use the long* offset becuase pointers on amd64 are stored the size of longs, 8 bytes, instead of the usual int 4 bytes.) #define OFFSET_HOSTAGEID 516 + EXTRAOFFSET // +29 #endif