mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-07-16 22:35:09 +00:00
feat(Episodic): Support episodic content.
I don't even remember.
This commit is contained in:
parent
a0151bb9a9
commit
3eeeedd5a8
@ -693,6 +693,7 @@ void OverrideMaterialSystemConfig( MaterialSystem_Config_t &config )
|
||||
// enable/disable flashlight support based on mod (user can also set this explicitly)
|
||||
// FIXME: this is only here because dxsupport_override.cfg is currently broken
|
||||
ConVarRef mat_supportflashlight( "mat_supportflashlight" );
|
||||
/*
|
||||
if ( mat_supportflashlight.GetInt() == -1 )
|
||||
{
|
||||
const char * gameName = COM_GetModDirectory();
|
||||
@ -707,6 +708,7 @@ void OverrideMaterialSystemConfig( MaterialSystem_Config_t &config )
|
||||
mat_supportflashlight.SetValue( true );
|
||||
}
|
||||
}
|
||||
*/
|
||||
config.m_bSupportFlashlight = mat_supportflashlight.GetBool();
|
||||
|
||||
// apply the settings in the material system
|
||||
|
||||
@ -208,7 +208,7 @@ void C_EnvProjectedTexture::UpdateLight( void )
|
||||
|
||||
if ( !m_bForceUpdate && r_flashlightenableculling.GetBool() )
|
||||
{
|
||||
bVisible = IsBBoxVisible();
|
||||
bVisible = IsBBoxVisible();
|
||||
}
|
||||
|
||||
if ( m_bState == false || !bVisible )
|
||||
|
||||
@ -13,7 +13,7 @@ $Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories ".\hl2;.\hl2\elements;.\portal;.\portal\vgui;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\Multiplayer;$SRCDIR\gcsdk\steamextra;$SRCDIR\game\shared\portal;$BASE"
|
||||
$AdditionalIncludeDirectories ".\hl2;.\hl2\elements;.\portal;.\episodic;.\portal\vgui;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\episodic;$SRCDIR\game\shared\Multiplayer;$SRCDIR\gcsdk\steamextra;$SRCDIR\game\shared\portal;$BASE"
|
||||
$PreprocessorDefinitions "$BASE;PORTAL;HL2_EPISODIC;HL2_CLIENT_DLL"
|
||||
}
|
||||
}
|
||||
@ -76,7 +76,7 @@ $Project "Client (Portal)"
|
||||
$File "hl2\c_weapon_crossbow.cpp"
|
||||
$File "episodic\c_weapon_hopwire.cpp"
|
||||
$File "hl2\c_weapon_gravitygun.cpp"
|
||||
$File "episodic\c_vehicle_jeep_episodic.cpp"
|
||||
$File "episodic\c_vehicle_jeep_episodic.cpp"
|
||||
$File "hl2\hud_radar.cpp"
|
||||
$File "hl2\c_weapon_stunstick.cpp"
|
||||
$File "$SRCDIR\game\shared\hl2\citadel_effects_shared.h"
|
||||
@ -84,6 +84,12 @@ $Project "Client (Portal)"
|
||||
$File "death.cpp"
|
||||
$File "$SRCDIR\game\shared\hl2\env_headcrabcanister_shared.cpp"
|
||||
$File "$SRCDIR\game\shared\hl2\env_headcrabcanister_shared.h"
|
||||
$File "$SRCDIR\game\shared\episodic\npc_advisor_shared.h"
|
||||
$File "episodic\c_npc_advisor.cpp"
|
||||
$File "episodic\episodic_screenspaceeffects.cpp"
|
||||
$File "episodic\episodic_screenspaceeffects.h"
|
||||
$File "episodic\c_prop_scalable.cpp"
|
||||
$File "episodic\c_npc_puppet.cpp"
|
||||
$File "hl2\fx_antlion.cpp"
|
||||
$File "hl2\fx_bugbait.cpp"
|
||||
$File "hl2\fx_hl2_impacts.cpp"
|
||||
|
||||
@ -1298,7 +1298,7 @@ bool CClientShadowMgr::Init()
|
||||
SetShadowBlobbyCutoffArea( 0.005 );
|
||||
|
||||
bool bTools = CommandLine()->CheckParm( "-tools" ) != NULL;
|
||||
m_nMaxDepthTextureShadows = bTools ? 4 : 1; // Just one shadow depth texture in games, more in tools
|
||||
m_nMaxDepthTextureShadows = bTools ? 4 : 8; // Just one shadow depth texture in games, more in tools
|
||||
|
||||
bool bLowEnd = ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() < 80 );
|
||||
|
||||
@ -1343,6 +1343,9 @@ void CClientShadowMgr::InitDepthTextureShadows()
|
||||
{
|
||||
VPROF_BUDGET( "CClientShadowMgr::InitDepthTextureShadows", VPROF_BUDGETGROUP_SHADOW_DEPTH_TEXTURING );
|
||||
|
||||
// SAUL: set m_nDepthTextureResolution to the depth resolution we want
|
||||
m_nDepthTextureResolution = r_flashlightdepthres.GetInt();
|
||||
|
||||
if( !m_bDepthTextureActive )
|
||||
{
|
||||
m_bDepthTextureActive = true;
|
||||
@ -1359,7 +1362,8 @@ void CClientShadowMgr::InitDepthTextureShadows()
|
||||
m_DummyColorTexture.InitRenderTargetTexture( r_flashlightdepthres.GetInt(), r_flashlightdepthres.GetInt(), RT_SIZE_OFFSCREEN, IMAGE_FORMAT_BGR565, MATERIAL_RT_DEPTH_SHARED, false, "_rt_ShadowDummy" );
|
||||
m_DummyColorTexture.InitRenderTargetSurface( r_flashlightdepthres.GetInt(), r_flashlightdepthres.GetInt(), IMAGE_FORMAT_BGR565, true );
|
||||
#else
|
||||
m_DummyColorTexture.InitRenderTarget( r_flashlightdepthres.GetInt(), r_flashlightdepthres.GetInt(), RT_SIZE_OFFSCREEN, nullFormat, MATERIAL_RT_DEPTH_NONE, false, "_rt_ShadowDummy" );
|
||||
// SAUL: we want to create a render target of specific size, so use RT_SIZE_NO_CHANGE
|
||||
m_DummyColorTexture.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_NO_CHANGE, nullFormat, MATERIAL_RT_DEPTH_NONE, false, "_rt_ShadowDummy" );
|
||||
#endif
|
||||
|
||||
// Create some number of depth-stencil textures
|
||||
@ -1379,9 +1383,13 @@ void CClientShadowMgr::InitDepthTextureShadows()
|
||||
depthTex.InitRenderTargetTexture( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_OFFSCREEN, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
|
||||
depthTex.InitRenderTargetSurface( 1, 1, dstFormat, false );
|
||||
#else
|
||||
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_OFFSCREEN, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
|
||||
// SAUL: we want to create a *DEPTH TEXTURE* of specific size, so use RT_SIZE_NO_CHANGE
|
||||
depthTex.InitRenderTarget( m_nDepthTextureResolution, m_nDepthTextureResolution, RT_SIZE_NO_CHANGE, dstFormat, MATERIAL_RT_DEPTH_NONE, false, strRTName );
|
||||
#endif
|
||||
|
||||
// SAUL: ensure the depth texture size wasn't changed
|
||||
Assert(depthTex->GetActualWidth() == m_nDepthTextureResolution);
|
||||
|
||||
if ( i == 0 )
|
||||
{
|
||||
// Shadow may be resized during allocation (due to resolution constraints etc)
|
||||
@ -3863,7 +3871,8 @@ int CClientShadowMgr::BuildActiveShadowDepthList( const CViewSetup &viewSetup, i
|
||||
continue;
|
||||
|
||||
// Calculate an AABB around the shadow frustum
|
||||
/*Vector vecAbsMins, vecAbsMaxs;
|
||||
/*
|
||||
Vector vecAbsMins, vecAbsMaxs;
|
||||
CalculateAABBFromProjectionMatrix( shadow.m_WorldToShadow, &vecAbsMins, &vecAbsMaxs );
|
||||
|
||||
Frustum_t viewFrustum;
|
||||
@ -3875,7 +3884,8 @@ int CClientShadowMgr::BuildActiveShadowDepthList( const CViewSetup &viewSetup, i
|
||||
{
|
||||
shadowmgr->SetFlashlightDepthTexture( shadow.m_ShadowHandle, NULL, 0 );
|
||||
continue;
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
if ( nActiveDepthShadowCount >= nMaxDepthShadows )
|
||||
{
|
||||
|
||||
@ -542,6 +542,7 @@ void C_Prop_Portal::OnPreDataChanged( DataUpdateType_t updateType )
|
||||
//ConVar r_portal_light_innerangle( "r_portal_light_innerangle", "90.0", FCVAR_CLIENTDLL );
|
||||
//ConVar r_portal_light_outerangle( "r_portal_light_outerangle", "90.0", FCVAR_CLIENTDLL );
|
||||
//ConVar r_portal_light_forward( "r_portal_light_forward", "0.0", FCVAR_CLIENTDLL );
|
||||
ConVar r_portal_use_dlights( "r_portal_use_dlights", "0", FCVAR_CLIENTDLL );
|
||||
|
||||
void C_Prop_Portal::OnDataChanged( DataUpdateType_t updateType )
|
||||
{
|
||||
@ -616,7 +617,12 @@ void C_Prop_Portal::OnDataChanged( DataUpdateType_t updateType )
|
||||
TransformedLighting.m_LightShadowHandle = CLIENTSHADOW_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
|
||||
// Turn on the dlight
|
||||
if ( r_portal_use_dlights.GetBool() )
|
||||
{
|
||||
if( pFakeLight == NULL )
|
||||
pFakeLight = effects->CL_AllocDlight( LIGHT_INDEX_TE_DYNAMIC + entindex() ); //is there a difference between DLight and ELight when only lighting ents?
|
||||
}
|
||||
|
||||
|
||||
if( pFakeLight != NULL )
|
||||
|
||||
@ -4383,9 +4383,6 @@ void CRendering3dView::DrawTranslucentRenderables( bool bInSkybox, bool bShadowD
|
||||
return;
|
||||
}
|
||||
|
||||
if( !m_pWorldListInfo )
|
||||
return;
|
||||
|
||||
VPROF_BUDGET( "CViewRender::DrawTranslucentRenderables", "DrawTranslucentRenderables" );
|
||||
int iPrevLeaf = info.m_LeafCount - 1;
|
||||
int nDetailLeafCount = 0;
|
||||
@ -4958,6 +4955,11 @@ void CShadowDepthView::Draw()
|
||||
render->Push3DView( (*this), VIEW_CLEAR_DEPTH, m_pRenderTarget, GetFrustum() );
|
||||
}
|
||||
|
||||
pRenderContext.GetFrom(materials);
|
||||
pRenderContext->PushRenderTargetAndViewport(m_pRenderTarget, m_pDepthTexture, 0, 0, m_pDepthTexture->GetMappingWidth(), m_pDepthTexture->GetMappingWidth());
|
||||
pRenderContext.SafeRelease();
|
||||
|
||||
|
||||
SetupCurrentView( origin, angles, VIEW_SHADOW_DEPTH_TEXTURE );
|
||||
|
||||
MDLCACHE_CRITICAL_SECTION();
|
||||
@ -5002,6 +5004,8 @@ void CShadowDepthView::Draw()
|
||||
pRenderContext->CopyRenderTargetToTextureEx( m_pDepthTexture, -1, NULL, NULL );
|
||||
}
|
||||
|
||||
pRenderContext->PopRenderTargetAndViewport();
|
||||
|
||||
render->PopView( GetFrustum() );
|
||||
|
||||
#if defined( _X360 )
|
||||
|
||||
@ -13,7 +13,7 @@ $Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\portal;.\hl2;.\episodic;$SRCDIR\game\shared\Multiplayer;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\portal;.\portal;.\portal2"
|
||||
$AdditionalIncludeDirectories "$BASE;$SRCDIR\game\shared\portal;.\hl2;.\episodic;$SRCDIR\game\shared\episodic;$SRCDIR\game\shared\Multiplayer;$SRCDIR\game\shared\hl2;$SRCDIR\game\shared\portal;.\portal;.\portal2"
|
||||
$PreprocessorDefinitions "$BASE;PORTAL;PORTAL2;HL2_DLL;HL2_EPISODIC;USES_SAVERESTORE"
|
||||
}
|
||||
}
|
||||
@ -52,6 +52,12 @@ $Project "Server (Portal)"
|
||||
$File "hl2\ai_allymanager.cpp"
|
||||
$File "hl2\ai_behavior_actbusy.cpp"
|
||||
$File "hl2\ai_behavior_actbusy.h"
|
||||
$File "$SRCDIR\game\shared\episodic\npc_advisor_shared.h"
|
||||
$File "episodic\npc_advisor.cpp"
|
||||
$File "episodic\npc_combine_cannon.cpp"
|
||||
$File "episodic\npc_magnusson.cpp"
|
||||
$File "episodic\prop_scalable.cpp"
|
||||
$File "episodic\npc_puppet.cpp"
|
||||
$File "hl2\ai_behavior_operator.cpp"
|
||||
$File "hl2\ai_behavior_operator.h"
|
||||
$File "episodic\ai_behavior_alyx_injured.cpp"
|
||||
|
||||
@ -47,9 +47,14 @@ void RegisterUserMessages()
|
||||
usermessages->Register( "LogoTimeMsg", 4 );
|
||||
usermessages->Register( "AchievementEvent", -1 );
|
||||
|
||||
#ifdef HL2_EPISODIC
|
||||
usermessages->Register( "UpdateJalopyRadar", -1 );
|
||||
#endif
|
||||
|
||||
|
||||
//new stuff for portal
|
||||
usermessages->Register( "EntityPortalled", sizeof( long ) + sizeof( long ) + sizeof( Vector ) + sizeof( QAngle ) ); //something got teleported through a portal
|
||||
// int32 because WriteLong actually uses int32
|
||||
usermessages->Register( "EntityPortalled", sizeof( int32 ) + sizeof( int32 ) + sizeof( Vector ) + sizeof( QAngle ) ); //something got teleported through a portal
|
||||
usermessages->Register( "KillCam", -1 );
|
||||
|
||||
// Voting
|
||||
|
||||
2
ivp
2
ivp
@ -1 +1 @@
|
||||
Subproject commit 47533475e01cbff05fbc3bbe8b4edc485f292cea
|
||||
Subproject commit 4098acbbe3bc48320496f7533851640cc40cbb89
|
||||
Loading…
Reference in New Issue
Block a user