Mapbase v4.1

- Exposed CAmmoDef to VScript and changed ammo type functions accordingly
- Added TakeHealth and IsAlive to CBaseEntity
- Added $treeSway
- Added several inputs to control env_wind keyvalues + a new $treeSway scale keyvalue
- Added "Expanded name fixup" keyvalue to point_template which allows name fixup to fix up output parameters
- Fixed the rope on rappelling NPCs causing graphical issues
- Fixed prop_vehicle_prisoner_pod missing "EnterVehicle", "EnterVehicleImmediate", and "ExitVehicle" inputs
- Fixed hostile citizens not damaging player
- Fixed an uncommon npc_metropolice crash from when it's not in a squad
- Made SetTarget input update target handling on NPCs
- Changed ammo type functions to be more organized, added AmmoDef singleton
- Added more precache functions
- Added various misc. entity functions, like GetAllWeapons or AddOutput
- Added more utility functions
This commit is contained in:
Blixibon
2020-06-21 15:10:56 +00:00
parent 5b2547a6ff
commit 418a9dcccc
39 changed files with 923 additions and 67 deletions

View File

@@ -43,6 +43,27 @@ public:
m_bCOLOR_DEPTH = true;
#endif
}
private:
int m_nTREESWAY;
#ifdef _DEBUG
bool m_bTREESWAY;
#endif
public:
void SetTREESWAY( int i )
{
Assert( i >= 0 && i <= 2 );
m_nTREESWAY = i;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
void SetTREESWAY( bool i )
{
m_nTREESWAY = i ? 1 : 0;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
public:
sdk_depthwrite_vs20_Static_Index( )
{
@@ -54,19 +75,23 @@ public:
m_bCOLOR_DEPTH = false;
#endif // _DEBUG
m_nCOLOR_DEPTH = 0;
#ifdef _DEBUG
m_bTREESWAY = false;
#endif // _DEBUG
m_nTREESWAY = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllStaticVarsDefined = m_bONLY_PROJECT_POSITION && m_bCOLOR_DEPTH;
bool bAllStaticVarsDefined = m_bONLY_PROJECT_POSITION && m_bCOLOR_DEPTH && m_bTREESWAY;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 4 * m_nONLY_PROJECT_POSITION ) + ( 4 * m_nCOLOR_DEPTH ) + 0;
return ( 4 * m_nONLY_PROJECT_POSITION ) + ( 4 * m_nCOLOR_DEPTH ) + ( 8 * m_nTREESWAY ) + 0;
}
};
#define shaderStaticTest_sdk_depthwrite_vs20 vsh_forgot_to_set_static_ONLY_PROJECT_POSITION + vsh_forgot_to_set_static_COLOR_DEPTH + 0
#define shaderStaticTest_sdk_depthwrite_vs20 vsh_forgot_to_set_static_ONLY_PROJECT_POSITION + vsh_forgot_to_set_static_COLOR_DEPTH + vsh_forgot_to_set_static_TREESWAY + 0
class sdk_depthwrite_vs20_Dynamic_Index
{
private:

View File

@@ -43,6 +43,27 @@ public:
m_bCOLOR_DEPTH = true;
#endif
}
private:
int m_nTREESWAY;
#ifdef _DEBUG
bool m_bTREESWAY;
#endif
public:
void SetTREESWAY( int i )
{
Assert( i >= 0 && i <= 2 );
m_nTREESWAY = i;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
void SetTREESWAY( bool i )
{
m_nTREESWAY = i ? 1 : 0;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
public:
sdk_depthwrite_vs30_Static_Index( )
{
@@ -54,19 +75,23 @@ public:
m_bCOLOR_DEPTH = false;
#endif // _DEBUG
m_nCOLOR_DEPTH = 0;
#ifdef _DEBUG
m_bTREESWAY = false;
#endif // _DEBUG
m_nTREESWAY = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllStaticVarsDefined = m_bONLY_PROJECT_POSITION && m_bCOLOR_DEPTH;
bool bAllStaticVarsDefined = m_bONLY_PROJECT_POSITION && m_bCOLOR_DEPTH && m_bTREESWAY;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 8 * m_nONLY_PROJECT_POSITION ) + ( 8 * m_nCOLOR_DEPTH ) + 0;
return ( 8 * m_nONLY_PROJECT_POSITION ) + ( 8 * m_nCOLOR_DEPTH ) + ( 16 * m_nTREESWAY ) + 0;
}
};
#define shaderStaticTest_sdk_depthwrite_vs30 vsh_forgot_to_set_static_ONLY_PROJECT_POSITION + vsh_forgot_to_set_static_COLOR_DEPTH + 0
#define shaderStaticTest_sdk_depthwrite_vs30 vsh_forgot_to_set_static_ONLY_PROJECT_POSITION + vsh_forgot_to_set_static_COLOR_DEPTH + vsh_forgot_to_set_static_TREESWAY + 0
class sdk_depthwrite_vs30_Dynamic_Index
{
private:

View File

@@ -190,6 +190,27 @@ public:
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = true;
#endif
}
private:
int m_nTREESWAY;
#ifdef _DEBUG
bool m_bTREESWAY;
#endif
public:
void SetTREESWAY( int i )
{
Assert( i >= 0 && i <= 2 );
m_nTREESWAY = i;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
void SetTREESWAY( bool i )
{
m_nTREESWAY = i ? 1 : 0;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
public:
sdk_vertexlit_and_unlit_generic_vs20_Static_Index( )
{
@@ -229,19 +250,23 @@ public:
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = false;
#endif // _DEBUG
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = 0;
#ifdef _DEBUG
m_bTREESWAY = false;
#endif // _DEBUG
m_nTREESWAY = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllStaticVarsDefined = m_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bUSE_STATIC_CONTROL_FLOW && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR;
bool bAllStaticVarsDefined = m_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bUSE_STATIC_CONTROL_FLOW && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR && m_bTREESWAY;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 192 * m_nVERTEXCOLOR ) + ( 384 * m_nCUBEMAP ) + ( 768 * m_nHALFLAMBERT ) + ( 1536 * m_nFLASHLIGHT ) + ( 3072 * m_nSEAMLESS_BASE ) + ( 6144 * m_nSEAMLESS_DETAIL ) + ( 12288 * m_nSEPARATE_DETAIL_UVS ) + ( 24576 * m_nUSE_STATIC_CONTROL_FLOW ) + ( 49152 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + 0;
return ( 192 * m_nVERTEXCOLOR ) + ( 384 * m_nCUBEMAP ) + ( 768 * m_nHALFLAMBERT ) + ( 1536 * m_nFLASHLIGHT ) + ( 3072 * m_nSEAMLESS_BASE ) + ( 6144 * m_nSEAMLESS_DETAIL ) + ( 12288 * m_nSEPARATE_DETAIL_UVS ) + ( 24576 * m_nUSE_STATIC_CONTROL_FLOW ) + ( 49152 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + ( 98304 * m_nTREESWAY ) + 0;
}
};
#define shaderStaticTest_sdk_vertexlit_and_unlit_generic_vs20 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_USE_STATIC_CONTROL_FLOW + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR + 0
#define shaderStaticTest_sdk_vertexlit_and_unlit_generic_vs20 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_USE_STATIC_CONTROL_FLOW + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR + vsh_forgot_to_set_static_TREESWAY + 0
class sdk_vertexlit_and_unlit_generic_vs20_Dynamic_Index
{
private:

View File

@@ -211,6 +211,27 @@ public:
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = true;
#endif
}
private:
int m_nTREESWAY;
#ifdef _DEBUG
bool m_bTREESWAY;
#endif
public:
void SetTREESWAY( int i )
{
Assert( i >= 0 && i <= 2 );
m_nTREESWAY = i;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
void SetTREESWAY( bool i )
{
m_nTREESWAY = i ? 1 : 0;
#ifdef _DEBUG
m_bTREESWAY = true;
#endif
}
public:
sdk_vertexlit_and_unlit_generic_vs30_Static_Index( )
{
@@ -254,19 +275,23 @@ public:
m_bDONT_GAMMA_CONVERT_VERTEX_COLOR = false;
#endif // _DEBUG
m_nDONT_GAMMA_CONVERT_VERTEX_COLOR = 0;
#ifdef _DEBUG
m_bTREESWAY = false;
#endif // _DEBUG
m_nTREESWAY = 0;
}
int GetIndex()
{
// Asserts to make sure that we aren't using any skipped combinations.
// Asserts to make sure that we are setting all of the combination vars.
#ifdef _DEBUG
bool bAllStaticVarsDefined = m_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bDECAL && m_bSM30_VERTEXID && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR;
bool bAllStaticVarsDefined = m_bVERTEXCOLOR && m_bCUBEMAP && m_bHALFLAMBERT && m_bFLASHLIGHT && m_bSEAMLESS_BASE && m_bSEAMLESS_DETAIL && m_bSEPARATE_DETAIL_UVS && m_bDECAL && m_bSM30_VERTEXID && m_bDONT_GAMMA_CONVERT_VERTEX_COLOR && m_bTREESWAY;
Assert( bAllStaticVarsDefined );
#endif // _DEBUG
return ( 128 * m_nVERTEXCOLOR ) + ( 256 * m_nCUBEMAP ) + ( 512 * m_nHALFLAMBERT ) + ( 1024 * m_nFLASHLIGHT ) + ( 2048 * m_nSEAMLESS_BASE ) + ( 4096 * m_nSEAMLESS_DETAIL ) + ( 8192 * m_nSEPARATE_DETAIL_UVS ) + ( 16384 * m_nDECAL ) + ( 32768 * m_nSM30_VERTEXID ) + ( 65536 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + 0;
return ( 128 * m_nVERTEXCOLOR ) + ( 256 * m_nCUBEMAP ) + ( 512 * m_nHALFLAMBERT ) + ( 1024 * m_nFLASHLIGHT ) + ( 2048 * m_nSEAMLESS_BASE ) + ( 4096 * m_nSEAMLESS_DETAIL ) + ( 8192 * m_nSEPARATE_DETAIL_UVS ) + ( 16384 * m_nDECAL ) + ( 32768 * m_nSM30_VERTEXID ) + ( 65536 * m_nDONT_GAMMA_CONVERT_VERTEX_COLOR ) + ( 131072 * m_nTREESWAY ) + 0;
}
};
#define shaderStaticTest_sdk_vertexlit_and_unlit_generic_vs30 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_DECAL + vsh_forgot_to_set_static_SM30_VERTEXID + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR + 0
#define shaderStaticTest_sdk_vertexlit_and_unlit_generic_vs30 vsh_forgot_to_set_static_VERTEXCOLOR + vsh_forgot_to_set_static_CUBEMAP + vsh_forgot_to_set_static_HALFLAMBERT + vsh_forgot_to_set_static_FLASHLIGHT + vsh_forgot_to_set_static_SEAMLESS_BASE + vsh_forgot_to_set_static_SEAMLESS_DETAIL + vsh_forgot_to_set_static_SEPARATE_DETAIL_UVS + vsh_forgot_to_set_static_DECAL + vsh_forgot_to_set_static_SM30_VERTEXID + vsh_forgot_to_set_static_DONT_GAMMA_CONVERT_VERTEX_COLOR + vsh_forgot_to_set_static_TREESWAY + 0
class sdk_vertexlit_and_unlit_generic_vs30_Dynamic_Index
{
private: