Initial Mapbase commit (squashed from mapbase-beta)

This commit is contained in:
Blixibon
2019-08-31 19:28:20 +00:00
parent 0d8dceea43
commit 3d464bc051
816 changed files with 105527 additions and 957 deletions

View File

@@ -147,6 +147,11 @@
#include "fbxsystem/fbxsystem.h"
#endif
#ifdef DISCORD_RPC
#include "discord_rpc.h"
#include <time.h>
#endif
extern vgui::IInputInternal *g_InputInternal;
//=============================================================================
@@ -335,6 +340,13 @@ static ConVar s_cl_class("cl_class", "default", FCVAR_USERINFO|FCVAR_ARCHIVE, "D
static ConVar s_cl_load_hl1_content("cl_load_hl1_content", "0", FCVAR_ARCHIVE, "Mount the content from Half-Life: Source if possible");
#endif
#ifdef MAPBASE_RPC
// Mapbase stuff
extern void MapbaseRPC_Init();
extern void MapbaseRPC_Shutdown();
extern void MapbaseRPC_Update( int iType, const char *pMapName );
#endif
// Physics system
bool g_bLevelInitialized;
@@ -843,6 +855,7 @@ CHLClient::CHLClient()
}
extern IGameSystem *ViewportClientSystem();
@@ -1085,6 +1098,10 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi
HookHapticMessages(); // Always hook the messages
#endif
#ifdef MAPBASE_RPC
MapbaseRPC_Init();
#endif
return true;
}
@@ -1209,6 +1226,10 @@ void CHLClient::Shutdown( void )
DisconnectDataModel();
ShutdownFbx();
#endif
#ifdef MAPBASE_RPC
MapbaseRPC_Shutdown();
#endif
// This call disconnects the VGui libraries which we rely on later in the shutdown path, so don't do it
// DisconnectTier3Libraries( );
@@ -1622,6 +1643,13 @@ void CHLClient::LevelInitPreEntity( char const* pMapName )
}
#endif
#ifdef MAPBASE_RPC
if (!g_bTextMode)
{
MapbaseRPC_Update(RPCSTATE_LEVEL_INIT, pMapName);
}
#endif
// Check low violence settings for this map
g_RagdollLVManager.SetLowViolence( pMapName );
@@ -1713,6 +1741,13 @@ void CHLClient::LevelShutdown( void )
gHUD.LevelShutdown();
#ifdef MAPBASE_RPC
if (!g_bTextMode)
{
MapbaseRPC_Update(RPCSTATE_LEVEL_SHUTDOWN, NULL);
}
#endif
internalCenterPrint->Clear();
messagechars->Clear();
@@ -2143,7 +2178,9 @@ void OnRenderStart()
// are at the correct location
view->OnRenderStart();
#ifndef MAPBASE
RopeManager()->OnRenderStart();
#endif
// This will place all entities in the correct position in world space and in the KD-tree
C_BaseAnimating::UpdateClientSideAnimations();