mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Merged dev changes 10/24/2019
- Applied the nexttoken security fix (suggested by ficool2, important for MP port, no #ifdef MAPBASE because of volume of changes and irrelevance to readers) - Fixed a crash with the follower wait point start/stop using handlers - Fixed game_ui activator crash - Changed vphysics triggers to accept more entities - Fixed player squadmates not obeying hint node facing (e.g. wait points) - Fixed npc_snipers - prop_vehicle_jeep_old no longer changes classname - Restored and added the other CTakeDamageInfo fields for point_damageinfo - Fixed game_metadata not saving correctly - Fixed logic_measure_movement not functioning while possessing spawnflags - Added scripts/mapbase_rpc.txt script with choosable app ID and game image - Fixed some casing that broke Linux support - Added proper WorldVertexTransition blending to translucency and selfillum (translucency may need the translucent texture to be $basetexture, not $basetexture2) - Added modified parallax corrected cubemaps to shader code (although currently unusable) - Fixed Variant_ParseInput - Added/restored custom scanner speed (experimental, needs more work) - Several miscellaneous code changes/fixes and comment adjustments
This commit is contained in:
@@ -303,7 +303,7 @@ private:
|
||||
public:
|
||||
void SetFANCY_BLENDING( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 2 );
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nFANCY_BLENDING = i;
|
||||
#ifdef _DEBUG
|
||||
m_bFANCY_BLENDING = true;
|
||||
@@ -442,6 +442,48 @@ public:
|
||||
m_bBASETEXTURETRANSFORM2 = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSWAP_VERTEX_BLEND;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSWAP_VERTEX_BLEND;
|
||||
#endif
|
||||
public:
|
||||
void SetSWAP_VERTEX_BLEND( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSWAP_VERTEX_BLEND = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSWAP_VERTEX_BLEND = true;
|
||||
#endif
|
||||
}
|
||||
void SetSWAP_VERTEX_BLEND( bool i )
|
||||
{
|
||||
m_nSWAP_VERTEX_BLEND = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSWAP_VERTEX_BLEND = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nPARALLAXCORRECT;
|
||||
#ifdef _DEBUG
|
||||
bool m_bPARALLAXCORRECT;
|
||||
#endif
|
||||
public:
|
||||
void SetPARALLAXCORRECT( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nPARALLAXCORRECT = i;
|
||||
#ifdef _DEBUG
|
||||
m_bPARALLAXCORRECT = true;
|
||||
#endif
|
||||
}
|
||||
void SetPARALLAXCORRECT( bool i )
|
||||
{
|
||||
m_nPARALLAXCORRECT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPARALLAXCORRECT = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
sdk_lightmappedgeneric_ps20b_Static_Index( )
|
||||
{
|
||||
@@ -529,19 +571,27 @@ public:
|
||||
m_bBASETEXTURETRANSFORM2 = false;
|
||||
#endif // _DEBUG
|
||||
m_nBASETEXTURETRANSFORM2 = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSWAP_VERTEX_BLEND = false;
|
||||
#endif // _DEBUG
|
||||
m_nSWAP_VERTEX_BLEND = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPARALLAXCORRECT = false;
|
||||
#endif // _DEBUG
|
||||
m_nPARALLAXCORRECT = 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_bMASKEDBLENDING && m_bBASETEXTURE2 && m_bDETAILTEXTURE && m_bBUMPMAP && m_bBUMPMAP2 && m_bCUBEMAP && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bNORMALMAPALPHAENVMAPMASK && m_bDIFFUSEBUMPMAP && m_bBASETEXTURENOENVMAP && m_bBASETEXTURE2NOENVMAP && m_bWARPLIGHTING && m_bFANCY_BLENDING && m_bRELIEF_MAPPING && m_bSEAMLESS && m_bNORMAL_DECODE_MODE && m_bNORMALMASK_DECODE_MODE && m_bDETAIL_BLEND_MODE && m_bBASETEXTURETRANSFORM2;
|
||||
bool bAllStaticVarsDefined = m_bMASKEDBLENDING && m_bBASETEXTURE2 && m_bDETAILTEXTURE && m_bBUMPMAP && m_bBUMPMAP2 && m_bCUBEMAP && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bNORMALMAPALPHAENVMAPMASK && m_bDIFFUSEBUMPMAP && m_bBASETEXTURENOENVMAP && m_bBASETEXTURE2NOENVMAP && m_bWARPLIGHTING && m_bFANCY_BLENDING && m_bRELIEF_MAPPING && m_bSEAMLESS && m_bNORMAL_DECODE_MODE && m_bNORMALMASK_DECODE_MODE && m_bDETAIL_BLEND_MODE && m_bBASETEXTURETRANSFORM2 && m_bSWAP_VERTEX_BLEND && m_bPARALLAXCORRECT;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 96 * m_nMASKEDBLENDING ) + ( 192 * m_nBASETEXTURE2 ) + ( 384 * m_nDETAILTEXTURE ) + ( 768 * m_nBUMPMAP ) + ( 2304 * m_nBUMPMAP2 ) + ( 4608 * m_nCUBEMAP ) + ( 9216 * m_nENVMAPMASK ) + ( 18432 * m_nBASEALPHAENVMAPMASK ) + ( 36864 * m_nSELFILLUM ) + ( 73728 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 147456 * m_nDIFFUSEBUMPMAP ) + ( 294912 * m_nBASETEXTURENOENVMAP ) + ( 589824 * m_nBASETEXTURE2NOENVMAP ) + ( 1179648 * m_nWARPLIGHTING ) + ( 2359296 * m_nFANCY_BLENDING ) + ( 7077888 * m_nRELIEF_MAPPING ) + ( 7077888 * m_nSEAMLESS ) + ( 14155776 * m_nNORMAL_DECODE_MODE ) + ( 14155776 * m_nNORMALMASK_DECODE_MODE ) + ( 14155776 * m_nDETAIL_BLEND_MODE ) + ( 169869312 * m_nBASETEXTURETRANSFORM2 ) + 0;
|
||||
return ( 96 * m_nMASKEDBLENDING ) + ( 192 * m_nBASETEXTURE2 ) + ( 384 * m_nDETAILTEXTURE ) + ( 768 * m_nBUMPMAP ) + ( 2304 * m_nBUMPMAP2 ) + ( 4608 * m_nCUBEMAP ) + ( 9216 * m_nENVMAPMASK ) + ( 18432 * m_nBASEALPHAENVMAPMASK ) + ( 36864 * m_nSELFILLUM ) + ( 73728 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 147456 * m_nDIFFUSEBUMPMAP ) + ( 294912 * m_nBASETEXTURENOENVMAP ) + ( 589824 * m_nBASETEXTURE2NOENVMAP ) + ( 1179648 * m_nWARPLIGHTING ) + ( 2359296 * m_nFANCY_BLENDING ) + ( 4718592 * m_nRELIEF_MAPPING ) + ( 4718592 * m_nSEAMLESS ) + ( 9437184 * m_nNORMAL_DECODE_MODE ) + ( 9437184 * m_nNORMALMASK_DECODE_MODE ) + ( 9437184 * m_nDETAIL_BLEND_MODE ) + ( 113246208 * m_nBASETEXTURETRANSFORM2 ) + ( 226492416 * m_nSWAP_VERTEX_BLEND ) + ( 452984832 * m_nPARALLAXCORRECT ) + 0;
|
||||
}
|
||||
};
|
||||
#define shaderStaticTest_sdk_lightmappedgeneric_ps20b psh_forgot_to_set_static_MASKEDBLENDING + psh_forgot_to_set_static_BASETEXTURE2 + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_BUMPMAP + psh_forgot_to_set_static_BUMPMAP2 + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_NORMALMAPALPHAENVMAPMASK + psh_forgot_to_set_static_DIFFUSEBUMPMAP + psh_forgot_to_set_static_BASETEXTURENOENVMAP + psh_forgot_to_set_static_BASETEXTURE2NOENVMAP + psh_forgot_to_set_static_WARPLIGHTING + psh_forgot_to_set_static_FANCY_BLENDING + psh_forgot_to_set_static_RELIEF_MAPPING + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_NORMAL_DECODE_MODE + psh_forgot_to_set_static_NORMALMASK_DECODE_MODE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_BASETEXTURETRANSFORM2 + 0
|
||||
#define shaderStaticTest_sdk_lightmappedgeneric_ps20b psh_forgot_to_set_static_MASKEDBLENDING + psh_forgot_to_set_static_BASETEXTURE2 + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_BUMPMAP + psh_forgot_to_set_static_BUMPMAP2 + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_NORMALMAPALPHAENVMAPMASK + psh_forgot_to_set_static_DIFFUSEBUMPMAP + psh_forgot_to_set_static_BASETEXTURENOENVMAP + psh_forgot_to_set_static_BASETEXTURE2NOENVMAP + psh_forgot_to_set_static_WARPLIGHTING + psh_forgot_to_set_static_FANCY_BLENDING + psh_forgot_to_set_static_RELIEF_MAPPING + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_NORMAL_DECODE_MODE + psh_forgot_to_set_static_NORMALMASK_DECODE_MODE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_BASETEXTURETRANSFORM2 + psh_forgot_to_set_static_SWAP_VERTEX_BLEND + psh_forgot_to_set_static_PARALLAXCORRECT + 0
|
||||
class sdk_lightmappedgeneric_ps20b_Dynamic_Index
|
||||
{
|
||||
private:
|
||||
|
||||
@@ -303,7 +303,7 @@ private:
|
||||
public:
|
||||
void SetFANCY_BLENDING( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 2 );
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nFANCY_BLENDING = i;
|
||||
#ifdef _DEBUG
|
||||
m_bFANCY_BLENDING = true;
|
||||
@@ -421,6 +421,48 @@ public:
|
||||
m_bBASETEXTURETRANSFORM2 = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nSWAP_VERTEX_BLEND;
|
||||
#ifdef _DEBUG
|
||||
bool m_bSWAP_VERTEX_BLEND;
|
||||
#endif
|
||||
public:
|
||||
void SetSWAP_VERTEX_BLEND( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nSWAP_VERTEX_BLEND = i;
|
||||
#ifdef _DEBUG
|
||||
m_bSWAP_VERTEX_BLEND = true;
|
||||
#endif
|
||||
}
|
||||
void SetSWAP_VERTEX_BLEND( bool i )
|
||||
{
|
||||
m_nSWAP_VERTEX_BLEND = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSWAP_VERTEX_BLEND = true;
|
||||
#endif
|
||||
}
|
||||
private:
|
||||
int m_nPARALLAXCORRECT;
|
||||
#ifdef _DEBUG
|
||||
bool m_bPARALLAXCORRECT;
|
||||
#endif
|
||||
public:
|
||||
void SetPARALLAXCORRECT( int i )
|
||||
{
|
||||
Assert( i >= 0 && i <= 1 );
|
||||
m_nPARALLAXCORRECT = i;
|
||||
#ifdef _DEBUG
|
||||
m_bPARALLAXCORRECT = true;
|
||||
#endif
|
||||
}
|
||||
void SetPARALLAXCORRECT( bool i )
|
||||
{
|
||||
m_nPARALLAXCORRECT = i ? 1 : 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPARALLAXCORRECT = true;
|
||||
#endif
|
||||
}
|
||||
public:
|
||||
sdk_lightmappedgeneric_ps30_Static_Index( )
|
||||
{
|
||||
@@ -504,19 +546,27 @@ public:
|
||||
m_bBASETEXTURETRANSFORM2 = false;
|
||||
#endif // _DEBUG
|
||||
m_nBASETEXTURETRANSFORM2 = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bSWAP_VERTEX_BLEND = false;
|
||||
#endif // _DEBUG
|
||||
m_nSWAP_VERTEX_BLEND = 0;
|
||||
#ifdef _DEBUG
|
||||
m_bPARALLAXCORRECT = false;
|
||||
#endif // _DEBUG
|
||||
m_nPARALLAXCORRECT = 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_bMASKEDBLENDING && m_bBASETEXTURE2 && m_bDETAILTEXTURE && m_bBUMPMAP && m_bBUMPMAP2 && m_bCUBEMAP && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bNORMALMAPALPHAENVMAPMASK && m_bDIFFUSEBUMPMAP && m_bBASETEXTURENOENVMAP && m_bBASETEXTURE2NOENVMAP && m_bWARPLIGHTING && m_bFANCY_BLENDING && m_bSEAMLESS && m_bNORMAL_DECODE_MODE && m_bNORMALMASK_DECODE_MODE && m_bDETAIL_BLEND_MODE && m_bBASETEXTURETRANSFORM2;
|
||||
bool bAllStaticVarsDefined = m_bMASKEDBLENDING && m_bBASETEXTURE2 && m_bDETAILTEXTURE && m_bBUMPMAP && m_bBUMPMAP2 && m_bCUBEMAP && m_bENVMAPMASK && m_bBASEALPHAENVMAPMASK && m_bSELFILLUM && m_bNORMALMAPALPHAENVMAPMASK && m_bDIFFUSEBUMPMAP && m_bBASETEXTURENOENVMAP && m_bBASETEXTURE2NOENVMAP && m_bWARPLIGHTING && m_bFANCY_BLENDING && m_bSEAMLESS && m_bNORMAL_DECODE_MODE && m_bNORMALMASK_DECODE_MODE && m_bDETAIL_BLEND_MODE && m_bBASETEXTURETRANSFORM2 && m_bSWAP_VERTEX_BLEND && m_bPARALLAXCORRECT;
|
||||
Assert( bAllStaticVarsDefined );
|
||||
#endif // _DEBUG
|
||||
return ( 96 * m_nMASKEDBLENDING ) + ( 192 * m_nBASETEXTURE2 ) + ( 384 * m_nDETAILTEXTURE ) + ( 768 * m_nBUMPMAP ) + ( 2304 * m_nBUMPMAP2 ) + ( 4608 * m_nCUBEMAP ) + ( 9216 * m_nENVMAPMASK ) + ( 18432 * m_nBASEALPHAENVMAPMASK ) + ( 36864 * m_nSELFILLUM ) + ( 73728 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 147456 * m_nDIFFUSEBUMPMAP ) + ( 294912 * m_nBASETEXTURENOENVMAP ) + ( 589824 * m_nBASETEXTURE2NOENVMAP ) + ( 1179648 * m_nWARPLIGHTING ) + ( 2359296 * m_nFANCY_BLENDING ) + ( 7077888 * m_nSEAMLESS ) + ( 14155776 * m_nNORMAL_DECODE_MODE ) + ( 14155776 * m_nNORMALMASK_DECODE_MODE ) + ( 14155776 * m_nDETAIL_BLEND_MODE ) + ( 169869312 * m_nBASETEXTURETRANSFORM2 ) + 0;
|
||||
return ( 96 * m_nMASKEDBLENDING ) + ( 192 * m_nBASETEXTURE2 ) + ( 384 * m_nDETAILTEXTURE ) + ( 768 * m_nBUMPMAP ) + ( 2304 * m_nBUMPMAP2 ) + ( 4608 * m_nCUBEMAP ) + ( 9216 * m_nENVMAPMASK ) + ( 18432 * m_nBASEALPHAENVMAPMASK ) + ( 36864 * m_nSELFILLUM ) + ( 73728 * m_nNORMALMAPALPHAENVMAPMASK ) + ( 147456 * m_nDIFFUSEBUMPMAP ) + ( 294912 * m_nBASETEXTURENOENVMAP ) + ( 589824 * m_nBASETEXTURE2NOENVMAP ) + ( 1179648 * m_nWARPLIGHTING ) + ( 2359296 * m_nFANCY_BLENDING ) + ( 4718592 * m_nSEAMLESS ) + ( 9437184 * m_nNORMAL_DECODE_MODE ) + ( 9437184 * m_nNORMALMASK_DECODE_MODE ) + ( 9437184 * m_nDETAIL_BLEND_MODE ) + ( 113246208 * m_nBASETEXTURETRANSFORM2 ) + ( 226492416 * m_nSWAP_VERTEX_BLEND ) + ( 452984832 * m_nPARALLAXCORRECT ) + 0;
|
||||
}
|
||||
};
|
||||
#define shaderStaticTest_sdk_lightmappedgeneric_ps30 psh_forgot_to_set_static_MASKEDBLENDING + psh_forgot_to_set_static_BASETEXTURE2 + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_BUMPMAP + psh_forgot_to_set_static_BUMPMAP2 + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_NORMALMAPALPHAENVMAPMASK + psh_forgot_to_set_static_DIFFUSEBUMPMAP + psh_forgot_to_set_static_BASETEXTURENOENVMAP + psh_forgot_to_set_static_BASETEXTURE2NOENVMAP + psh_forgot_to_set_static_WARPLIGHTING + psh_forgot_to_set_static_FANCY_BLENDING + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_NORMAL_DECODE_MODE + psh_forgot_to_set_static_NORMALMASK_DECODE_MODE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_BASETEXTURETRANSFORM2 + 0
|
||||
#define shaderStaticTest_sdk_lightmappedgeneric_ps30 psh_forgot_to_set_static_MASKEDBLENDING + psh_forgot_to_set_static_BASETEXTURE2 + psh_forgot_to_set_static_DETAILTEXTURE + psh_forgot_to_set_static_BUMPMAP + psh_forgot_to_set_static_BUMPMAP2 + psh_forgot_to_set_static_CUBEMAP + psh_forgot_to_set_static_ENVMAPMASK + psh_forgot_to_set_static_BASEALPHAENVMAPMASK + psh_forgot_to_set_static_SELFILLUM + psh_forgot_to_set_static_NORMALMAPALPHAENVMAPMASK + psh_forgot_to_set_static_DIFFUSEBUMPMAP + psh_forgot_to_set_static_BASETEXTURENOENVMAP + psh_forgot_to_set_static_BASETEXTURE2NOENVMAP + psh_forgot_to_set_static_WARPLIGHTING + psh_forgot_to_set_static_FANCY_BLENDING + psh_forgot_to_set_static_SEAMLESS + psh_forgot_to_set_static_NORMAL_DECODE_MODE + psh_forgot_to_set_static_NORMALMASK_DECODE_MODE + psh_forgot_to_set_static_DETAIL_BLEND_MODE + psh_forgot_to_set_static_BASETEXTURETRANSFORM2 + psh_forgot_to_set_static_SWAP_VERTEX_BLEND + psh_forgot_to_set_static_PARALLAXCORRECT + 0
|
||||
class sdk_lightmappedgeneric_ps30_Dynamic_Index
|
||||
{
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user