Skip to content
Open
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
42 changes: 41 additions & 1 deletion sp/src/game/server/baseentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ BEGIN_DATADESC_NO_BASE( CBaseEntity )
DEFINE_GLOBAL_KEYFIELD( m_ModelName, FIELD_MODELNAME, "model" ),

DEFINE_KEYFIELD( m_vecBaseVelocity, FIELD_VECTOR, "basevelocity" ),
DEFINE_FIELD( m_vecAbsVelocity, FIELD_VECTOR ),
DEFINE_KEYFIELD( m_vecAbsVelocity, FIELD_VECTOR, "absvelocity" ),
DEFINE_KEYFIELD( m_vecAngVelocity, FIELD_VECTOR, "avelocity" ),
// DEFINE_FIELD( m_vecAbsAngVelocity, FIELD_VECTOR ),
DEFINE_ARRAY( m_rgflCoordinateFrame, FIELD_FLOAT, 12 ), // NOTE: MUST BE IN LOCAL SPACE, NOT POSITION_VECTOR!!! (see CBaseEntity::Restore)
Expand Down Expand Up @@ -2114,6 +2114,10 @@ BEGIN_DATADESC_NO_BASE( CBaseEntity )
DEFINE_INPUTFUNC( FIELD_STRING, "AddOutput", InputAddOutput ),
#ifdef MAPBASE
DEFINE_INPUTFUNC( FIELD_STRING, "ChangeVariable", InputChangeVariable ),
DEFINE_INPUTFUNC( FIELD_VOID, "DisableDraw", InputDisableDraw ),
DEFINE_INPUTFUNC( FIELD_VOID, "EnableDraw", InputEnableDraw ),
DEFINE_INPUTFUNC( FIELD_VOID, "IncrementTextureFrameIndex", InputIncrementBrushTexIndex ),
DEFINE_INPUTFUNC( FIELD_INTEGER, "SetTextureFrameIndex", InputSetBrushTexIndex ),
#endif

#ifdef MAPBASE
Expand Down Expand Up @@ -8608,6 +8612,28 @@ float g_debugCounter = 0;

#endif // VMPROFILE

//-----------------------------------------------------------------------------
// Purpose: Increment toggleTextureVar of materials on the entity with
// ToggleTexture material proxy.
// Input : &inputdata -
//-----------------------------------------------------------------------------
void CTextureToggle::InputIncrementBrushTexIndex( inputdata_t& inputdata )
{
int iCurrentIndex = GetTextureFrameIndex() + 1;
SetTextureFrameIndex( iCurrentIndex );
}

//-----------------------------------------------------------------------------
// Purpose: Explicitly set toggleTextureVar of materials on the entity with
// ToggleTexture material proxy.
// Input : &inputdata -
//-----------------------------------------------------------------------------
void CTextureToggle::InputSetBrushTexIndex( inputdata_t& inputdata )
{
int iData = inputdata.value.Int();
SetTextureFrameIndex( iData );
}

//-----------------------------------------------------------------------------
// Returns true if the function was located and called. false otherwise.
// NOTE: Assumes the function takes no parameters at the moment.
Expand Down Expand Up @@ -9009,6 +9035,20 @@ void CBaseEntity::InputEnableShadow( inputdata_t &inputdata )
RemoveEffects( EF_NOSHADOW );
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CBaseEntity::InputDisableDraw( inputdata_t &inputdata )
{
AddEffects( EF_NODRAW );
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CBaseEntity::InputEnableDraw( inputdata_t &inputdata )
{
RemoveEffects( EF_NODRAW );
}

//-----------------------------------------------------------------------------
// Purpose: An input to add a new connection from this entity
// Input : &inputdata -
Expand Down
4 changes: 4 additions & 0 deletions sp/src/game/server/baseentity.h
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ class CBaseEntity : public IServerEntity
void InputDispatchResponse( inputdata_t& inputdata );
void InputDisableShadow( inputdata_t &inputdata );
void InputEnableShadow( inputdata_t &inputdata );
void InputDisableDraw( inputdata_t &inputdata );
void InputEnableDraw( inputdata_t &inputdata );
void InputIncrementBrushTexIndex( inputdata_t &inputdata );
void InputSetBrushTexIndex( inputdata_t &inputdata );
void InputAddOutput( inputdata_t &inputdata );
#ifdef MAPBASE
void InputChangeVariable( inputdata_t &inputdata );
Expand Down