diff --git a/rehlds/engine/common.h b/rehlds/engine/common.h
index 2f4eb0c..49650a2 100644
--- a/rehlds/engine/common.h
+++ b/rehlds/engine/common.h
@@ -117,6 +117,7 @@ extern int loadsize;
#define _strlwr(p) for (int i = 0; p[i] != 0; i++) p[i] = tolower(p[i]);
#endif
+#if defined(REHLDS_OPT_PEDANTIC) || defined(REHLDS_FIXES)
#define Q_memset A_memset
#define Q_memcpy A_memcpy
#define Q_memmove A_memmove
@@ -143,6 +144,34 @@ extern int loadsize;
//#define Q_strtoull strtoull
//#define Q_FileNameCmp FileNameCmp
#define Q_vsnprintf _vsnprintf
+#else
+#define Q_memset memset
+#define Q_memcpy memcpy
+#define Q_memmove memmove
+#define Q_strlen strlen
+#define Q_memcmp memcmp
+#define Q_strcpy strcpy
+#define Q_strncpy strncpy
+#define Q_strrchr strrchr
+#define Q_strcat strcat
+#define Q_strncat strncat
+#define Q_strcmp strcmp
+#define Q_strncmp strncmp
+//#define Q_strcasecmp _stricmp // Use Q_stricmp
+//#define Q_strncasecmp _strnicmp // Use Q_strnicmp
+#define Q_stricmp _stricmp
+#define Q_strnicmp _strnicmp
+#define Q_strstr strstr
+#define Q_strchr strchr
+#define Q_strlwr _strlwr
+#define Q_sprintf sprintf
+#define Q_snprintf _snprintf
+#define Q_atoi atoi
+#define Q_atof atof
+//#define Q_strtoull strtoull
+//#define Q_FileNameCmp FileNameCmp
+#define Q_vsnprintf _vsnprintf
+#endif // defined(REHLDS_OPT_PEDANTIC) || defined(REHLDS_FIXES)
#else // Q_functions
diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp
index af56d1f..87ea03e 100644
--- a/rehlds/engine/sv_main.cpp
+++ b/rehlds/engine/sv_main.cpp
@@ -2480,7 +2480,7 @@ void SVC_GetChallenge(void)
int challenge = SV_GetChallenge(net_from);
if (steam)
- Q_snprintf(data, sizeof(data), "\xFF\xFF\xFF\xFF%c00000000 %u 3 %I64i %d\n", S2C_CHALLENGE, challenge, Steam_GSGetSteamID(), Steam_GSBSecure());
+ Q_snprintf(data, sizeof(data), "\xFF\xFF\xFF\xFF%c00000000 %u 3 %lld %d\n", S2C_CHALLENGE, challenge, Steam_GSGetSteamID(), Steam_GSBSecure());
else
{
Con_DPrintf("Server requiring authentication\n");
diff --git a/rehlds/engine/sv_user.cpp b/rehlds/engine/sv_user.cpp
index b969bb0..23f1cae 100644
--- a/rehlds/engine/sv_user.cpp
+++ b/rehlds/engine/sv_user.cpp
@@ -106,7 +106,7 @@ clc_func_t sv_clcfuncs[12];
#endif //HOOK_ENGINE
-bool EXT_FUNC SV_CheckConsistencyResponce_API(IGameClient *client, resource_t *res, uint32 hash) {
+bool EXT_FUNC SV_CheckConsistencyResponse_API(IGameClient *client, resource_t *res, uint32 hash) {
return (hash != *(uint32 *)&res->rgucMD5_hash[0]);
}
@@ -147,7 +147,7 @@ void SV_ParseConsistencyResponse(client_t *pSenderClient)
if (!Q_memcmp(resbuffer, nullbuffer, sizeof(resbuffer)))
{
uint32 hash = MSG_ReadBits(32);
- if (g_RehldsHookchains.m_SV_CheckConsistencyResponce.callChain(SV_CheckConsistencyResponce_API, GetRehldsApiClient(pSenderClient), r, hash))
+ if (g_RehldsHookchains.m_SV_CheckConsistencyResponse.callChain(SV_CheckConsistencyResponse_API, GetRehldsApiClient(pSenderClient), r, hash))
c = idx + 1;
}
else
diff --git a/rehlds/msvc/ReHLDS.vcxproj b/rehlds/msvc/ReHLDS.vcxproj
index e2d3e68..f39bb63 100644
--- a/rehlds/msvc/ReHLDS.vcxproj
+++ b/rehlds/msvc/ReHLDS.vcxproj
@@ -154,6 +154,8 @@
true
true
true
+ true
+ true
true
@@ -732,7 +734,7 @@
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
@@ -798,7 +800,7 @@
Level3
Disabled
true
- REHLDS_FLIGHT_REC;REHLDS_OPT_PEDANTIC;REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)
+ REHLDS_FLIGHT_REC;REHLDS_SELF;HOOK_ENGINE;REHLDS_CHECKS;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)
Precise
/arch:IA32 %(AdditionalOptions)
MultiThreadedDebug
@@ -807,7 +809,7 @@
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
@@ -873,7 +875,7 @@
Level3
Disabled
true
- REHLDS_FLIGHT_REC;REHLDS_OPT_PEDANTIC;REHLDS_SELF;HOOK_ENGINE;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)
+ REHLDS_FLIGHT_REC;REHLDS_SELF;HOOK_ENGINE;USE_BREAKPAD_HANDLER;DEDICATED;SWDS;_CRT_SECURE_NO_WARNINGS;_DEBUG;%(PreprocessorDefinitions)
Precise
/arch:IA32 %(AdditionalOptions)
MultiThreadedDebug
@@ -882,7 +884,7 @@
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
@@ -917,7 +919,7 @@
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
@@ -952,7 +954,7 @@
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
@@ -992,7 +994,7 @@
true
true
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
@@ -1031,7 +1033,7 @@
true
true
true
- psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;%(AdditionalDependencies)
+ psapi.lib;ws2_32.lib;$(ProjectDir)../lib/steam_api.lib;$(ProjectDir)../lib/libacof32.lib;%(AdditionalDependencies)
diff --git a/rehlds/public/rehlds/eiface.h b/rehlds/public/rehlds/eiface.h
index 60266ec..8081743 100644
--- a/rehlds/public/rehlds/eiface.h
+++ b/rehlds/public/rehlds/eiface.h
@@ -493,7 +493,7 @@ typedef struct
// Return 1 if the packet is valid. Set response_buffer_size if you want to send a response packet. Incoming, it holds the max
// size of the response_buffer, so you must zero it out if you choose not to respond.
- int (*pfnConnectionlessPacket ) ( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size );
+ int (*pfnConnectionlessPacket ) ( const struct netadr_s *net_from_, const char *args, char *response_buffer, int *response_buffer_size );
// Enumerates player hulls. Returns 0 if the hull number doesn't exist, 1 otherwise
int (*pfnGetHullBounds) ( int hullnumber, float *mins, float *maxs );
diff --git a/rehlds/public/rehlds/rehlds_api.h b/rehlds/public/rehlds/rehlds_api.h
index f16d6bc..c9ee881 100644
--- a/rehlds/public/rehlds/rehlds_api.h
+++ b/rehlds/public/rehlds/rehlds_api.h
@@ -141,9 +141,9 @@ typedef IVoidHookChainRegistry IRehldsHook_SV_WriteFullClientUpdate;
typedef IVoidHookChainRegistry IRehldsHookRegistry_SV_WriteFullClientUpdate;
-//SV_CheckConsistencyResponce hook
-typedef IHookChain IRehldsHook_SV_CheckConsistencyResponce;
-typedef IHookChainRegistry IRehldsHookRegistry_SV_CheckConsistencyResponce;
+//SV_CheckConsistencyResponse hook
+typedef IHookChain IRehldsHook_SV_CheckConsistencyResponse;
+typedef IHookChainRegistry IRehldsHookRegistry_SV_CheckConsistencyResponse;
//SV_DropClient hook
typedef IVoidHookChain IRehldsHook_SV_DropClient;
@@ -183,7 +183,7 @@ public:
virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I() = 0;
virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I() = 0;
virtual IRehldsHookRegistry_SV_WriteFullClientUpdate* SV_WriteFullClientUpdate() = 0;
- virtual IRehldsHookRegistry_SV_CheckConsistencyResponce* SV_CheckConsistencyResponce() = 0;
+ virtual IRehldsHookRegistry_SV_CheckConsistencyResponse* SV_CheckConsistencyResponse() = 0;
virtual IRehldsHookRegistry_SV_DropClient* SV_DropClient() = 0;
virtual IRehldsHookRegistry_SV_ActivateServer* SV_ActivateServer() = 0;
};
diff --git a/rehlds/rehlds/rehlds_api_impl.cpp b/rehlds/rehlds/rehlds_api_impl.cpp
index a1790ea..624d8b5 100644
--- a/rehlds/rehlds/rehlds_api_impl.cpp
+++ b/rehlds/rehlds/rehlds_api_impl.cpp
@@ -260,8 +260,8 @@ IRehldsHookRegistry_SV_WriteFullClientUpdate* CRehldsHookchains::SV_WriteFullCli
return &m_SV_WriteFullClientUpdate;
}
-IRehldsHookRegistry_SV_CheckConsistencyResponce* CRehldsHookchains::SV_CheckConsistencyResponce() {
- return &m_SV_CheckConsistencyResponce;
+IRehldsHookRegistry_SV_CheckConsistencyResponse* CRehldsHookchains::SV_CheckConsistencyResponse() {
+ return &m_SV_CheckConsistencyResponse;
}
IRehldsHookRegistry_SV_DropClient* CRehldsHookchains::SV_DropClient() {
diff --git a/rehlds/rehlds/rehlds_api_impl.h b/rehlds/rehlds/rehlds_api_impl.h
index bbad6f3..298eed0 100644
--- a/rehlds/rehlds/rehlds_api_impl.h
+++ b/rehlds/rehlds/rehlds_api_impl.h
@@ -135,9 +135,9 @@ typedef IVoidHookChainRegistryImpl CRehldsHook_SV_WriteFullClientUpdate;
typedef IVoidHookChainRegistryImpl CRehldsHookRegistry_SV_WriteFullClientUpdate;
-//SV_CheckConsistencyResponce hook
-typedef IHookChainImpl CRehldsHook_SV_CheckConsistencyResponce;
-typedef IHookChainRegistryImpl CRehldsHookRegistry_SV_CheckConsistencyResponce;
+//SV_CheckConsistencyResponse hook
+typedef IHookChainImpl CRehldsHook_SV_CheckConsistencyResponse;
+typedef IHookChainRegistryImpl CRehldsHookRegistry_SV_CheckConsistencyResponse;
//SV_DropClient hook
typedef IVoidHookChainImpl CRehldsHook_SV_DropClient;
@@ -175,7 +175,7 @@ public:
CRehldsHookRegistry_PF_Remove_I m_PF_Remove_I;
CRehldsHookRegistry_PF_BuildSoundMsg_I m_PF_BuildSoundMsg_I;
CRehldsHookRegistry_SV_WriteFullClientUpdate m_SV_WriteFullClientUpdate;
- CRehldsHookRegistry_SV_CheckConsistencyResponce m_SV_CheckConsistencyResponce;
+ CRehldsHookRegistry_SV_CheckConsistencyResponse m_SV_CheckConsistencyResponse;
CRehldsHookRegistry_SV_DropClient m_SV_DropClient;
CRehldsHookRegistry_SV_ActivateServer m_SV_ActivateServer;
@@ -206,7 +206,7 @@ public:
virtual IRehldsHookRegistry_PF_Remove_I* PF_Remove_I();
virtual IRehldsHookRegistry_PF_BuildSoundMsg_I* PF_BuildSoundMsg_I();
virtual IRehldsHookRegistry_SV_WriteFullClientUpdate* SV_WriteFullClientUpdate();
- virtual IRehldsHookRegistry_SV_CheckConsistencyResponce* SV_CheckConsistencyResponce();
+ virtual IRehldsHookRegistry_SV_CheckConsistencyResponse* SV_CheckConsistencyResponse();
virtual IRehldsHookRegistry_SV_DropClient* SV_DropClient();
virtual IRehldsHookRegistry_SV_ActivateServer* SV_ActivateServer();
};