add source-sdk-2013

This commit is contained in:
nillerusr
2022-03-01 23:00:42 +03:00
parent 88b8830e8b
commit edc8d6c584
3288 changed files with 3731 additions and 1062455 deletions
+10 -20
View File
@@ -12,7 +12,6 @@
#include "input.h"
#ifdef TF_CLIENT_DLL
#include "cdll_util.h"
#include "tf_gamerules.h"
#endif
#include "rope_helpers.h"
#include "engine/ivmodelinfo.h"
@@ -194,7 +193,7 @@ public:
if( pReturn == NULL )
{
int iMaxSize = m_QueuedRopeMemory[m_nCurrentStack].GetMaxSize();
Warning( "Overflowed rope queued rendering memory stack. Needed %llu, have %d/%d\n", (uint64)bytes, iMaxSize - m_QueuedRopeMemory[m_nCurrentStack].GetUsed(), iMaxSize );
Warning( "Overflowed rope queued rendering memory stack. Needed %d, have %d/%d\n", bytes, iMaxSize - m_QueuedRopeMemory[m_nCurrentStack].GetUsed(), iMaxSize );
pReturn = malloc( bytes );
m_DeleteOnSwitch[m_nCurrentStack].AddToTail( pReturn );
}
@@ -377,7 +376,7 @@ void CRopeManager::AddToRenderCache( C_RopeKeyframe *pRope )
// If we didn't find one, then allocate the mofo.
if ( iRenderCache == nRenderCacheCount )
{
iRenderCache = m_aRenderCache.AddToTail();
int iRenderCache = m_aRenderCache.AddToTail();
m_aRenderCache[iRenderCache].m_pSolidMaterial = pRope->GetSolidMaterial();
if ( m_aRenderCache[iRenderCache].m_pSolidMaterial )
{
@@ -641,15 +640,6 @@ bool CRopeManager::IsHolidayLightMode( void )
return false;
}
#ifdef TF_CLIENT_DLL
if ( TFGameRules() && TFGameRules()->IsPowerupMode() )
{
// We don't want to draw the lights for the grapple.
// They get left behind for a while and look bad.
return false;
}
#endif
bool bDrawHolidayLights = false;
#ifdef USES_ECON_ITEMS
@@ -1648,12 +1638,12 @@ struct catmull_t
};
// bake out the terms of the catmull rom spline
void Catmull_Rom_Spline_Matrix( const Vector &vecP1, const Vector &vecP2, const Vector &vecP3, const Vector &vecP4, catmull_t &output )
void Catmull_Rom_Spline_Matrix( const Vector &p1, const Vector &p2, const Vector &p3, const Vector &p4, catmull_t &output )
{
output.t3 = 0.5f * ( ( -1 * vecP1 ) + ( 3 * vecP2 ) + ( -3 * vecP3 ) + vecP4 ); // 0.5 t^3 * [ (-1*p1) + ( 3*p2) + (-3*p3) + p4 ]
output.t2 = 0.5f * ( ( 2 * vecP1 ) + ( -5 * vecP2 ) + ( 4 * vecP3 ) - vecP4 ); // 0.5 t^2 * [ ( 2*p1) + (-5*p2) + ( 4*p3) - p4 ]
output.t = 0.5f * ( ( -1 * vecP1 ) + vecP3 ); // 0.5 t * [ (-1*p1) + p3 ]
output.c = vecP2; // p2
output.t3 = 0.5f * ((-1*p1) + (3*p2) + (-3*p3) + p4); // 0.5 t^3 * [ (-1*p1) + ( 3*p2) + (-3*p3) + p4 ]
output.t2 = 0.5f * ((2*p1) + (-5*p2) + (4*p3) - p4); // 0.5 t^2 * [ ( 2*p1) + (-5*p2) + ( 4*p3) - p4 ]
output.t = 0.5f * ((-1*p1) + p3); // 0.5 t * [ (-1*p1) + p3 ]
output.c = p2; // p2
}
// evaluate one point on the spline, t is a vector of (t, t^2, t^3)
@@ -1927,10 +1917,10 @@ bool C_RopeKeyframe::CalculateEndPointAttachment( C_BaseEntity *pEnt, int iAttac
if ( !pModel )
return false;
int iAttachmentBuf = pModel->LookupAttachment( "buff_attach" );
int iAttachment = pModel->LookupAttachment( "buff_attach" );
if ( pAngles )
return pModel->GetAttachment( iAttachmentBuf, vPos, *pAngles );
return pModel->GetAttachment( iAttachmentBuf, vPos );
return pModel->GetAttachment( iAttachment, vPos, *pAngles );
return pModel->GetAttachment( iAttachment, vPos );
}
}