From abf6b4542e819edf3c9854a7a24c141a429739e3 Mon Sep 17 00:00:00 2001 From: Autumn Ashton Date: Tue, 25 Feb 2025 20:12:56 +0000 Subject: [PATCH 1/7] Update CONTRIBUTING --- CONTRIBUTING | 47 +++++++++-------------------------------------- 1 file changed, 9 insertions(+), 38 deletions(-) diff --git a/CONTRIBUTING b/CONTRIBUTING index 809ecd58..2896ba11 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -1,38 +1,9 @@ -Thanks for your interest in the Source SDK 2013 project. When you make a -contribution to the project (e.g. create an Issue or submit a Pull Request) -(a "Contribution"), Valve wants to be able to use your Contribution to improve -the SDK and other Valve products. - -As a condition of providing a Contribution, you agree that: -- You grant Valve a non-exclusive, irrevocable, royalty-free, worldwide license -to make, use, sell, reproduce, modify, distribute (directly and indirectly), -and publicly display and perform the Contribution, and any derivative works -that Valve may make from the Contribution, under any intellectual property you -own or have the right to license. -- You warrant and represent that the Contribution is your original creation, -that you have the authority to grant this license to Valve, and that this -license does not require the permission of any third party. Otherwise, you -provide your Contribution "as is" without warranties. - -Should you wish to submit a suggestion or work that is not your original -creation, you may submit it to Valve separate from any Contribution, -explicitly identifying it as sourced from a third party, stating the details -of its origin, and informing Valve of any license or other restriction of -which you are personally aware. - - -Valve is happy to accept pull requests and issues in the source-sdk-2013 -repository in these cases: - * Changes that fix bugs in the SDK deployment process itself. The repository - should build out of the box, and anything that prevents that is a pull - request we want. - * High priority bugs in HL2, the Episodes, or HL2MP that can be fixed in - client.dll or server.dll. - -For other changes we suggest that you issue a pull request to one of these -fine community-maintained repositories instead: - https://developer.valvesoftware.com/wiki/Source-sdk-2013-community-repos - -If you are going to make a pull request, please keep them as granular as -possible. Pull requests with 3-4 unrelated changes in them aren't going to -be accepted. +Thanks for your interest in Source SDK 2013! When you make a contribution to the Source SDK 2013, either by creating an Issue or submitting a Pull Request (a "Contribution"), Valve wants to be able to use your Contribution to improve the Source 2013 SDK and other Valve products. +1. Contributions: When you provide a Contribution, please ensure it is your original creation. You agree to the following license and warranty for any Contributions you provide: +1.1 You grant Valve a non-exclusive, perpetual, irrevocable, royalty-free, sublicensable, and worldwide license to make, use, sell, reproduce, modify, create derivate works, directly and indirectly distribute, publicly display, publish, transmit and perform the Contribution, and any derivative works thereof. . +1.2 You represent and warrant that you are either the owner or authorized licensee of the Contribution, that you have all necessary consents to grant this license to the Contribution to Valve, and that the Contribution does not violate any third-party intellectual property rights. +1.3 Except as set forth in (2) above, you provide your Contribution "as is" without warranties of any kind. +2. Other Materials or Suggestions: If you want to submit any materials or suggestions that are not your original work, you agree to do the following: +2.1 You may submit other materials or suggestions to Valve separate from any Contributions; +2.2 You will explicitly identify them as sourced from a third party and state the details of its origin; and +2.3 You will include Valve with any third party licenses, terms, or other restrictions that apply, if you are aware of any. From 0651ee54e0ac781d2b958f155b84a90662fe511c Mon Sep 17 00:00:00 2001 From: Autumn Ashton Date: Tue, 25 Feb 2025 20:38:04 +0000 Subject: [PATCH 2/7] Add CONTRIBUTING text to PR template --- .github/pull_request_template.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..ccb5c925 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ + + +# Description From c496173cf3efd6b41c1071b538968c5468b47aad Mon Sep 17 00:00:00 2001 From: ficool2 <34815548+ficool2@users.noreply.github.com> Date: Fri, 21 Feb 2025 20:28:16 +0000 Subject: [PATCH 3/7] Fix radial fog not being enabled in 3D sky on official maps --- src/game/server/SkyCamera.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/server/SkyCamera.cpp b/src/game/server/SkyCamera.cpp index ede4ec97..237ec759 100644 --- a/src/game/server/SkyCamera.cpp +++ b/src/game/server/SkyCamera.cpp @@ -146,4 +146,10 @@ void CSkyCamera::Activate( ) } } #endif + + // matches the behavior of fog controller + if ( GameRules()->IsOfficialMap() ) + { + m_skyboxData.fog.radial = true; + } } From 238a15a79dd2c3c151e98eea8b39e5f161a93703 Mon Sep 17 00:00:00 2001 From: ficool2 <34815548+ficool2@users.noreply.github.com> Date: Sat, 22 Feb 2025 22:44:08 +0000 Subject: [PATCH 4/7] Add convar to control max MvM robots --- .../tf/player_vs_environment/tf_population_manager.cpp | 2 +- .../server/tf/player_vs_environment/tf_population_manager.h | 2 -- .../tf/player_vs_environment/tf_populator_spawners.cpp | 6 +++--- src/game/server/tf/player_vs_environment/tf_populators.cpp | 4 ++-- src/game/shared/tf/tf_gamerules.cpp | 1 + src/game/shared/tf/tf_gamerules.h | 1 + 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/game/server/tf/player_vs_environment/tf_population_manager.cpp b/src/game/server/tf/player_vs_environment/tf_population_manager.cpp index 4eaa037a..7d5b1bf5 100644 --- a/src/game/server/tf/player_vs_environment/tf_population_manager.cpp +++ b/src/game/server/tf/player_vs_environment/tf_population_manager.cpp @@ -2626,7 +2626,7 @@ void CPopulationManager::AllocateBots() Warning( "%d bots were already allocated some how before CPopulationManager::AllocateBots was called\n", botVector.Count() ); } - for ( int i = nNumEnemyBots; i < MVM_INVADERS_TEAM_SIZE; ++i ) + for ( int i = nNumEnemyBots; i < tf_mvm_max_invaders.GetInt(); ++i ) { CTFBot* newBot = NextBotCreatePlayerBot< CTFBot >( "TFBot", false ); if ( newBot ) diff --git a/src/game/server/tf/player_vs_environment/tf_population_manager.h b/src/game/server/tf/player_vs_environment/tf_population_manager.h index 2ce60bc8..c6ca3d22 100644 --- a/src/game/server/tf/player_vs_environment/tf_population_manager.h +++ b/src/game/server/tf/player_vs_environment/tf_population_manager.h @@ -137,8 +137,6 @@ public: bool IsBonusRound() const { return m_bBonusRound; } CBaseCombatCharacter* GetBonusBoss() const { return m_hBonusBoss; } - enum { MVM_INVADERS_TEAM_SIZE = 22 }; - static bool GetWavesUseReadyBetween() { return true; } void SetDefaultEventChangeAttributesName( const char* pszDefaultEventChangeAttributesName ) { m_defaultEventChangeAttributesName = pszDefaultEventChangeAttributesName; } diff --git a/src/game/server/tf/player_vs_environment/tf_populator_spawners.cpp b/src/game/server/tf/player_vs_environment/tf_populator_spawners.cpp index 2c5a0879..635edd70 100644 --- a/src/game/server/tf/player_vs_environment/tf_populator_spawners.cpp +++ b/src/game/server/tf/player_vs_environment/tf_populator_spawners.cpp @@ -1014,7 +1014,7 @@ bool CTFBotSpawner::Spawn( const Vector &rawHere, EntityHandleVector_t *result ) nNumEnemyBots = botVector.Count(); - if ( nNumEnemyBots >= CPopulationManager::MVM_INVADERS_TEAM_SIZE ) + if ( nNumEnemyBots >= tf_mvm_max_invaders.GetInt() ) { // no room for more if ( tf_populator_debug.GetBool() ) @@ -1023,10 +1023,10 @@ bool CTFBotSpawner::Spawn( const Vector &rawHere, EntityHandleVector_t *result ) } // extra guard if we're over full on bots - if ( nNumEnemyBots > CPopulationManager::MVM_INVADERS_TEAM_SIZE ) + if ( nNumEnemyBots > tf_mvm_max_invaders.GetInt() ) { // Kick bots until we are at the proper number starting with spectator bots - int iNumberToKick = nNumEnemyBots - CPopulationManager::MVM_INVADERS_TEAM_SIZE; + int iNumberToKick = nNumEnemyBots - tf_mvm_max_invaders.GetInt(); int iKickedBots = 0; // loop through spectators and invaders in that order diff --git a/src/game/server/tf/player_vs_environment/tf_populators.cpp b/src/game/server/tf/player_vs_environment/tf_populators.cpp index a568bb6c..05539bb7 100644 --- a/src/game/server/tf/player_vs_environment/tf_populators.cpp +++ b/src/game/server/tf/player_vs_environment/tf_populators.cpp @@ -741,7 +741,7 @@ bool CMissionPopulator::UpdateMission( CTFBot::MissionType mission ) // are there enough free slots? int currentEnemyCount = GetGlobalTeam( TF_TEAM_PVE_INVADERS )->GetNumPlayers(); - if ( currentEnemyCount + m_desiredCount > CPopulationManager::MVM_INVADERS_TEAM_SIZE ) + if ( currentEnemyCount + m_desiredCount > tf_mvm_max_invaders.GetInt() ) { // not enough slots yet if ( tf_populator_debug.GetBool() ) @@ -1578,7 +1578,7 @@ void CWaveSpawnPopulator::Update( void ) int currentEnemyCount = GetGlobalTeam( TF_TEAM_PVE_INVADERS )->GetNumPlayers(); - if ( currentEnemyCount + m_spawnCount + m_reservedPlayerSlotCount > CPopulationManager::MVM_INVADERS_TEAM_SIZE ) + if ( currentEnemyCount + m_spawnCount + m_reservedPlayerSlotCount > tf_mvm_max_invaders.GetInt() ) { // no space right now return; diff --git a/src/game/shared/tf/tf_gamerules.cpp b/src/game/shared/tf/tf_gamerules.cpp index 0a009162..dbfce094 100644 --- a/src/game/shared/tf/tf_gamerules.cpp +++ b/src/game/shared/tf/tf_gamerules.cpp @@ -875,6 +875,7 @@ ConVar tf_raid_allow_overtime( "tf_raid_allow_overtime", "0"/*, FCVAR_CHEAT*/ ); ConVar tf_mvm_defenders_team_size( "tf_mvm_defenders_team_size", "6", FCVAR_REPLICATED | FCVAR_NOTIFY, "Maximum number of defenders in MvM" ); ConVar tf_mvm_max_connected_players( "tf_mvm_max_connected_players", "10", FCVAR_GAMEDLL, "Maximum number of connected real players in MvM" ); +ConVar tf_mvm_max_invaders( "tf_mvm_max_invaders", "22", FCVAR_GAMEDLL, "Maximum number of invaders in MvM" ); ConVar tf_mvm_min_players_to_start( "tf_mvm_min_players_to_start", "3", FCVAR_REPLICATED | FCVAR_NOTIFY, "Minimum number of players connected to start a countdown timer" ); ConVar tf_mvm_respec_enabled( "tf_mvm_respec_enabled", "1", FCVAR_CHEAT | FCVAR_REPLICATED, "Allow players to refund credits spent on player and item upgrades." ); diff --git a/src/game/shared/tf/tf_gamerules.h b/src/game/shared/tf/tf_gamerules.h index 1394fa91..56bd58ba 100644 --- a/src/game/shared/tf/tf_gamerules.h +++ b/src/game/shared/tf/tf_gamerules.h @@ -97,6 +97,7 @@ class CMannVsMachineUpgrades; //extern ConVar tf_populator_damage_multiplier; extern ConVar tf_mvm_defenders_team_size; +extern ConVar tf_mvm_max_invaders; const int kLadder_TeamSize_6v6 = 6; const int kLadder_TeamSize_9v9 = 9; From 46b8c3a544ef453285b1652c58c201f6f40aa32c Mon Sep 17 00:00:00 2001 From: copperpixel <48454166+copperpixel@users.noreply.github.com> Date: Thu, 27 Feb 2025 01:01:40 +0100 Subject: [PATCH 5/7] Fix PLAYER_FLAG_BITS truncating m_fFlags sent to clients --- src/game/server/player.cpp | 8 ++++---- src/public/const.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 8df710cc..c132bfc3 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -8101,14 +8101,14 @@ void CMovementSpeedMod::InputSpeedMod(inputdata_t &data) } } - -void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp *pProp, const void *pStruct, const void *pVarData, DVariant *pOut, int iElement, int objectID) +void SendProxy_CropFlagsToPlayerFlagBitsLength( const SendProp* pProp, const void* pStruct, const void* pVarData, DVariant* pOut, int iElement, int objectID ) { - int mask = (1<m_Int = ( data & mask ); } + // -------------------------------------------------------------------------------- // // SendTable for CPlayerState. // -------------------------------------------------------------------------------- // diff --git a/src/public/const.h b/src/public/const.h index 256dff2d..d66e8ea0 100644 --- a/src/public/const.h +++ b/src/public/const.h @@ -163,7 +163,7 @@ #define FL_INWATER (1<<10) // In water // NOTE if you move things up, make sure to change this value -#define PLAYER_FLAG_BITS 11 +#define PLAYER_FLAG_BITS 32 #define FL_FLY (1<<11) // Changes the SV_Movestep() behavior to not need to be on ground #define FL_SWIM (1<<12) // Changes the SV_Movestep() behavior to not need to be on ground (but stay in water) From 3de9978bb918175c8d8327dec1159bc1ce7ca8e9 Mon Sep 17 00:00:00 2001 From: ficool2 <34815548+ficool2@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:59:28 +0000 Subject: [PATCH 6/7] Fix middle mouse kicking you in Passtime --- src/game/client/tf/c_tf_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/tf/c_tf_player.cpp b/src/game/client/tf/c_tf_player.cpp index 0d2be67b..921236ff 100644 --- a/src/game/client/tf/c_tf_player.cpp +++ b/src/game/client/tf/c_tf_player.cpp @@ -6050,7 +6050,7 @@ void C_TFPlayer::ClientThink() // // Passtime ask for ball button // - if ( m_nButtons & IN_ATTACK3 ) + if ( m_afButtonPressed & IN_ATTACK3 ) { engine->ClientCmd("voicemenu 1 8"); } From aea94b32cbefeba5d16ef6fc70eff9508cf11673 Mon Sep 17 00:00:00 2001 From: wget Date: Thu, 27 Feb 2025 09:06:34 +0800 Subject: [PATCH 7/7] tf2: Fix prediction for jumping when huntsman is charged/released (#797) * fix prediction for jumping when huntsman is charged/released * remove SetInternalChargeBeginTime override from CTFCompoundBow https://github.com/ValveSoftware/source-sdk-2013/pull/797#discussion_r1970597141 --- src/game/shared/tf/tf_player_shared.cpp | 7 +++++++ src/game/shared/tf/tf_weapon_compound_bow.cpp | 16 ++-------------- src/game/shared/tf/tf_weapon_compound_bow.h | 3 +-- src/game/shared/tf/tf_weaponbase.h | 1 + 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/src/game/shared/tf/tf_player_shared.cpp b/src/game/shared/tf/tf_player_shared.cpp index 4da5c3df..a2db0058 100644 --- a/src/game/shared/tf/tf_player_shared.cpp +++ b/src/game/shared/tf/tf_player_shared.cpp @@ -12110,6 +12110,13 @@ bool CTFPlayer::CanJump() const if ( m_Shared.InCond( TF_COND_TAUNTING ) ) return false; + CTFWeaponBase *pActiveWeapon = m_Shared.GetActiveTFWeapon(); + if ( pActiveWeapon ) + { + if ( !pActiveWeapon->OwnerCanJump() ) + return false; + } + int iNoJump = 0; CALL_ATTRIB_HOOK_INT( iNoJump, no_jump ); diff --git a/src/game/shared/tf/tf_weapon_compound_bow.cpp b/src/game/shared/tf/tf_weapon_compound_bow.cpp index 449329c7..768ae084 100644 --- a/src/game/shared/tf/tf_weapon_compound_bow.cpp +++ b/src/game/shared/tf/tf_weapon_compound_bow.cpp @@ -654,19 +654,7 @@ void CTFCompoundBow::SetArrowAlight( bool bAlight ) //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- -void CTFCompoundBow::SetInternalChargeBeginTime( float flChargeBeginTime ) +bool CTFCompoundBow::OwnerCanJump( void ) { -#ifdef GAME_DLL - float flCurrentChargeBeginTime = GetInternalChargeBeginTime(); - if ( flCurrentChargeBeginTime == 0.f && flChargeBeginTime > 0.f ) - { - DisableJump(); - } - else if ( flCurrentChargeBeginTime > 0.f && flChargeBeginTime == 0.f ) - { - EnableJump(); - } -#endif // GAME_DLL - - BaseClass::SetInternalChargeBeginTime( flChargeBeginTime ); + return GetInternalChargeBeginTime() == 0.f; } diff --git a/src/game/shared/tf/tf_weapon_compound_bow.h b/src/game/shared/tf/tf_weapon_compound_bow.h index cbbbb9c7..a192166d 100644 --- a/src/game/shared/tf/tf_weapon_compound_bow.h +++ b/src/game/shared/tf/tf_weapon_compound_bow.h @@ -89,8 +89,7 @@ public: void SetArrowAlight( bool bAlight ); -protected: - virtual void SetInternalChargeBeginTime( float flChargeBeginTime ) OVERRIDE; + bool OwnerCanJump( void ); private: #ifdef CLIENT_DLL diff --git a/src/game/shared/tf/tf_weaponbase.h b/src/game/shared/tf/tf_weaponbase.h index bdf09634..d18638e5 100644 --- a/src/game/shared/tf/tf_weaponbase.h +++ b/src/game/shared/tf/tf_weaponbase.h @@ -335,6 +335,7 @@ class CTFWeaponBase : public CBaseCombatWeapon, public IHasOwner, public IHasGen void EnableDuck(); void DisableDuck(); + virtual bool OwnerCanJump( void ) { return true; } virtual bool OwnerCanTaunt( void ) { return true; } virtual bool CanBeCritBoosted( void ); bool CanHaveRevengeCrits( void );