Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/game/client/c_func_dust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ IMPLEMENT_CLIENTCLASS_DT_NOBASE( C_Func_Dust, DT_Func_Dust, CFunc_Dust )
RecvPropInt( RECVINFO(m_DustFlags) ),
RecvPropInt( RECVINFO(m_SpeedMax) ),
RecvPropInt( RECVINFO(m_DistMax) ),
#ifdef NEO
RecvPropBool( RECVINFO(m_bAffectedByWind) ),
#endif
RecvPropInt( RECVINFO( m_nModelIndex ) ),
RecvPropFloat( RECVINFO( m_FallSpeed ) ),
RecvPropDataTable( RECVINFO_DT( m_Collision ), 0, &REFERENCE_RECV_TABLE(DT_CollisionProperty) ),
Expand Down Expand Up @@ -88,7 +91,18 @@ void CDustEffect::RenderParticles( CParticleRenderIterator *pIterator )
void CDustEffect::SimulateParticles( CParticleSimulateIterator *pIterator )
{
Vector vecWind;
#ifdef NEO
if ( m_pDust->m_bAffectedByWind )
{
#endif
GetWindspeedAtTime( gpGlobals->curtime, vecWind );
#ifdef NEO
}
else
{
vecWind = vec3_origin;
}
#endif


CFuncDustParticle *pParticle = (CFuncDustParticle*)pIterator->GetFirst();
Expand Down
3 changes: 3 additions & 0 deletions src/game/client/c_func_dust.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ class C_Func_Dust : public C_BaseEntity

float m_FallSpeed; // extra 'gravity'

#ifdef NEO
bool m_bAffectedByWind;
#endif

public:

Expand Down
12 changes: 12 additions & 0 deletions src/game/server/func_dust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class CFunc_Dust : public CBaseEntity

CNetworkVar( float, m_FallSpeed );

#ifdef NEO
CNetworkVar( bool, m_bAffectedByWind );
#endif
public:

CNetworkVar( int, m_DustFlags ); // Combination of DUSTFLAGS_
Expand Down Expand Up @@ -92,6 +95,9 @@ IMPLEMENT_SERVERCLASS_ST_NOBASE( CFunc_Dust, DT_Func_Dust )
SendPropInt( SENDINFO(m_LifetimeMin), 4, SPROP_UNSIGNED ),
SendPropInt( SENDINFO(m_LifetimeMax), 4, SPROP_UNSIGNED ),
SendPropInt( SENDINFO(m_DustFlags), DUST_NUMFLAGS, SPROP_UNSIGNED ),
#ifdef NEO
SendPropBool( SENDINFO(m_bAffectedByWind) ),
#endif

SendPropModelIndex( SENDINFO(m_nModelIndex) ),
SendPropFloat( SENDINFO(m_FallSpeed), 0, SPROP_NOSCALE ),
Expand All @@ -113,6 +119,9 @@ BEGIN_DATADESC( CFunc_Dust )
DEFINE_KEYFIELD( m_DistMax, FIELD_INTEGER, "DistMax" ),
DEFINE_FIELD( m_iAlpha, FIELD_INTEGER ),
DEFINE_KEYFIELD( m_FallSpeed, FIELD_FLOAT, "FallSpeed" ),
#ifdef NEO
DEFINE_KEYFIELD( m_bAffectedByWind, FIELD_BOOLEAN, "AffectedByWind" ),
#endif

DEFINE_INPUTFUNC( FIELD_VOID, "TurnOn", InputTurnOn ),
DEFINE_INPUTFUNC( FIELD_VOID, "TurnOff", InputTurnOff )
Expand Down Expand Up @@ -143,6 +152,9 @@ CFunc_Dust::CFunc_Dust()
{
m_DustFlags = DUSTFLAGS_ON;
m_FallSpeed = 0.0f;
#ifdef NEO
m_bAffectedByWind = true;
#endif
}


Expand Down