Sync the public SDK with latest from TF2

Includes a manually merged MRs from wgetJane wrt. scattergun prediction and minktusk with readme changes.
This commit is contained in:
Autumn Ashton 2025-03-08 19:39:35 +00:00
parent feb4f90350
commit a62efecf62
20 changed files with 39 additions and 43 deletions

View File

@ -18,6 +18,6 @@ WARRANTY OF ANY KIND. VALVE EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS O
INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, TITLE AND FITNESS FOR A PARTICULAR PURPOSE.
LIMITATION OF LIABILITY. VALVE AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES WHATSOEVER ) THAT MAY BE INCURRED BY YOU EVEN IF VALVE HAS BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF SUCH DAMAGES.
OR CONSEQUENTIAL DAMAGES WHATSOEVER THAT MAY BE INCURRED BY YOU EVEN IF VALVE HAS BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF SUCH DAMAGES.

View File

@ -16,7 +16,11 @@ Clone the repository using the following command:
Requirements:
- Source SDK 2013 Multiplayer installed via Steam
- Visual Studio 2022
- Visual Studio 2022 with the following workload and components:
- Desktop development with C++:
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- Windows 11 SDK (10.0.22621.0) or Windows 10 SDK (10.0.19041.1)
- Python 3.13 or later
Inside the cloned directory, navigate to `src`, run:
```bat

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -191,12 +191,12 @@ void CMoveHelperClient::ProcessImpacts( void )
}
// misyl: Debug
if ( vOldLocalVel != vOldAbsVel )
{
Msg( "%d\n", gpGlobals->tickcount );
Msg( "vOldLocalVel: %f %f %f\n", vOldLocalVel.x, vOldLocalVel.y, vOldLocalVel.z );
Msg( "vOldAbsVel: %f %f %f\n", vOldAbsVel.x, vOldAbsVel.y, vOldAbsVel.z );
}
// if ( vOldLocalVel != vOldAbsVel )
// {
// Msg( "%d\n", gpGlobals->tickcount );
// Msg( "vOldLocalVel: %f %f %f\n", vOldLocalVel.x, vOldLocalVel.y, vOldLocalVel.z );
// Msg( "vOldAbsVel: %f %f %f\n", vOldAbsVel.x, vOldAbsVel.y, vOldAbsVel.z );
// }
// Restore the velocity
m_pHost->SetAbsVelocity( vOldAbsVel );
//m_pHost->SetLocalVelocity( vOldLocalVel );

View File

@ -547,7 +547,7 @@ void CTFAutoRP::ModifySpeech( const char *pszInText, char *pszOutText, int iOutL
{
szStoredWord[0] = toupper( szStoredWord[0] );
}
else if ( pszCurWord[0] >= 'a' && pszCurWord[0] <= 'a' )
else if ( pszCurWord[0] >= 'a' && pszCurWord[0] <= 'z' )
{
szStoredWord[0] = tolower( szStoredWord[0] );
}

View File

@ -95,9 +95,9 @@ ConVar spec_freeze_traveltime( "spec_freeze_traveltime", "0.4", FCVAR_CHEAT | FC
ConVar sv_bonus_challenge( "sv_bonus_challenge", "0", FCVAR_REPLICATED, "Set to values other than 0 to select a bonus map challenge type." );
ConVar sv_chat_bucket_size_tier1( "sv_chat_bucket_size_tier1", "4", FCVAR_NONE, "The maxmimum size of the short term chat msg bucket." );
ConVar sv_chat_bucket_size_tier1( "sv_chat_bucket_size_tier1", "4", FCVAR_NONE, "The maximum size of the short term chat msg bucket." );
ConVar sv_chat_seconds_per_msg_tier1( "sv_chat_seconds_per_msg_tier1", "3", FCVAR_NONE, "The number of seconds to accrue an additional short term chat msg." );
ConVar sv_chat_bucket_size_tier2( "sv_chat_bucket_size_tier2", "30", FCVAR_NONE, "The maxmimum size of the long term chat msg bucket." );
ConVar sv_chat_bucket_size_tier2( "sv_chat_bucket_size_tier2", "30", FCVAR_NONE, "The maximum size of the long term chat msg bucket." );
ConVar sv_chat_seconds_per_msg_tier2( "sv_chat_seconds_per_msg_tier2", "10", FCVAR_NONE, "The number of seconds to accrue an additional long term chat msg." );
static ConVar sv_maxusrcmdprocessticks( "sv_maxusrcmdprocessticks", "24", FCVAR_NOTIFY, "Maximum number of client-issued usrcmd ticks that can be replayed in packet loss conditions, 0 to allow no restrictions" );
@ -8101,13 +8101,6 @@ void CMovementSpeedMod::InputSpeedMod(inputdata_t &data)
}
}
void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp* pProp, const void* pStruct, const void* pVarData, DVariant* pOut, int iElement, int objectID )
{
int mask = ( 1 << PLAYER_FLAG_BITS ) - 1;
int data = *( int* )pVarData;
pOut->m_Int = ( data & mask );
}
// -------------------------------------------------------------------------------- //
// SendTable for CPlayerState.
@ -8187,7 +8180,7 @@ void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp* pProp, const voi
SendPropInt (SENDINFO(m_iBonusProgress), 15 ),
SendPropInt (SENDINFO(m_iBonusChallenge), 4 ),
SendPropFloat (SENDINFO(m_flMaxspeed), 12, SPROP_ROUNDDOWN, 0.0f, 2048.0f ), // CL
SendPropInt (SENDINFO(m_fFlags), PLAYER_FLAG_BITS, SPROP_UNSIGNED|SPROP_CHANGES_OFTEN, SendProxy_CropFlagsToPlayerFlagBitsLength ),
SendPropInt (SENDINFO(m_fFlags), 0, SPROP_UNSIGNED|SPROP_CHANGES_OFTEN ),
SendPropInt (SENDINFO(m_iObserverMode), 3, SPROP_UNSIGNED ),
SendPropEHandle (SENDINFO(m_hObserverTarget) ),
SendPropInt (SENDINFO(m_iFOV), 8, SPROP_UNSIGNED ),

View File

@ -1156,7 +1156,8 @@ int CTeamControlPointMaster::GetNumPointsOwnedByTeam( int iTeam )
//-----------------------------------------------------------------------------
int CTeamControlPointMaster::CalcNumRoundsRemaining( int iTeam )
{
if (m_ControlPointRounds.Count() == 0) return 0;
if ( m_ControlPointRounds.IsEmpty() )
return 0;
// To determine how many rounds remain for a given team if it consistently wins mini-rounds, we have to
// simulate forward each mini-round and track the control point ownership that would result

View File

@ -996,7 +996,6 @@ CTFPlayer::CTFPlayer()
m_flNextChangeClassTime = 0.0f;
m_flNextChangeTeamTime = 0.0f;
m_bScattergunJump = false;
m_iOldStunFlags = 0;
m_iLastWeaponSlot = 1;
m_iNumberofDominations = 0;
@ -3751,7 +3750,6 @@ void CTFPlayer::Spawn()
m_Shared.SetFeignDeathReady( false );
m_bScattergunJump = false;
m_iOldStunFlags = 0;
m_flAccumulatedHealthRegen = 0;

View File

@ -938,7 +938,6 @@ public:
bool m_bSuicideExplode;
bool m_bScattergunJump;
int m_iOldStunFlags;
bool m_bFlipViewModels;

View File

@ -54,8 +54,6 @@ BEGIN_DATADESC( CBaseGrenade )
END_DATADESC()
void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID);
#endif
IMPLEMENT_NETWORKCLASS_ALIASED( BaseGrenade, DT_BaseGrenade )
@ -70,7 +68,7 @@ BEGIN_NETWORK_TABLE( CBaseGrenade, DT_BaseGrenade )
SendPropVector( SENDINFO( m_vecVelocity ), 0, SPROP_NOSCALE ),
// HACK: Use same flag bits as player for now
SendPropInt ( SENDINFO(m_fFlags), PLAYER_FLAG_BITS, SPROP_UNSIGNED, SendProxy_CropFlagsToPlayerFlagBitsLength ),
SendPropInt ( SENDINFO(m_fFlags), 0, SPROP_UNSIGNED ),
#else
RecvPropFloat( RECVINFO( m_flDamage ) ),
RecvPropFloat( RECVINFO( m_DmgRadius ) ),

View File

@ -2957,9 +2957,9 @@ void CTFGameMovement::SetGroundEntity( trace_t *pm )
{
m_pTFPlayer->SpeakConceptIfAllowed( MP_CONCEPT_DOUBLE_JUMP, "started_jumping:0" );
}
m_pTFPlayer->m_Shared.SetWeaponKnockbackID( -1 );
m_pTFPlayer->m_bScattergunJump = false;
#endif // GAME_DLL
m_pTFPlayer->m_Shared.SetWeaponKnockbackID( -1 );
m_pTFPlayer->m_Shared.m_bScattergunJump = false;
m_pTFPlayer->m_Shared.SetAirDash( 0 );
m_pTFPlayer->m_Shared.SetAirDucked( 0 );

View File

@ -788,6 +788,8 @@ CTFPlayerShared::CTFPlayerShared()
m_flPrevInvisibility = 0.f;
m_flTmpDamageBonusAmount = 1.0f;
m_bScattergunJump = false;
m_bFeignDeathReady = false;
m_fCloakConsumeRate = tf_spy_cloak_consume_rate.GetFloat();

View File

@ -1216,6 +1216,8 @@ private:
#endif
public:
bool m_bScattergunJump;
float m_flStunFade;
float m_flStunEnd;
float m_flStunMid;

View File

@ -1144,7 +1144,7 @@ protected:
int nNumJumps = pNonConstPlayer->GetGroundEntity() == NULL ? 1 : 0;
nNumJumps += pPlayer->m_Shared.GetAirDash();
nNumJumps += pPlayer->m_bScattergunJump;
nNumJumps += pPlayer->m_Shared.m_bScattergunJump;
if ( m_eJumpingState == JUMPING_STATE_IS_NOT_JUMPING )
{
@ -3027,7 +3027,7 @@ bool CTFJumpStateQuestModifier::BPassesModifier( const CTFPlayer *pOwner, Invali
#else
int nNumJumps = const_cast< CTFPlayer* >( pOwner )->GetGroundEntity() == NULL ? 1 : 0;
nNumJumps += pOwner->m_Shared.GetAirDash();
nNumJumps += pOwner->m_bScattergunJump;
nNumJumps += pOwner->m_Shared.m_bScattergunJump;
// If we want them on the ground, make sure they're on the ground
if ( m_nJumpCount == 0 )

View File

@ -536,6 +536,7 @@ bool CTFRocketPack::Launch( void )
m_vecLaunchDir = CalcRocketForceFromPlayer( pOwner );
RocketLaunchPlayer( pOwner, m_vecLaunchDir, false );
#ifdef GAME_DLL
SetContextThink( &CTFRocketPack::PassengerDelayLaunchThink, gpGlobals->curtime + TF_ROCKETPACK_PASSENGER_DELAY_LAUNCH, "PassengerDelayLaunchThink" );
#endif

View File

@ -316,7 +316,6 @@ extern float AirBurstDamageForce( const Vector &size, float damage, float scale
//-----------------------------------------------------------------------------
void CTFScatterGun::FireBullet( CTFPlayer *pPlayer )
{
#ifndef CLIENT_DLL
if ( HasKnockback() )
{
// Perform some knock back.
@ -329,9 +328,9 @@ void CTFScatterGun::FireBullet( CTFPlayer *pPlayer )
return;
// Knock the firer back!
if ( !(pOwner->GetFlags() & FL_ONGROUND) && !pPlayer->m_bScattergunJump )
if ( !(pOwner->GetFlags() & FL_ONGROUND) && !pPlayer->m_Shared.m_bScattergunJump )
{
pPlayer->m_bScattergunJump = true;
pPlayer->m_Shared.m_bScattergunJump = true;
pOwner->m_Shared.StunPlayer( 0.3f, 1.f, TF_STUN_MOVEMENT | TF_STUN_MOVEMENT_FORWARD_ONLY );
@ -341,15 +340,15 @@ void CTFScatterGun::FireBullet( CTFPlayer *pPlayer )
AngleVectors( pOwner->EyeAngles(), &vecForward );
Vector vecForce = vecForward * -flForce;
EntityMatrix mtxPlayer;
mtxPlayer.InitFromEntity( pOwner );
VMatrix mtxPlayer;
mtxPlayer.SetupMatrixOrgAngles( pOwner->GetAbsOrigin(), pOwner->EyeAngles() );
Vector vecAbsVelocity = pOwner->GetAbsVelocity();
Vector vecAbsVelocityAsPoint = vecAbsVelocity + pOwner->GetAbsOrigin();
Vector vecLocalVelocity = mtxPlayer.WorldToLocal( vecAbsVelocityAsPoint );
Vector vecLocalVelocity = mtxPlayer.VMul4x3Transpose( vecAbsVelocityAsPoint );
vecLocalVelocity.x = -300;
vecAbsVelocityAsPoint = mtxPlayer.LocalToWorld( vecLocalVelocity );
vecAbsVelocityAsPoint = mtxPlayer.VMul4x3( vecLocalVelocity );
vecAbsVelocity = vecAbsVelocityAsPoint - pOwner->GetAbsOrigin();
pOwner->SetAbsVelocity( vecAbsVelocity );
@ -360,7 +359,6 @@ void CTFScatterGun::FireBullet( CTFPlayer *pPlayer )
pOwner->RemoveFlag( FL_ONGROUND );
}
}
#endif
BaseClass::FireBullet( pPlayer );
}

View File

@ -155,7 +155,7 @@ float4 main( PS_INPUT i ) : COLOR
if( bFlashlight )
{
float3 worldSpaceNormal;
// Make the unbumped version not so fucking stupid and not need tangentSpaceTranspose you knob.
// Make the unbumped version not need tangentSpaceTranspose
worldSpaceNormal = mul( normal, i.tangentSpaceTranspose );
int nShadowSampleLevel = 0;

View File

@ -1022,11 +1022,11 @@ void PropertySheet::PerformLayout()
if(_showTabs)
{
_activePage->SetBounds(0, tabHeight, wide, tall - tabHeight);
_activePage->SetBounds(0, tabHeight + m_iPageYOffset, wide, tall - tabHeight);
}
else
{
_activePage->SetBounds(0, 0, wide, tall );
_activePage->SetBounds(0, m_iPageYOffset, wide, tall );
}
_activePage->InvalidateLayout();
}
@ -1060,11 +1060,11 @@ void PropertySheet::PerformLayout()
if (m_PageTabs[i] == _activeTab)
{
// active tab is taller
_activeTab->SetBounds(xtab, 2, width, tabHeight);
_activeTab->SetBounds(xtab, 2 + m_iPageYOffset, width, tabHeight);
}
else
{
m_PageTabs[i]->SetBounds(xtab, 4, width, tabHeight - 2);
m_PageTabs[i]->SetBounds(xtab, 4 + m_iPageYOffset, width, tabHeight - 2);
}
m_PageTabs[i]->SetVisible(true);
xtab += (width + 1) + m_iTabXDelta;