mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-05 02:00:34 +03:00
Fix spacing in particle system files
This commit is contained in:
parent
63a888252f
commit
12742b7815
@ -152,11 +152,13 @@ void C_ParticleSystem::ClientThink(void)
|
|||||||
AssertMsg1( pEffect, "Particle system couldn't make %s", pszName );
|
AssertMsg1( pEffect, "Particle system couldn't make %s", pszName );
|
||||||
if (pEffect)
|
if (pEffect)
|
||||||
{
|
{
|
||||||
if (m_vControlPointVecs[0] != GetAbsOrigin() && m_hControlPointEnts[0] == NULL){
|
if (m_vControlPointVecs[0] != GetAbsOrigin() && m_hControlPointEnts[0] == NULL)
|
||||||
|
{
|
||||||
// we are using info_particle_system_coordinate
|
// we are using info_particle_system_coordinate
|
||||||
for (int i = 0; i < kMAXCONTROLPOINTS; ++i)
|
for (int i = 0; i < kMAXCONTROLPOINTS; ++i)
|
||||||
{
|
{
|
||||||
ParticleProp()->AddControlPoint(pEffect, i + 1, this, PATTACH_WORLDORIGIN, 0, m_vControlPointVecs[i] - GetAbsOrigin());
|
ParticleProp()->AddControlPoint(pEffect, i + 1, this, PATTACH_WORLDORIGIN, 0, m_vControlPointVecs[i] - GetAbsOrigin());
|
||||||
|
|
||||||
AssertMsg2(m_iControlPointParents[i] >= 0 && m_iControlPointParents[i] <= kMAXCONTROLPOINTS,
|
AssertMsg2(m_iControlPointParents[i] >= 0 && m_iControlPointParents[i] <= kMAXCONTROLPOINTS,
|
||||||
"Particle system specified bogus control point parent (%d) for point %d.",
|
"Particle system specified bogus control point parent (%d) for point %d.",
|
||||||
m_iControlPointParents[i], i);
|
m_iControlPointParents[i], i);
|
||||||
@ -167,7 +169,8 @@ void C_ParticleSystem::ClientThink(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
for ( int i = 0 ; i < kMAXCONTROLPOINTS ; ++i )
|
for ( int i = 0 ; i < kMAXCONTROLPOINTS ; ++i )
|
||||||
{
|
{
|
||||||
CBaseEntity *pOnEntity = m_hControlPointEnts[i].Get();
|
CBaseEntity *pOnEntity = m_hControlPointEnts[i].Get();
|
||||||
@ -175,6 +178,7 @@ void C_ParticleSystem::ClientThink(void)
|
|||||||
{
|
{
|
||||||
ParticleProp()->AddControlPoint( pEffect, i + 1, pOnEntity, PATTACH_ABSORIGIN_FOLLOW );
|
ParticleProp()->AddControlPoint( pEffect, i + 1, pOnEntity, PATTACH_ABSORIGIN_FOLLOW );
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertMsg2( m_iControlPointParents[i] >= 0 && m_iControlPointParents[i] <= kMAXCONTROLPOINTS ,
|
AssertMsg2( m_iControlPointParents[i] >= 0 && m_iControlPointParents[i] <= kMAXCONTROLPOINTS ,
|
||||||
"Particle system specified bogus control point parent (%d) for point %d.",
|
"Particle system specified bogus control point parent (%d) for point %d.",
|
||||||
m_iControlPointParents[i], i );
|
m_iControlPointParents[i], i );
|
||||||
|
@ -120,7 +120,6 @@ DEFINE_KEYFIELD(m_iControlPointParents[5], FIELD_CHARACTER, "cpoint6_parent"),
|
|||||||
DEFINE_KEYFIELD( m_iControlPointParents[6], FIELD_CHARACTER, "cpoint7_parent" ),
|
DEFINE_KEYFIELD( m_iControlPointParents[6], FIELD_CHARACTER, "cpoint7_parent" ),
|
||||||
|
|
||||||
DEFINE_AUTO_ARRAY( m_hControlPointEnts, FIELD_EHANDLE ),
|
DEFINE_AUTO_ARRAY( m_hControlPointEnts, FIELD_EHANDLE ),
|
||||||
DEFINE_AUTO_ARRAY(m_vControlPointVecs, FIELD_VECTOR),
|
|
||||||
|
|
||||||
DEFINE_INPUTFUNC( FIELD_VOID, "Start", InputStart ),
|
DEFINE_INPUTFUNC( FIELD_VOID, "Start", InputStart ),
|
||||||
DEFINE_INPUTFUNC( FIELD_VOID, "Stop", InputStop ),
|
DEFINE_INPUTFUNC( FIELD_VOID, "Stop", InputStop ),
|
||||||
@ -257,22 +256,25 @@ void CParticleSystem::InputDestroyImmediately(inputdata_t &inputdata)
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Purpose: Find each entity referred to by m_iszControlPointNames and
|
// Purpose: Find each entity referred to by m_iszControlPointNames and
|
||||||
// resolve it into the corresponding slot in m_vControlPointVecs
|
// resolve it into the corresponding slot in m_hControlPointEnts
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CParticleSystem::ReadControlPointEnts( void )
|
void CParticleSystem::ReadControlPointEnts( void )
|
||||||
{
|
{
|
||||||
for ( int i = 0 ; i < kMAXCONTROLPOINTS; ++i )
|
for ( int i = 0 ; i < kMAXCONTROLPOINTS; ++i )
|
||||||
{
|
{
|
||||||
if (UsesCoordinates()) {
|
if (UsesCoordinates())
|
||||||
|
{
|
||||||
Vector vecCoords;
|
Vector vecCoords;
|
||||||
// cast str to vector, add vector to array
|
// cast str to vector, add vector to array
|
||||||
const char* pszVector = STRING(m_iszControlPointNames[i]);
|
const char* pszVector = STRING(m_iszControlPointNames[i]);
|
||||||
UTIL_StringToVector(vecCoords.Base(), pszVector);
|
UTIL_StringToVector(vecCoords.Base(), pszVector);
|
||||||
m_vControlPointVecs.Set(i, vecCoords);
|
m_vControlPointVecs.Set(i, vecCoords);
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
if ( m_iszControlPointNames[i] == NULL_STRING )
|
if ( m_iszControlPointNames[i] == NULL_STRING )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
CBaseEntity *pPointEnt = gEntList.FindEntityGeneric( NULL, STRING( m_iszControlPointNames[i] ), this );
|
CBaseEntity *pPointEnt = gEntList.FindEntityGeneric( NULL, STRING( m_iszControlPointNames[i] ), this );
|
||||||
Assert( pPointEnt != NULL );
|
Assert( pPointEnt != NULL );
|
||||||
if ( pPointEnt == NULL )
|
if ( pPointEnt == NULL )
|
||||||
|
@ -46,7 +46,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
/// Load up and resolve the entities that are supposed to be the control points
|
/// Load up and resolve the entities that are supposed to be the control points
|
||||||
virtual void ReadControlPointEnts(void);
|
void ReadControlPointEnts( void );
|
||||||
|
|
||||||
bool m_bStartActive;
|
bool m_bStartActive;
|
||||||
string_t m_iszEffectName;
|
string_t m_iszEffectName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user