From 419c8f6ee672b4ccd0ed66e9b3675dbf825b57ea Mon Sep 17 00:00:00 2001 From: Vincent Herbet Date: Sat, 10 Aug 2013 19:10:54 +0200 Subject: [PATCH] Fix client_death/damage forwards passing alive victims on ClientKill (bug 5812, r=Nextra) Former-commit-id: 39fadf43027ccfaff20a7c671aec4f22fdf432ca --- dlls/cstrike/csx/meta_api.cpp | 5 +++-- dlls/cstrike/csx/sdk/moduleconfig.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/cstrike/csx/meta_api.cpp b/dlls/cstrike/csx/meta_api.cpp index eccc97af..e58d81d8 100755 --- a/dlls/cstrike/csx/meta_api.cpp +++ b/dlls/cstrike/csx/meta_api.cpp @@ -112,9 +112,10 @@ const char* get_localinfo( const char* name , const char* def = 0 ) return b; } -void ClientKill(edict_t *pEntity){ +void ClientKill_Post(edict_t *pEntity) +{ CPlayer *pPlayer = GET_PLAYER_POINTER(pEntity); - if ( !pPlayer->IsAlive()) + if ( pPlayer->IsAlive()) RETURN_META(MRES_IGNORED); MF_ExecuteForward( iFDamage,static_cast(pPlayer->index), static_cast(pPlayer->index) , diff --git a/dlls/cstrike/csx/sdk/moduleconfig.h b/dlls/cstrike/csx/sdk/moduleconfig.h index cce28f8d..aed008dd 100755 --- a/dlls/cstrike/csx/sdk/moduleconfig.h +++ b/dlls/cstrike/csx/sdk/moduleconfig.h @@ -108,7 +108,7 @@ // #define FN_ResetGlobalState ResetGlobalState /* pfnResetGlobalState() */ // #define FN_ClientConnect ClientConnect /* pfnClientConnect() (wd) Client has connected */ #define FN_ClientDisconnect ClientDisconnect /* pfnClientDisconnect() (wd) Player has left the game */ -#define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */ +// #define FN_ClientKill ClientKill /* pfnClientKill() (wd) Player has typed "kill" */ // #define FN_ClientPutInServer ClientPutInServer /* pfnClientPutInServer() (wd) Client is entering the game */ // #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */ // #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */ @@ -160,7 +160,7 @@ // #define FN_ResetGlobalState_Post ResetGlobalState_Post #define FN_ClientConnect_Post ClientConnect_Post // #define FN_ClientDisconnect_Post ClientDisconnect_Post -// #define FN_ClientKill_Post ClientKill_Post +#define FN_ClientKill_Post ClientKill_Post #define FN_ClientPutInServer_Post ClientPutInServer_Post // #define FN_ClientCommand_Post ClientCommand_Post #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post