Skip to content

Commit

Permalink
NPOTB: Clarify preprocessor logic (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
Headline committed Oct 5, 2018
1 parent a21c756 commit a9ca1a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions extensions/cstrike/forwards.cpp
Expand Up @@ -126,7 +126,7 @@ DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
}
#endif

#if SOURCE_ENGINE != SE_CSGO
#if SOURCE_ENGINE == SE_CSS
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
{
if (g_pIgnoreTerminateDetour)
Expand All @@ -135,7 +135,7 @@ DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
return;
}
#elif !defined(WIN32)
#elif SOURCE_ENGINE == SE_CSGO && !defined(WIN32)
DETOUR_DECL_MEMBER4(DetourTerminateRound, void, float, delay, int, reason, int, unknown, int, unknown2)
{
if (g_pIgnoreTerminateDetour)
Expand Down Expand Up @@ -189,12 +189,12 @@ DETOUR_DECL_MEMBER3(DetourTerminateRound, void, int, reason, int, unknown, int,
reason++;
#endif

#if SOURCE_ENGINE != SE_CSGO
#if SOURCE_ENGINE == SE_CSS
if (result == Pl_Changed)
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);

return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgdelay, orgreason);
#elif !defined(WIN32)
#elif SOURCE_ENGINE == SE_CSGO && !defined(WIN32)
if (result == Pl_Changed)
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason, unknown, unknown2);

Expand Down
6 changes: 3 additions & 3 deletions extensions/cstrike/natives.cpp
Expand Up @@ -314,7 +314,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
reason++;
#endif

#if SOURCE_ENGINE != SE_CSGO
#if SOURCE_ENGINE == SE_CSS
static ICallWrapper *pWrapper = NULL;

if (!pWrapper)
Expand Down Expand Up @@ -343,7 +343,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
*(int*)vptr = reason;

pWrapper->Execute(vstk, NULL);
#elif !defined(WIN32)
#elif SOURCE_ENGINE == SE_CSGO && !defined(WIN32)
static ICallWrapper *pWrapper = NULL;

if (!pWrapper)
Expand Down Expand Up @@ -382,7 +382,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
*(int*)vptr = 0;

pWrapper->Execute(vstk, NULL);
#else
#else // CSGO Win32
static void *addr = NULL;

if(!addr)
Expand Down

0 comments on commit a9ca1a2

Please sign in to comment.