Skip to content

Commit 8cf78e1

Browse files
committed
func_asw_fade: add runtime IO inputs for CollideWithGrenades and CollideWithMarines
1 parent 04fc1bc commit 8cf78e1

5 files changed

Lines changed: 9 additions & 4 deletions

File tree

reactivedrop/fgd/reactivedrop.fgd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@
149149
input SetExcluded( string ) : "Change the NPC class excluded from collisions"
150150
input SetInvert( integer ) : "Set the state of inversion for NPC class exclusion (0 or 1)"
151151
input AllowFade( integer ) : "Enable or disable fading (0 or 1)"
152+
input CollideWithGrenades( integer ) : "Change CollideWithGrenades at runtime (0, 1 or 2)"
153+
input CollideWithMarines( integer ) : "Change CollideWithMarines at runtime (0 or 1)"
152154
]
153155

154156
@PointClass base(prop_dynamic_base, EnableDisable) sphere(fademindist) sphere(fademaxdist) studioprop() = prop_asw_fade :

src/game/client/swarm/c_func_asw_fade.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
IMPLEMENT_CLIENTCLASS_DT( C_Func_ASW_Fade, DT_Func_ASW_Fade, CFunc_ASW_Fade )
88
RecvPropInt( RECVINFO( m_nFadeOpacity ) ),
9+
RecvPropInt( RECVINFO( m_iCollideWithGrenades ) ),
910
RecvPropBool( RECVINFO( m_bAllowFade ) ),
1011
RecvPropBool( RECVINFO( m_bHasProxies ) ),
1112
RecvPropBool( RECVINFO( m_bCollideWithMarines ) ),

src/game/client/swarm/c_func_asw_fade.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class C_Func_ASW_Fade : public C_FuncBrush, public IASW_Fade_List
1717

1818
IMPLEMENT_ASW_FADE_LIST( GetAbsOrigin() );
1919
CNetworkVar( bool, m_bCollideWithMarines );
20+
CNetworkVar( byte, m_iCollideWithGrenades );
2021
};
2122

2223
#endif // _INCLUDED_C_FUNC_ASW_FADE_H

src/game/server/swarm/func_asw_fade.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ LINK_ENTITY_TO_CLASS( func_asw_fade, CFunc_ASW_Fade );
1212

1313
BEGIN_DATADESC( CFunc_ASW_Fade )
1414
DEFINE_FIELD( m_bHasProxies, FIELD_BOOLEAN ),
15-
DEFINE_KEYFIELD( m_iCollideWithGrenades, FIELD_CHARACTER, "CollideWithGrenades" ),
16-
DEFINE_KEYFIELD( m_bCollideWithMarines, FIELD_BOOLEAN, "CollideWithMarines" ),
1715
DEFINE_KEYFIELD( m_nFadeOpacity, FIELD_CHARACTER, "fade_opacity" ),
16+
DEFINE_INPUT( m_iCollideWithGrenades, FIELD_CHARACTER, "CollideWithGrenades" ),
17+
DEFINE_INPUT( m_bCollideWithMarines, FIELD_BOOLEAN, "CollideWithMarines" ),
1818
DEFINE_INPUT( m_bAllowFade, FIELD_BOOLEAN, "AllowFade" ),
1919
END_DATADESC()
2020

2121
IMPLEMENT_SERVERCLASS_ST( CFunc_ASW_Fade, DT_Func_ASW_Fade )
2222
SendPropInt( SENDINFO( m_nFadeOpacity ), 8, SPROP_UNSIGNED ),
23+
SendPropInt( SENDINFO( m_iCollideWithGrenades ), 2, SPROP_UNSIGNED ),
24+
SendPropBool( SENDINFO( m_bCollideWithMarines ) ),
2325
SendPropBool( SENDINFO( m_bAllowFade ) ),
2426
SendPropBool( SENDINFO( m_bHasProxies ) ),
25-
SendPropBool( SENDINFO( m_bCollideWithMarines ) ),
2627
END_SEND_TABLE()
2728

2829
CFunc_ASW_Fade::CFunc_ASW_Fade()

src/game/server/swarm/func_asw_fade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CFunc_ASW_Fade : public CFuncBrush
2828
// 0 = only when grenade spawns above the brush
2929
// 1 = always
3030
// 2 = never
31-
byte m_iCollideWithGrenades;
31+
CNetworkVar( byte, m_iCollideWithGrenades );
3232
CNetworkVar( bool, m_bCollideWithMarines );
3333
CNetworkVar( byte, m_nFadeOpacity );
3434
CNetworkVar( bool, m_bAllowFade );

0 commit comments

Comments
 (0)