This commit is contained in:
speedvoltage 2025-03-29 21:43:37 +01:00 committed by GitHub
commit 18c70e4123
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -260,8 +260,9 @@ void CFuncVehicleClip::InputDisable( inputdata_t &data )
//============================= FUNC_CONVEYOR =======================================
#define SF_CONVEYOR_VISUAL 0x0001
#define SF_CONVEYOR_NOTSOLID 0x0002
#define SF_CONVEYOR_VISUAL 0x0001
#define SF_CONVEYOR_NOTSOLID 0x0002
#define SF_CONVEYOR_START_DISABLED 0x0003
class CFuncConveyor : public CFuncWall
{
@ -293,9 +294,10 @@ LINK_ENTITY_TO_CLASS( func_conveyor, CFuncConveyor );
BEGIN_DATADESC( CFuncConveyor )
DEFINE_INPUTFUNC( FIELD_VOID, "ToggleDirection", InputToggleDirection ),
DEFINE_INPUTFUNC( FIELD_VOID, "SetSpeed", InputSetSpeed ),
DEFINE_INPUTFUNC( FIELD_FLOAT, "SetSpeed", InputSetSpeed ),
DEFINE_KEYFIELD( m_vecMoveDir, FIELD_VECTOR, "movedir" ),
DEFINE_KEYFIELD( m_flSpeed, FIELD_FLOAT, "speed" ),
DEFINE_FIELD( m_flConveyorSpeed, FIELD_FLOAT ),
END_DATADESC()
@ -328,8 +330,13 @@ void CFuncConveyor::Spawn( void )
AddSolidFlags( FSOLID_NOT_SOLID );
}
if ( m_flSpeed == 0 )
m_flSpeed = 100;
if ( !HasSpawnFlags( SF_CONVEYOR_VISUAL ) )
{
if ( m_flSpeed == 0 )
{
m_flSpeed = 100;
}
}
UpdateSpeed( m_flSpeed );
}