diff --git a/src/game/client/tf/c_tf_player.cpp b/src/game/client/tf/c_tf_player.cpp index 212b8f19..73d464cc 100644 --- a/src/game/client/tf/c_tf_player.cpp +++ b/src/game/client/tf/c_tf_player.cpp @@ -6052,7 +6052,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"); } diff --git a/src/game/server/SkyCamera.cpp b/src/game/server/SkyCamera.cpp index 126e7862..af834fdf 100644 --- a/src/game/server/SkyCamera.cpp +++ b/src/game/server/SkyCamera.cpp @@ -218,6 +218,12 @@ void CSkyCamera::Activate( ) } #endif + // matches the behavior of fog controller + if ( GameRules()->IsOfficialMap() ) + { + m_skyboxData.fog.radial = true; + } + #ifdef MAPBASE if (HasSpawnFlags( SF_SKY_MASTER )) g_hActiveSkybox = this; diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index ebe9f3c1..12e82e28 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -8982,11 +8982,10 @@ void CLogicPlayerInfo::GetPlayerInfo( CBasePlayer *pPlayer ) } #endif - -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 ); } 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 58e88d29..9d7e407a 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; 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 ); diff --git a/src/public/const.h b/src/public/const.h index c239a026..4e893f27 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)