Split TF2, DoD:S, HL2:DM, and ND to separate binaries (bug 5813, r=asherkin).
This commit is contained in:
@@ -148,7 +148,7 @@ SH_DECL_MANUALHOOK0_void(Spawn, 0, 0, 0);
|
||||
SH_DECL_MANUALHOOK1_void(StartTouch, 0, 0, 0, CBaseEntity *);
|
||||
SH_DECL_MANUALHOOK0_void(Think, 0, 0, 0);
|
||||
SH_DECL_MANUALHOOK1_void(Touch, 0, 0, 0, CBaseEntity *);
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
||||
SH_DECL_MANUALHOOK4_void(TraceAttack, 0, 0, 0, CTakeDamageInfoHack &, const Vector &, CGameTrace *, void *);
|
||||
#else
|
||||
SH_DECL_MANUALHOOK3_void(TraceAttack, 0, 0, 0, CTakeDamageInfoHack &, const Vector &, CGameTrace *);
|
||||
@@ -1244,7 +1244,7 @@ void SDKHooks::Hook_TouchPost(CBaseEntity *pOther)
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
||||
void SDKHooks::Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, void *pUnknownJK)
|
||||
#else
|
||||
void SDKHooks::Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr)
|
||||
@@ -1309,7 +1309,7 @@ void SDKHooks::Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir,
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
||||
void SDKHooks::Hook_TraceAttackPost(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, void *pUnknownJK)
|
||||
#else
|
||||
void SDKHooks::Hook_TraceAttackPost(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#if SOURCE_ENGINE >= SE_CSS && SOURCE_ENGINE != SE_LEFT4DEAD
|
||||
#define GETMAXHEALTH_IS_VIRTUAL
|
||||
#endif
|
||||
#if SOURCE_ENGINE != SE_ORANGEBOXVALVE && SOURCE_ENGINE != SE_CSS && SOURCE_ENGINE != SE_LEFT4DEAD2 && SOURCE_ENGINE != SE_CSGO
|
||||
#if SOURCE_ENGINE != SE_HL2DM && SOURCE_ENGINE != SE_DODS && SOURCE_ENGINE != SE_CSS && SOURCE_ENGINE != SE_TF2 && SOURCE_ENGINE != SE_LEFT4DEAD2 && SOURCE_ENGINE != SE_CSGO && SOURCE_ENGINE != SE_NUCLEARDAWN
|
||||
#define GAMEDESC_CAN_CHANGE
|
||||
#endif
|
||||
|
||||
@@ -264,7 +264,7 @@ public:
|
||||
void Hook_ThinkPost();
|
||||
void Hook_Touch(CBaseEntity *pOther);
|
||||
void Hook_TouchPost(CBaseEntity *pOther);
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
||||
void Hook_TraceAttack(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, void *pUnknownJK);
|
||||
void Hook_TraceAttackPost(CTakeDamageInfoHack &info, const Vector &vecDir, trace_t *ptr, void *pUnknownJK);
|
||||
#else
|
||||
|
||||
@@ -62,7 +62,7 @@ CTakeDamageInfoHack::CTakeDamageInfoHack( CBaseEntity *pInflictor, CBaseEntity *
|
||||
m_vecReportedPosition = vec3_origin;
|
||||
m_iAmmoType = -1;
|
||||
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
m_iDamagedOtherPlayers = 0;
|
||||
m_iPlayerPenetrateCount = 0;
|
||||
m_flUnknown = 0.0f;
|
||||
|
||||
@@ -174,7 +174,7 @@ static cell_t GameRules_GetProp(IPluginContext *pContext, const cell_t *params)
|
||||
is_unsigned = ((pProp->GetFlags() & SPROP_UNSIGNED) == SPROP_UNSIGNED);
|
||||
|
||||
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
if (pProp->GetFlags() & SPROP_VARINT)
|
||||
{
|
||||
bit_count = sizeof(int) * 8;
|
||||
@@ -243,8 +243,7 @@ static cell_t GameRules_SetProp(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
FIND_PROP_SEND(DPT_Int, "integer");
|
||||
|
||||
// This isn't in CS:S yet, but will be, doesn't hurt to add now, and will save us a build later
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
if (pProp->GetFlags() & SPROP_VARINT)
|
||||
{
|
||||
bit_count = sizeof(int) * 8;
|
||||
|
||||
@@ -129,7 +129,7 @@ static cell_t PrepSDKCall_SetSignature(IPluginContext *pContext, const cell_t *p
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#if (SOURCE_ENGINE == SE_CSS) || (SOURCE_ENGINE == SE_ORANGEBOXVALVE) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2) || (SOURCE_ENGINE == SE_CSGO)
|
||||
#if (SOURCE_ENGINE == SE_CSS) || (SOURCE_ENGINE == SE_HL2DM) || (SOURCE_ENGINE == SE_DODS) || (SOURCE_ENGINE == SE_TF2) || (SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2) || (SOURCE_ENGINE == SE_NUCLEARDAWN) || (SOURCE_ENGINE == SE_CSGO)
|
||||
s_call_addr = memutils->ResolveSymbol(handle, &sig[1]);
|
||||
#else
|
||||
s_call_addr = dlsym(handle, &sig[1]);
|
||||
|
||||
@@ -532,7 +532,7 @@ static cell_t SlapPlayer(IPluginContext *pContext, const cell_t *params)
|
||||
CellRecipientFilter rf;
|
||||
rf.SetToReliable(true);
|
||||
rf.Initialize(player_list, total_players);
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, 0, &pos);
|
||||
#elif SOURCE_ENGINE < SE_PORTAL2
|
||||
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, &pos);
|
||||
|
||||
@@ -41,7 +41,7 @@ SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const
|
||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
||||
SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 0, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 1, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
#else
|
||||
@@ -288,7 +288,7 @@ int SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChanne
|
||||
float flVolume, soundlevel_t iSoundlevel, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity)
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
|
||||
float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
@@ -349,7 +349,7 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
|
||||
(crf, iEntIndex, iChannel, buffer, -1, buffer, flVolume, iSoundlevel, nSeed, iFlags, iPitch, pOrigin,
|
||||
pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
|
||||
);
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
RETURN_META_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, soundlevel_t,
|
||||
@@ -380,7 +380,7 @@ int SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChann
|
||||
float flVolume, float flAttenuation, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity)
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
|
||||
float flVolume, float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
@@ -442,7 +442,7 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan
|
||||
(crf, iEntIndex, iChannel, buffer, -1, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)),
|
||||
nSeed, iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
|
||||
);
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
RETURN_META_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char *, float, float,
|
||||
@@ -711,7 +711,7 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
SH_CALL(enginesoundPatch,
|
||||
@@ -839,7 +839,7 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#elif SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
SH_CALL(enginesoundPatch,
|
||||
@@ -1012,7 +1012,7 @@ static cell_t EmitSentence(IPluginContext *pContext, const cell_t *params)
|
||||
#endif
|
||||
flags,
|
||||
pitch,
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
0,
|
||||
#endif
|
||||
pOrigin,
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity);
|
||||
#else
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
|
||||
void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
|
||||
soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity);
|
||||
#endif // SOURCE_ENGINE == SE_ORANGEBOXVALVE || SOURCE_ENGINE == SE_CSS
|
||||
#endif // SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2
|
||||
#endif // SOURCE_ENGINE >= SE_PORTAL2
|
||||
private:
|
||||
size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
import os
|
||||
if 'ep2v' in SM.sdkInfo:
|
||||
sdk = SM.sdkInfo['ep2v']
|
||||
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'ep2v')
|
||||
if 'tf2' in SM.sdkInfo:
|
||||
sdk = SM.sdkInfo['tf2']
|
||||
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'tf2')
|
||||
|
||||
name = 'game.tf2.ext.' + sdk['ext']
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
SM.PreSetupHL2Job(extension, binary, 'ep2v')
|
||||
SM.PreSetupHL2Job(extension, binary, 'tf2')
|
||||
binary.AddSourceFiles('extensions/tf2', [
|
||||
'extension.cpp',
|
||||
'natives.cpp',
|
||||
@@ -22,7 +22,7 @@ if 'ep2v' in SM.sdkInfo:
|
||||
'sdk/smsdk_ext.cpp',
|
||||
'asm/asm.c'
|
||||
])
|
||||
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
||||
SM.PostSetupHL2Job(extension, binary, 'tf2')
|
||||
SM.AutoVersion('extensions/tf2', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
binary.SendToJob()
|
||||
|
||||
Reference in New Issue
Block a user