mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
fix address sanitizer issues
This commit is contained in:
@@ -1963,7 +1963,7 @@ void CViewRenderBeams::DrawBeam( Beam_t *pbeam )
|
||||
|
||||
// set color
|
||||
float srcColor[3];
|
||||
float color[3];
|
||||
float color[4];
|
||||
|
||||
srcColor[0] = pbeam->r;
|
||||
srcColor[1] = pbeam->g;
|
||||
@@ -1984,6 +1984,7 @@ void CViewRenderBeams::DrawBeam( Beam_t *pbeam )
|
||||
VectorScale( color, (1/255.0), color );
|
||||
VectorCopy( color, srcColor );
|
||||
VectorScale( color, ((float)pbeam->brightness / 255.0), color );
|
||||
color[3] = 1.f;
|
||||
|
||||
switch( pbeam->type )
|
||||
{
|
||||
|
||||
@@ -385,7 +385,7 @@ void Templates_RemoveAll(void)
|
||||
free(pTemplate->pszMapData);
|
||||
if ( pTemplate->pszFixedMapData )
|
||||
{
|
||||
free(pTemplate->pszFixedMapData);
|
||||
delete[] pTemplate->pszFixedMapData;
|
||||
}
|
||||
|
||||
free(pTemplate);
|
||||
|
||||
@@ -137,6 +137,11 @@ public:
|
||||
return pResult;
|
||||
}
|
||||
|
||||
void operator delete(void *p)
|
||||
{
|
||||
MemAlloc_Free( p );
|
||||
};
|
||||
|
||||
private:
|
||||
CAI_BaseNPC *m_pOuter;
|
||||
};
|
||||
|
||||
@@ -45,9 +45,8 @@ public:
|
||||
DECLARE_DATADESC();
|
||||
|
||||
private:
|
||||
bool UpdateState( void );
|
||||
|
||||
int m_state;
|
||||
bool UpdateState( void );
|
||||
int m_state;
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS( func_areaportal, CAreaPortal );
|
||||
|
||||
Reference in New Issue
Block a user