fix some AddressSanitizer issues

This commit is contained in:
nillerusr
2022-06-14 13:16:08 +03:00
parent a0e05d885a
commit 29db778997
8 changed files with 26 additions and 26 deletions
+5 -5
View File
@@ -951,7 +951,7 @@ void PropBreakableCreateAll( int modelindex, IPhysicsObject *pPhysics, const bre
nSkin = pOwnerAnim->m_nSkin;
}
}
matrix3x4_t localToWorld;
static matrix3x4_t localToWorld;
CStudioHdr studioHdr;
const model_t *model = modelinfo->GetModel( modelindex );
@@ -1009,7 +1009,7 @@ void PropBreakableCreateAll( int modelindex, IPhysicsObject *pPhysics, const bre
if ( ( iPrecomputedBreakableCount != -1 ) && ( i >= iPrecomputedBreakableCount ) )
break;
matrix3x4_t matrix;
static matrix3x4_t matrix;
AngleMatrix( params.angles, params.origin, matrix );
CStudioHdr studioHdr;
@@ -1188,7 +1188,7 @@ void PropBreakableCreateAll( int modelindex, IPhysicsObject *pPhysics, const bre
Vector vecBreakableObbSize = pBreakable->CollisionProp()->OBBSize();
// Try to align the gibs along the original axis
matrix3x4_t matrix;
static matrix3x4_t matrix;
AngleMatrix( vecAngles, matrix );
AlignBoxes( &matrix, vecObbSize, vecBreakableObbSize );
MatrixAngles( matrix, vecAngles );
@@ -1397,7 +1397,7 @@ CBaseEntity *CreateGibsFromList( CUtlVector<breakmodel_t> &list, int modelindex,
if ( ( iPrecomputedBreakableCount != -1 ) && ( i >= iPrecomputedBreakableCount ) )
break;
matrix3x4_t matrix;
static matrix3x4_t matrix;
AngleMatrix( params.angles, params.origin, matrix );
CStudioHdr studioHdr;
@@ -1596,7 +1596,7 @@ CBaseEntity *CreateGibsFromList( CUtlVector<breakmodel_t> &list, int modelindex,
Vector vecBreakableObbSize = pBreakable->CollisionProp()->OBBSize();
// Try to align the gibs along the original axis
matrix3x4_t matrix;
static matrix3x4_t matrix;
AngleMatrix( vecAngles, matrix );
AlignBoxes( &matrix, vecObbSize, vecBreakableObbSize );
MatrixAngles( matrix, vecAngles );
+5 -5
View File
@@ -221,7 +221,7 @@ struct breakmodel_t
struct breakablepropparams_t
{
breakablepropparams_t( const Vector &_origin, const QAngle &_angles, const Vector &_velocity, const AngularImpulse &_angularVelocity )
breakablepropparams_t( const Vector _origin, const QAngle _angles, const Vector _velocity, const AngularImpulse _angularVelocity )
: origin(_origin), angles(_angles), velocity(_velocity), angularVelocity(_angularVelocity)
{
impactEnergyScale = 0;
@@ -230,10 +230,10 @@ struct breakablepropparams_t
nDefaultSkin = 0;
}
const Vector &origin;
const QAngle &angles;
const Vector &velocity;
const AngularImpulse &angularVelocity;
const Vector origin;
const QAngle angles;
const Vector velocity;
const AngularImpulse angularVelocity;
float impactEnergyScale;
float defBurstScale;
int defCollisionGroup;