NPOTB: Clarify preprocessor logic (#900)
This commit is contained in:
parent
a21c7564c1
commit
a9ca1a2fd6
@ -126,7 +126,7 @@ DETOUR_DECL_MEMBER0(DetourWeaponPrice, int)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SOURCE_ENGINE != SE_CSGO
|
#if SOURCE_ENGINE == SE_CSS
|
||||||
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
||||||
{
|
{
|
||||||
if (g_pIgnoreTerminateDetour)
|
if (g_pIgnoreTerminateDetour)
|
||||||
@ -135,7 +135,7 @@ DETOUR_DECL_MEMBER2(DetourTerminateRound, void, float, delay, int, reason)
|
|||||||
DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
|
DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#elif !defined(WIN32)
|
#elif SOURCE_ENGINE == SE_CSGO && !defined(WIN32)
|
||||||
DETOUR_DECL_MEMBER4(DetourTerminateRound, void, float, delay, int, reason, int, unknown, int, unknown2)
|
DETOUR_DECL_MEMBER4(DetourTerminateRound, void, float, delay, int, reason, int, unknown, int, unknown2)
|
||||||
{
|
{
|
||||||
if (g_pIgnoreTerminateDetour)
|
if (g_pIgnoreTerminateDetour)
|
||||||
@ -189,12 +189,12 @@ DETOUR_DECL_MEMBER3(DetourTerminateRound, void, int, reason, int, unknown, int,
|
|||||||
reason++;
|
reason++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SOURCE_ENGINE != SE_CSGO
|
#if SOURCE_ENGINE == SE_CSS
|
||||||
if (result == Pl_Changed)
|
if (result == Pl_Changed)
|
||||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
|
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason);
|
||||||
|
|
||||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgdelay, orgreason);
|
return DETOUR_MEMBER_CALL(DetourTerminateRound)(orgdelay, orgreason);
|
||||||
#elif !defined(WIN32)
|
#elif SOURCE_ENGINE == SE_CSGO && !defined(WIN32)
|
||||||
if (result == Pl_Changed)
|
if (result == Pl_Changed)
|
||||||
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason, unknown, unknown2);
|
return DETOUR_MEMBER_CALL(DetourTerminateRound)(delay, reason, unknown, unknown2);
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
|||||||
reason++;
|
reason++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if SOURCE_ENGINE != SE_CSGO
|
#if SOURCE_ENGINE == SE_CSS
|
||||||
static ICallWrapper *pWrapper = NULL;
|
static ICallWrapper *pWrapper = NULL;
|
||||||
|
|
||||||
if (!pWrapper)
|
if (!pWrapper)
|
||||||
@ -343,7 +343,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
|||||||
*(int*)vptr = reason;
|
*(int*)vptr = reason;
|
||||||
|
|
||||||
pWrapper->Execute(vstk, NULL);
|
pWrapper->Execute(vstk, NULL);
|
||||||
#elif !defined(WIN32)
|
#elif SOURCE_ENGINE == SE_CSGO && !defined(WIN32)
|
||||||
static ICallWrapper *pWrapper = NULL;
|
static ICallWrapper *pWrapper = NULL;
|
||||||
|
|
||||||
if (!pWrapper)
|
if (!pWrapper)
|
||||||
@ -382,7 +382,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
|
|||||||
*(int*)vptr = 0;
|
*(int*)vptr = 0;
|
||||||
|
|
||||||
pWrapper->Execute(vstk, NULL);
|
pWrapper->Execute(vstk, NULL);
|
||||||
#else
|
#else // CSGO Win32
|
||||||
static void *addr = NULL;
|
static void *addr = NULL;
|
||||||
|
|
||||||
if(!addr)
|
if(!addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user