diff --git a/amxmodx/amxmodx.cpp b/amxmodx/amxmodx.cpp index 6d0d9216..8027549e 100755 --- a/amxmodx/amxmodx.cpp +++ b/amxmodx/amxmodx.cpp @@ -763,11 +763,23 @@ static cell AMX_NATIVE_CALL get_user_attacker(AMX *amx, cell *params) /* 2 param { pPlayer = GET_PLAYER_POINTER(enemy); weapon = pPlayer->current; - } - else if (g_grenades.find(enemy, &pPlayer, weapon)) + } else if (g_grenades.find(enemy, &pPlayer, weapon)) { enemy = pPlayer->pEdict; - else - enemy = NULL; + } else { + enemy = enemy->v.owner; + if (!FNullEnt(enemy) && (enemy->v.flags & (FL_CLIENT | FL_FAKECLIENT))) + { + pPlayer = GET_PLAYER_POINTER(enemy); + weapon = pPlayer->current; + } else { + switch (*params / sizeof(cell)) + { + case 3: *get_amxaddr(amx, params[3]) = 0; + case 2: *get_amxaddr(amx, params[2]) = 0; + } + return ENTINDEX(pPlayer->pEdict->v.dmg_inflictor); + } + } if (enemy) { diff --git a/amxmodx/amxmodx.h b/amxmodx/amxmodx.h index 266208a3..ca92bcd6 100755 --- a/amxmodx/amxmodx.h +++ b/amxmodx/amxmodx.h @@ -68,7 +68,7 @@ #include "amxxlog.h" #define AMXXLOG_Log g_log.Log -#define AMX_VERSION "1.60" +#define AMX_VERSION "1.61" extern AMX_NATIVE_INFO core_Natives[]; extern AMX_NATIVE_INFO time_Natives[]; diff --git a/amxmodx/version.rc b/amxmodx/version.rc index eab70141..2eb972b8 100755 --- a/amxmodx/version.rc +++ b/amxmodx/version.rc @@ -27,8 +27,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,6,0,0 - PRODUCTVERSION 1,6,0,0 + FILEVERSION 1,6,1,0 + PRODUCTVERSION 1,6,1,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L @@ -45,12 +45,12 @@ BEGIN BEGIN VALUE "Comments", "AMX Mod X" VALUE "FileDescription", "AMX Mod X" - VALUE "FileVersion", "1.60" + VALUE "FileVersion", "1.61" VALUE "InternalName", "amxmodx" VALUE "LegalCopyright", "Copyright (c) 2004-2005, AMX Mod X Dev Team" VALUE "OriginalFilename", "amxmodx_mm.dll" VALUE "ProductName", "AMX Mod X" - VALUE "ProductVersion", "1.60" + VALUE "ProductVersion", "1.61" END END BLOCK "VarFileInfo"