diff --git a/dlls/fun/Makefile b/dlls/fun/Makefile index 8cc1d091..853642f6 100755 --- a/dlls/fun/Makefile +++ b/dlls/fun/Makefile @@ -26,7 +26,7 @@ else OS=LINUX endif -CC_LINUX=gcc-2.95 +CC_LINUX=gcc ifeq "$(OS)" "WIN32" CC_WIN32=gcc LD_WINDLL=dllwrap @@ -41,7 +41,7 @@ endif -LIBFILE_LINUX = $(MODNAME)_i386.so +LIBFILE_LINUX = $(MODNAME)_amd64.so LIBFILE_WIN32 = $(MODNAME).dll TARGET_LINUX = $(OBJDIR_LINUX)/$(LIBFILE_LINUX) TARGET_WIN32 = $(OBJDIR_WIN32)/$(LIBFILE_WIN32) @@ -55,7 +55,7 @@ endif OBJ_LINUX := $(SRCFILES:%.cpp=$(OBJDIR_LINUX)/%.o) OBJ_WIN32 := $(SRCFILES:%.cpp=$(OBJDIR_WIN32)/%.o) -CCOPT = -march=i386 -O2 -ffast-math -funroll-loops \ +CCOPT = -m64 -O2 -ffast-math -funroll-loops \ -s -DNDEBUG INCLUDEDIRS=-I../curl/include -I$(SRCDIR) -I$(AMXDIR) -I$(METADIR) -I$(SDKSRC)/engine -I$(SDKSRC)/common -I$(SDKSRC)/pm_shared -I$(SDKSRC)/dlls -I$(SDKSRC) $(EXTRA_INCLUDEDIRS) diff --git a/dlls/fun/Makefile.pl b/dlls/fun/Makefile.pl index 3eea9fee..b12fc8cd 100755 --- a/dlls/fun/Makefile.pl +++ b/dlls/fun/Makefile.pl @@ -72,7 +72,7 @@ if ($OPTIONS{"debug"}) if ($OPTIONS{"amd64"}) { - $cflags .= "-m64 -DSMALL_CELLSIZE=64 $cflags"; + $cflags .= " -m64 -DHAVE_I64 -DSMALL_CELL_SIZE=64 $cflags"; } if ($OPTIONS{"debug"}) diff --git a/dlls/fun/fun.cpp b/dlls/fun/fun.cpp index d44976a8..576efc22 100755 --- a/dlls/fun/fun.cpp +++ b/dlls/fun/fun.cpp @@ -192,6 +192,7 @@ static cell AMX_NATIVE_CALL give_item(AMX *amx, cell *params) // native give_ite // Check index. if (params[1] < 1 || params[1] > gpGlobals->maxClients) { + MF_Log("Failed at first check. Param: %d", params[1]); MF_RaiseAmxError(amx, AMX_ERR_NATIVE); return 0; } @@ -201,6 +202,7 @@ static cell AMX_NATIVE_CALL give_item(AMX *amx, cell *params) // native give_ite // Check entity validity if (FNullEnt(pPlayer)) { + MF_Log("Failed at second check. Param: %p", pPlayer); MF_RaiseAmxError(amx, AMX_ERR_NATIVE); return 0; } @@ -912,4 +914,4 @@ void ClientConnectFakeBot(int index) //MF_Log("A bot connects, forwarded to fun! The bot is %d!", index); //CPlayer* player; } -*/ \ No newline at end of file +*/ diff --git a/dlls/fun/fun.h b/dlls/fun/fun.h index 607a7bb1..b733aef6 100755 --- a/dlls/fun/fun.h +++ b/dlls/fun/fun.h @@ -30,7 +30,7 @@ * you do not wish to do so, delete this exception statement from your * version. */ - +#define SMALL_CELL_SIZE 64 #include "amxxmodule.h" // Fun-specific defines below