Skip to content

func_conveyor fixes #445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
16 changes: 13 additions & 3 deletions sp/src/game/server/bmodels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ void CFuncVehicleClip::InputDisable( inputdata_t &data )

#define SF_CONVEYOR_VISUAL 0x0001
#define SF_CONVEYOR_NOTSOLID 0x0002
#ifdef MAPBASE
#define SF_CONVEYOR_START_DISABLED 0x0003
#endif // MAPBASE

class CFuncConveyor : public CFuncWall
{
Expand Down Expand Up @@ -285,7 +288,7 @@ 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_FIELD( m_flConveyorSpeed, FIELD_FLOAT ),
Expand Down Expand Up @@ -320,8 +323,15 @@ void CFuncConveyor::Spawn( void )
AddSolidFlags( FSOLID_NOT_SOLID );
}

if ( m_flSpeed == 0 )
m_flSpeed = 100;
#ifdef MAPBASE
if (!HasSpawnFlags(SF_CONVEYOR_VISUAL))
#endif // MAPBASE
{
if (m_flSpeed == 0)
{
m_flSpeed = 100;
}
}

UpdateSpeed( m_flSpeed );
}
Expand Down