upload "kind" alien swarm

This commit is contained in:
nillerusr
2023-10-03 17:23:56 +03:00
parent b7bd94c52e
commit 7d3c0d8b5a
4229 changed files with 462903 additions and 495158 deletions

View File

@@ -1,4 +1,4 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ====
//
// Purpose: Implements buttons.
//
@@ -78,6 +78,8 @@ END_DATADESC()
LINK_ENTITY_TO_CLASS( func_button, CBaseButton );
IMPLEMENT_SERVERCLASS_ST( CBaseButton, DT_BaseButton )
END_SEND_TABLE()
void CBaseButton::Precache( void )
@@ -235,7 +237,7 @@ void CBaseButton::Press( CBaseEntity *pActivator, BUTTON_CODE eCode )
// Temporarily disable the touch function, until movement is finished.
SetTouch( NULL );
if ( ( ( eCode == BUTTON_PRESS ) && ( m_toggle_state == TS_AT_TOP ) ) ||
if ( ( eCode == BUTTON_PRESS ) && ( m_toggle_state == TS_AT_TOP ) ||
( ( eCode == BUTTON_RETURN ) && ( m_toggle_state == TS_AT_TOP || m_toggle_state == TS_GOING_UP ) ) )
{
if ( m_sNoise != NULL_STRING )
@@ -802,7 +804,7 @@ int CBaseButton::DrawDebugTextOverlays()
if (m_debugOverlays & OVERLAY_TEXT_BIT)
{
static const char *pszStates[] =
static char *pszStates[] =
{
"Pressed",
"Unpressed",
@@ -864,11 +866,7 @@ void CRotButton::Spawn( void )
SetMoveType( MOVETYPE_PUSH );
#ifdef HL1_DLL
SetSolid( SOLID_BSP );
#else
SetSolid( SOLID_VPHYSICS );
#endif
if ( HasSpawnFlags( SF_ROTBUTTON_NOTSOLID ) )
{
AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );
@@ -987,10 +985,10 @@ void CMomentaryRotButton::Spawn( void )
}
// Clamp start position and issue bounds warning
if (m_flStartPosition < 0.0f || m_flStartPosition > 1.0f)
if (m_flStartPosition < 0.0 || m_flStartPosition > 1.0)
{
Warning("WARNING: Momentary door (%s) start position not between 0 and 1. Clamping.\n",GetDebugName());
m_flStartPosition = clamp(m_IdealYaw, 0.f, 1.f);
m_flStartPosition = clamp(m_IdealYaw, 0, 1);
}
// Check direction fields (for backward compatibility)
@@ -1041,11 +1039,7 @@ void CMomentaryRotButton::Spawn( void )
UpdateTarget(0,this);
}
#ifdef HL1_DLL
SetSolid( SOLID_BSP );
#else
SetSolid( SOLID_VPHYSICS );
#endif
if (HasSpawnFlags(SF_ROTBUTTON_NOTSOLID))
{
AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );
@@ -1124,7 +1118,7 @@ float CMomentaryRotButton::GetPos( const QAngle &vecAngles )
}
float flPos = flScale * CBaseToggle::AxisDelta( m_spawnflags, vecAngles, m_start ) / m_flMoveDistance;
return( clamp( flPos, 0.f, 1.f ));
return( clamp( flPos, 0, 1 ));
}
@@ -1134,7 +1128,7 @@ float CMomentaryRotButton::GetPos( const QAngle &vecAngles )
//------------------------------------------------------------------------------
void CMomentaryRotButton::InputSetPosition( inputdata_t &inputdata )
{
m_IdealYaw = clamp( inputdata.value.Float(), 0.f, 1.f );
m_IdealYaw = clamp( inputdata.value.Float(), 0, 1 );
float flCurPos = GetPos( GetLocalAngles() );
if ( flCurPos < m_IdealYaw )
@@ -1187,7 +1181,7 @@ void CMomentaryRotButton::InputSetPosition( inputdata_t &inputdata )
//------------------------------------------------------------------------------
void CMomentaryRotButton::InputSetPositionImmediately( inputdata_t &inputdata )
{
m_IdealYaw = clamp( inputdata.value.Float(), 0.f, 1.f );
m_IdealYaw = clamp( inputdata.value.Float(), 0, 1 );
SetLocalAngles( m_start + m_vecMoveAng * ( m_IdealYaw * m_flMoveDistance ) );
}
@@ -1584,4 +1578,4 @@ void CMomentaryRotButton::Enable( void )
void CMomentaryRotButton::Disable( void )
{
m_bDisabled = true;
}
}