Split PVKII into its own engine branch (#1847)
* Initial PVKII branch support * Change PVKII code to 23, DOTA uses 22 in MM * Bunch more SE_PVKII preprocessor that was missed * Add some missing SOURCE_ENGINE_PVKII cases * Update PVKII FireOutput signature for Linux * Update checkout-deps with 'pvkii' * Fix FireOutput signature for PVKII, accidentally used one from newer build * Change PVKII code to 10, and bump others by 1 * Only check against SE_SDK2013 here, like Metamod * More SE_PVKII preprocessor cleanup
This commit is contained in:
+5
-3
@@ -184,7 +184,8 @@ void CHalfLife2::InitLogicalEntData()
|
||||
|| SOURCE_ENGINE == SE_SDK2013 \
|
||||
|| SOURCE_ENGINE == SE_BMS \
|
||||
|| SOURCE_ENGINE == SE_BLADE \
|
||||
|| SOURCE_ENGINE == SE_NUCLEARDAWN
|
||||
|| SOURCE_ENGINE == SE_NUCLEARDAWN \
|
||||
|| SOURCE_ENGINE == SE_PVKII
|
||||
|
||||
if (g_SMAPI->GetServerFactory(false)("VSERVERTOOLS003", nullptr))
|
||||
{
|
||||
@@ -1339,7 +1340,7 @@ SMFindMapResult CHalfLife2::FindMap(const char *pMapName, char *pFoundMap, size_
|
||||
}
|
||||
|
||||
#elif SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM \
|
||||
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_BMS
|
||||
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_PVKII
|
||||
static IVEngineServer *engine23 = (IVEngineServer *)(g_SMAPI->GetEngineFactory()("VEngineServer023", nullptr));
|
||||
if (engine23)
|
||||
{
|
||||
@@ -1526,7 +1527,8 @@ uint64_t CHalfLife2::GetServerSteamId64() const
|
||||
|| SOURCE_ENGINE == SE_DOI \
|
||||
|| SOURCE_ENGINE == SE_SDK2013 \
|
||||
|| SOURCE_ENGINE == SE_ALIENSWARM \
|
||||
|| SOURCE_ENGINE == SE_TF2
|
||||
|| SOURCE_ENGINE == SE_TF2 \
|
||||
|| SOURCE_ENGINE == SE_PVKII
|
||||
const CSteamID *sid = engine->GetGameServerSteamID();
|
||||
if (sid)
|
||||
{
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ using namespace SourceMod;
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_INSURGENCY || SOURCE_ENGINE == SE_DOI
|
||||
#define SOURCE_BIN_PREFIX "lib"
|
||||
#define SOURCE_BIN_SUFFIX "_srv"
|
||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD
|
||||
#elif SOURCE_ENGINE >= SE_LEFT4DEAD || SOURCE_ENGINE == SE_PVKII
|
||||
#define SOURCE_BIN_PREFIX "lib"
|
||||
#define SOURCE_BIN_SUFFIX ""
|
||||
#else
|
||||
|
||||
@@ -339,7 +339,7 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
|
||||
0,
|
||||
PITCH_NORM,
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS \
|
||||
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2
|
||||
|| SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_PVKII
|
||||
0,
|
||||
#endif
|
||||
&pos);
|
||||
|
||||
@@ -646,7 +646,7 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
|
||||
int userId = engine->GetPlayerUserId(pEntity);
|
||||
#if (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 \
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_PVKII)
|
||||
static ConVar *tv_name = icvar->FindVar("tv_name");
|
||||
#endif
|
||||
#if SOURCE_ENGINE == SE_TF2
|
||||
@@ -674,7 +674,7 @@ void PlayerManager::OnClientPutInServer(edict_t *pEntity, const char *playername
|
||||
#elif SOURCE_ENGINE == SE_BLADE
|
||||
|| strcmp(playername, "BBTV") == 0
|
||||
#elif (SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_SDK2013 \
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_NUCLEARDAWN || SOURCE_ENGINE == SE_LEFT4DEAD2 || SOURCE_ENGINE == SE_PVKII)
|
||||
|| (tv_name && strcmp(playername, tv_name->GetString()) == 0) || (tv_name && tv_name->GetString()[0] == 0 && strcmp(playername, "unnamed") == 0)
|
||||
#else
|
||||
|| strcmp(playername, "SourceTV") == 0
|
||||
@@ -2087,7 +2087,8 @@ void CPlayer::Initialize(const char *name, const char *ip, edict_t *pEntity)
|
||||
|| SOURCE_ENGINE == SE_BMS \
|
||||
|| SOURCE_ENGINE == SE_INSURGENCY \
|
||||
|| SOURCE_ENGINE == SE_DOI \
|
||||
|| SOURCE_ENGINE == SE_BLADE
|
||||
|| SOURCE_ENGINE == SE_BLADE \
|
||||
|| SOURCE_ENGINE == SE_PVKII
|
||||
m_pIClient = engine->GetIServer()->GetClient(m_iIndex - 1);
|
||||
#else
|
||||
#if SOURCE_ENGINE == SE_SDK2013
|
||||
|
||||
@@ -371,6 +371,8 @@ void UTIL_ConsolePrint(const char *fmt, ...)
|
||||
#define GAMEFIX "2.csgo"
|
||||
#elif SOURCE_ENGINE == SE_CONTAGION
|
||||
#define GAMEFIX "2.contagion"
|
||||
#elif SOURCE_ENGINE == SE_PVKII
|
||||
#define GAMEFIX "2.pvkii"
|
||||
#else
|
||||
#define GAMEFIX "2.ep1"
|
||||
#endif
|
||||
@@ -495,6 +497,8 @@ const char *CoreProviderImpl::GetSourceEngineName()
|
||||
return "csgo";
|
||||
#elif SOURCE_ENGINE == SE_MOCK
|
||||
return "mock";
|
||||
#elif SOURCE_ENGINE == SE_PVKII
|
||||
return "pvkii";
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -512,7 +516,8 @@ bool CoreProviderImpl::SymbolsAreHidden()
|
||||
|| (SOURCE_ENGINE == SE_INSURGENCY) \
|
||||
|| (SOURCE_ENGINE == SE_DOI) \
|
||||
|| (SOURCE_ENGINE == SE_BLADE) \
|
||||
|| (SOURCE_ENGINE == SE_CSGO)
|
||||
|| (SOURCE_ENGINE == SE_CSGO) \
|
||||
|| (SOURCE_ENGINE == SE_PVKII)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
||||
@@ -1458,7 +1458,7 @@ static cell_t GetEntProp(IPluginContext *pContext, const cell_t *params)
|
||||
// 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_HL2DM || SOURCE_ENGINE == SE_DODS \
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 \
|
||||
|| SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
|| SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_PVKII
|
||||
if (pProp->GetFlags() & SPROP_VARINT)
|
||||
{
|
||||
bit_count = sizeof(int) * 8;
|
||||
@@ -1577,7 +1577,7 @@ static cell_t SetEntProp(IPluginContext *pContext, const cell_t *params)
|
||||
// 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_HL2DM || SOURCE_ENGINE == SE_DODS \
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_SDK2013 || SOURCE_ENGINE == SE_TF2 \
|
||||
|| SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
|| SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_PVKII
|
||||
if (pProp->GetFlags() & SPROP_VARINT)
|
||||
{
|
||||
bit_count = sizeof(int) * 8;
|
||||
@@ -2508,7 +2508,7 @@ static int32_t SDKEntFlagToSMEntFlag(int flag)
|
||||
case FL_FREEZING:
|
||||
return ENTFLAG_FREEZING;
|
||||
#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_PVKII
|
||||
case FL_EP2V_UNKNOWN:
|
||||
return ENTFLAG_EP2V_UNKNOWN1;
|
||||
#endif
|
||||
@@ -2587,7 +2587,7 @@ static int32_t SMEntFlagToSDKEntFlag(int32_t flag)
|
||||
case ENTFLAG_FREEZING:
|
||||
return FL_FREEZING;
|
||||
#elif SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_SDK2013 \
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2
|
||||
|| SOURCE_ENGINE == SE_BMS || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_PVKII
|
||||
case ENTFLAG_EP2V_UNKNOWN1:
|
||||
return FL_EP2V_UNKNOWN;
|
||||
#endif
|
||||
|
||||
@@ -505,6 +505,7 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||
case SOURCE_ENGINE_TF2:
|
||||
case SOURCE_ENGINE_BMS:
|
||||
case SOURCE_ENGINE_SDK2013:
|
||||
case SOURCE_ENGINE_PVKII:
|
||||
return 35;
|
||||
case SOURCE_ENGINE_LEFT4DEAD:
|
||||
return 40;
|
||||
|
||||
@@ -70,7 +70,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
|
||||
PLUGIN_SAVEVARS();
|
||||
|
||||
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||
#if SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
|
||||
#if SOURCE_ENGINE == SE_SDK2013
|
||||
// Shim to avoid hooking shims
|
||||
engine = (IVEngineServer *)ismm->GetEngineFactory()("VEngineServer023", nullptr);
|
||||
if (!engine)
|
||||
|
||||
Reference in New Issue
Block a user