diff --git a/makefile b/makefile index 4c14a0e..d9f261b 100644 --- a/makefile +++ b/makefile @@ -5,8 +5,8 @@ # make YSF # -GPP = g++ -m32 -Ilib -DSAMPGDK_AMALGAMATION -nodefaultlibs -GCC = gcc -m32 -Ilib -DSAMPGDK_AMALGAMATION -nodefaultlibs +GPP = g++ -m32 -Ilib -DSAMPGDK_AMALGAMATION -fno-stack-protector +GCC = gcc -m32 -Ilib -DSAMPGDK_AMALGAMATION -fno-stack-protector YSF_OUTFILE = "./YSF.so" COMPILE_FLAGS = -c -O3 -fpack-struct=1 -fPIC -w -DLINUX @@ -24,4 +24,4 @@ YSF: clean $(GCC) $(YSF) ./lib/subhook/subhook.c $(GCC) $(YSF) ./lib/sampgdk/sampgdk.c $(GPP) $(YSF) ./src/*.cpp - $(GCC) -fshort-wchar -shared -o $(YSF_OUTFILE) *.o + $(GCC) -nodefaultlibs -fshort-wchar -shared -o $(YSF_OUTFILE) *.o diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 8233a8b..e6a23fa 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -369,14 +369,14 @@ static BYTE HOOK_GetPacketID(Packet *p) #ifdef _WIN32 bool __thiscall CHookRakServer::Send(void* ppRakServer, RakNet::BitStream* parameters, PacketPriority priority, PacketReliability reliability, unsigned orderingChannel, PlayerID playerId, bool broadcast) #else -bool CHookRakServer::Send(void* ppRakServer, RakNet::BitStream* parameters, int priority, int reliability, unsigned orderingChannel, PlayerID playerId, bool broadcast) +bool CHookRakServer::Send(void* ppRakServer, RakNet::BitStream* parameters, PacketPriority priority, PacketReliability reliability, unsigned orderingChannel, PlayerID playerId, bool broadcast) #endif { /* BYTE id; WORD playerid; parameters->Read(id); - parameters->Read(playerid); + parameters->Read(playerid); logprintf("id: %d - playerid: %d, sendto. %d", id, playerid, pRakServer->GetIndexFromPlayerID(playerId)); */ @@ -897,4 +897,4 @@ void InstallPostHooks() RakNetOriginalRPC = reinterpret_cast(RPCFunc); Unlock((void*)&((int*)(*(void**)pRakServer))[RAKNET_RPC_OFFSET], 4); ((int*)(*(void**)pRakServer))[RAKNET_RPC_OFFSET] = (int)CHookRakServer::RPC; -} \ No newline at end of file +}