mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-23 20:09:45 +03:00
Initial Mapbase commit (squashed from mapbase-beta)
This commit is contained in:
@@ -30,6 +30,9 @@ public:
|
||||
// These are documented in the server-side entity.
|
||||
public:
|
||||
float m_fDisappearDist;
|
||||
#ifdef MAPBASE
|
||||
float m_fDisappearMaxDist;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -43,6 +46,9 @@ ConVar lod_TransitionDist("lod_TransitionDist", "800");
|
||||
// Datatable..
|
||||
IMPLEMENT_CLIENTCLASS_DT(C_Func_LOD, DT_Func_LOD, CFunc_LOD)
|
||||
RecvPropFloat(RECVINFO(m_fDisappearDist)),
|
||||
#ifdef MAPBASE
|
||||
RecvPropFloat(RECVINFO(m_fDisappearMaxDist)),
|
||||
#endif
|
||||
END_RECV_TABLE()
|
||||
|
||||
|
||||
@@ -54,6 +60,9 @@ END_RECV_TABLE()
|
||||
C_Func_LOD::C_Func_LOD()
|
||||
{
|
||||
m_fDisappearDist = 5000.0f;
|
||||
#ifdef MAPBASE
|
||||
m_fDisappearMaxDist = 0.0f;
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -61,7 +70,11 @@ C_Func_LOD::C_Func_LOD()
|
||||
//-----------------------------------------------------------------------------
|
||||
unsigned char C_Func_LOD::GetClientSideFade()
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
return UTIL_ComputeEntityFade( this, m_fDisappearDist, m_fDisappearDist + (m_fDisappearMaxDist != 0 ? m_fDisappearMaxDist : lod_TransitionDist.GetFloat()), 1.0f );
|
||||
#else
|
||||
return UTIL_ComputeEntityFade( this, m_fDisappearDist, m_fDisappearDist + lod_TransitionDist.GetFloat(), 1.0f );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user