added pm's make fix

added get_user_deaths
This commit is contained in:
David Anderson 2004-03-07 17:40:32 +00:00
parent 7e6a38eba5
commit bc49154c28
2 changed files with 15 additions and 4 deletions

View File

@ -15,7 +15,7 @@ EXTRA_INCLUDEDIRS = -Iextra/include
EXTRA_FLAGS = -Dstrcmpi=strcasecmp EXTRA_FLAGS = -Dstrcmpi=strcasecmp
SDKTOP=../hlsdk SDKTOP=../hlsdk
METADIR=../metamod METADIR=../metamodx
SDKSRC=$(SDKTOP)/SourceCode SDKSRC=$(SDKTOP)/SourceCode
@ -29,7 +29,7 @@ else
OS=LINUX OS=LINUX
endif endif
CC_LINUX=gcc-2.95 CC_LINUX=gcc
ifeq "$(OS)" "WIN32" ifeq "$(OS)" "WIN32"
CC_WIN32=gcc CC_WIN32=gcc
LD_WINDLL=dllwrap LD_WINDLL=dllwrap
@ -72,7 +72,7 @@ CFLAGS:=$(CCOPT) $(CFLAGS) $(ODEF) $(EXTRA_FLAGS)
DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $< DO_CC_LINUX=$(CC_LINUX) $(CFLAGS) -fPIC $(INCLUDEDIRS) -o $@ -c $<
DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $< DO_CC_WIN32=$(CC_WIN32) $(CFLAGS) $(INCLUDEDIRS) -o $@ -c $<
LINK_LINUX=$(CC_LINUX) $(CFLAGS) -shared -ldl -lm $(OBJ_LINUX) $(OBJC_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@ LINK_LINUX=$(CC_LINUX) $(CFLAGS) -lstdc++ -shared -ldl -lm $(OBJ_LINUX) $(OBJC_LINUX) $(EXTRA_LIBDIRS_LINUX) $(EXTRA_LIBS_LINUX) -o $@
LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(OBJC_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@ LINK_WIN32=$(LD_WINDLL) -mwindows --def $(MODNAME).def --add-stdcall-alias $(OBJ_WIN32) $(OBJC_WIN32) $(EXTRA_LIBDIRS_WIN32) $(EXTRA_LIBS_WIN32) -o $@
$(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.c $(OBJDIR_LINUX)/%.o: $(SRCDIR)/%.c

View File

@ -364,6 +364,16 @@ static cell AMX_NATIVE_CALL get_user_frags(AMX *amx, cell *params) /* 1 param */
return (cell)(pPlayer->ingame ? pPlayer->pEdict->v.frags : 0); return (cell)(pPlayer->ingame ? pPlayer->pEdict->v.frags : 0);
} }
static cell AMX_NATIVE_CALL get_user_deaths(AMX *amx, cell *params) /* 1 param */
{
int index = params[1];
if (index<1||index>gpGlobals->maxClients)
return 0;
CPlayer* pPlayer = GET_PLAYER_POINTER_I(index);
return (cell)(pPlayer->ingame ? pPlayer->deaths : 0);
}
static cell AMX_NATIVE_CALL get_user_armor(AMX *amx, cell *params) /* 1 param */ static cell AMX_NATIVE_CALL get_user_armor(AMX *amx, cell *params) /* 1 param */
{ {
int index = params[1]; int index = params[1];
@ -2336,6 +2346,7 @@ AMX_NATIVE_INFO amxmod_Natives[] = {
{ "get_user_authid", get_user_authid }, { "get_user_authid", get_user_authid },
{ "get_user_flags", get_user_flags }, { "get_user_flags", get_user_flags },
{ "get_user_frags", get_user_frags }, { "get_user_frags", get_user_frags },
{ "get_user_deaths", get_user_deaths },
{ "get_user_health", get_user_health }, { "get_user_health", get_user_health },
{ "get_user_index", get_user_index }, { "get_user_index", get_user_index },
{ "get_user_info", get_user_info }, { "get_user_info", get_user_info },
@ -2431,4 +2442,4 @@ AMX_NATIVE_INFO amxmod_Natives[] = {
{ "callfunc_push_intrf", callfunc_push_byref }, { "callfunc_push_intrf", callfunc_push_byref },
{ "callfunc_push_floatrf", callfunc_push_byref }, { "callfunc_push_floatrf", callfunc_push_byref },
{ NULL, NULL } { NULL, NULL }
}; };