compat: Support for GMod mini-source-sdk
continuous-integration/drone/push Build encountered an error Details

This commit is contained in:
Joshua Ashton 2023-04-10 01:24:51 +01:00
parent a7fece4d4e
commit ae995e24bf
4 changed files with 49 additions and 1 deletions

View File

@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
source_branch: [sdk2013-sp, sdk2013-mp, asw]
source_branch: [sdk2013-sp, sdk2013-mp, asw, gmod]
runs-on: windows-2022

View File

@ -10,6 +10,15 @@
#define override_not_csgo override
#endif
// GMod SDK2013 x86 branch
#if defined( GAME_GMOD )
#define override_gmod override
#define override_not_gmod
#else
#define override_gmod
#define override_not_gmod override
#endif
#if defined( GAME_CSGO ) || defined( GAME_DESOLATION ) || defined( GAME_PORTAL2 )
#define GAME_PORTAL2_OR_NEWER
#define override_portal2 override

View File

@ -234,6 +234,38 @@ KeyValues *JoltPhysicsSurfaceProps::SurfacePropsToKeyValues( const char *pszBuff
//-------------------------------------------------------------------------------------------------
void *JoltPhysicsSurfaceProps::GetIVPMaterial( int nIndex )
{
Log_Stub( LOG_VJolt );
return nullptr;
}
int JoltPhysicsSurfaceProps::GetIVPMaterialIndex( const void *pMaterial ) const
{
Log_Stub( LOG_VJolt );
return (int)(uintp)( pMaterial );
}
void *JoltPhysicsSurfaceProps::GetIVPManager( void )
{
Log_Stub( LOG_VJolt );
return nullptr;
}
int JoltPhysicsSurfaceProps::RemapIVPMaterialIndex( int nIndex ) const
{
Log_Stub( LOG_VJolt );
return nIndex;
}
const char *JoltPhysicsSurfaceProps::GetReservedMaterialName( int nMaterialIndex ) const
{
Log_Stub( LOG_VJolt );
return "default";
}
//-------------------------------------------------------------------------------------------------
JoltPhysicsMaterialIndexSaveOps JoltPhysicsMaterialIndexSaveOps::s_Instance;
void JoltPhysicsMaterialIndexSaveOps::Save( const SaveRestoreFieldInfo_t &fieldInfo, ISave *pSave )

View File

@ -43,6 +43,13 @@ public:
ISaveRestoreOps *GetMaterialIndexDataOps() const override_portal2;
// GMod-specific internal gubbins that was exposed in the public interface.
void *GetIVPMaterial( int nIndex ) override_gmod;
int GetIVPMaterialIndex( const void *pMaterial ) const override_gmod;
void *GetIVPManager( void ) override_gmod;
int RemapIVPMaterialIndex( int nIndex ) const override_gmod;
const char *GetReservedMaterialName( int nMaterialIndex ) const override_gmod;
public:
static JoltPhysicsSurfaceProps& GetInstance() { return s_PhysicsSurfaceProps; }