diff --git a/src/game/client/tf/tf_hud_match_status.cpp b/src/game/client/tf/tf_hud_match_status.cpp index b2a9f804c..1fda3fdbb 100644 --- a/src/game/client/tf/tf_hud_match_status.cpp +++ b/src/game/client/tf/tf_hud_match_status.cpp @@ -574,6 +574,17 @@ void CTFHudMatchStatus::FireGameEvent( IGameEvent * event ) } const IMatchGroupDescription* pMatchDesc = GetMatchGroupDescription( TFGameRules()->GetCurrentMatchGroup() ); + + // FIX: Refresh versus doors so late-joiners do not see the wrong skin + int nSkin = 0; + int nSubModel = 0; + if (pMatchDesc->BGetRoundDoorParameters(nSkin, nSubModel)) + { + m_pMatchStartModelPanel->SetBodyGroup( "logos", nSubModel ); + m_pMatchStartModelPanel->UpdateModel(); + m_pMatchStartModelPanel->SetSkin( nSkin ); + } + bool bForceDoors = false; if ( bForceDoors || ( pMatchDesc && pMatchDesc->BUsesPostRoundDoors() ) ) { diff --git a/src/game/server/NextBot/NextBot.h b/src/game/server/NextBot/NextBot.h index 369f6988a..51c9403b6 100644 --- a/src/game/server/NextBot/NextBot.h +++ b/src/game/server/NextBot/NextBot.h @@ -40,6 +40,7 @@ public: virtual Vector EyePosition( void ); virtual INextBot *MyNextBotPointer( void ) { return this; } + virtual bool IsNextBot(void) const { return true; } // Event hooks into NextBot system --------------------------------------- virtual int OnTakeDamage_Alive( const CTakeDamageInfo &info ); diff --git a/src/game/server/baseentity.h b/src/game/server/baseentity.h index 73eeae0bb..5f42abce3 100644 --- a/src/game/server/baseentity.h +++ b/src/game/server/baseentity.h @@ -996,6 +996,9 @@ public: void TraceBleed( float flDamage, const Vector &vecDir, trace_t *ptr, int bitsDamageType ); virtual bool IsTriggered( CBaseEntity *pActivator ) {return true;} virtual bool IsNPC( void ) const { return false; } +#ifdef NEXT_BOT + virtual bool IsNextBot(void) const { return false; } +#endif CAI_BaseNPC *MyNPCPointer( void ); virtual CBaseCombatCharacter *MyCombatCharacterPointer( void ) { return NULL; } virtual INextBot *MyNextBotPointer( void ) { return NULL; } diff --git a/src/game/server/tf/bot/behavior/scenario/capture_the_flag/tf_bot_deliver_flag.cpp b/src/game/server/tf/bot/behavior/scenario/capture_the_flag/tf_bot_deliver_flag.cpp index 873c36ed3..166dbc305 100644 --- a/src/game/server/tf/bot/behavior/scenario/capture_the_flag/tf_bot_deliver_flag.cpp +++ b/src/game/server/tf/bot/behavior/scenario/capture_the_flag/tf_bot_deliver_flag.cpp @@ -243,7 +243,7 @@ ActionResult< CTFBot > CTFBotDeliverFlag::Update( CTFBot *me, float interval ) m_flTotalTravelDistance = NavAreaTravelDistance( me->GetLastKnownArea(), TheNavMesh->GetNavArea( zone->WorldSpaceCenter() ), cost ); - if ( flOldTravelDistance != -1.0f && m_flTotalTravelDistance - flOldTravelDistance > 2000.0f ) + if ( TFGameRules()->IsMannVsMachineMode() && flOldTravelDistance != -1.0f && m_flTotalTravelDistance - flOldTravelDistance > 2000.0f ) { TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Bomb_Reset" ); diff --git a/src/game/server/tf/bot/behavior/spy/tf_bot_spy_hide.cpp b/src/game/server/tf/bot/behavior/spy/tf_bot_spy_hide.cpp index 2a35b3138..914b2d959 100644 --- a/src/game/server/tf/bot/behavior/spy/tf_bot_spy_hide.cpp +++ b/src/game/server/tf/bot/behavior/spy/tf_bot_spy_hide.cpp @@ -70,7 +70,14 @@ ActionResult< CTFBot > CTFBotSpyHide::Update( CTFBot *me, float interval ) if ( m_talkTimer.IsElapsed() ) { m_talkTimer.Start( RandomFloat( 5.0f, 10.0f ) ); - me->EmitSound( "Spy.TeaseVictim" ); + if ( TFGameRules()->IsMannVsMachineMode() && me->GetTeamNumber() == TF_TEAM_PVE_INVADERS ) + { + me->EmitSound( "Spy.MVM_TeaseVictim" ); + } + else + { + me->EmitSound( "Spy.TeaseVictim" ); + } } if ( m_isAtGoal ) diff --git a/src/game/server/tf/tf_player.cpp b/src/game/server/tf/tf_player.cpp index 6864fd442..0881d2491 100644 --- a/src/game/server/tf/tf_player.cpp +++ b/src/game/server/tf/tf_player.cpp @@ -2802,6 +2802,7 @@ void CTFPlayer::PrecacheMvM() PrecacheScriptSound( "MVM.DeployBombGiant" ); PrecacheScriptSound( "Weapon_Upgrade.ExplosiveHeadshot" ); PrecacheScriptSound( "Spy.MVM_Chuckle" ); + PrecacheScriptSound( "Spy.MVM_TeaseVictim" ); PrecacheScriptSound( "MVM.Robot_Engineer_Spawn" ); PrecacheScriptSound( "MVM.Robot_Teleporter_Deliver" ); PrecacheScriptSound( "MVM.MoneyPickup" ); diff --git a/src/public/vgui_controls/MenuBar.h b/src/public/vgui_controls/MenuBar.h index 01ccc06a8..8a6987485 100644 --- a/src/public/vgui_controls/MenuBar.h +++ b/src/public/vgui_controls/MenuBar.h @@ -41,7 +41,11 @@ protected: virtual void PerformLayout(); virtual void Paint(); MESSAGE_FUNC( OnMenuClose, "MenuClose" ); - MESSAGE_FUNC_INT( OnCursorEnteredMenuButton, "CursorEnteredMenuButton", VPanel); +#ifdef PLATFORM_64BITS + MESSAGE_FUNC_PTR( OnCursorEnteredMenuButton, "CursorEnteredMenuButton", VPanel ); +#else + MESSAGE_FUNC_INT( OnCursorEnteredMenuButton, "CursorEnteredMenuButton", VPanel ); +#endif private: CUtlVector m_pMenuButtons; diff --git a/src/vgui2/vgui_controls/Menu.cpp b/src/vgui2/vgui_controls/Menu.cpp index 5e354edff..ac45dec1f 100644 --- a/src/vgui2/vgui_controls/Menu.cpp +++ b/src/vgui2/vgui_controls/Menu.cpp @@ -2386,16 +2386,15 @@ int Menu::GetCurrentlyHighlightedItem() // Purpose: Respond to cursor entering a menuItem. //----------------------------------------------------------------------------- // -// Josh: Slightly annoying, but need to completely ensure compatiblity with the SDK + GameUI interactions. +// Josh: Slightly annoying, but need to completely ensure compatibility with the SDK + GameUI interactions. #ifdef PLATFORM_64BITS void Menu::OnCursorEnteredMenuItem( vgui::Panel* VPanel ) -{ - VPANEL menuItem = (VPANEL) VPanel; #else void Menu::OnCursorEnteredMenuItem(int VPanel) +#endif { VPANEL menuItem = (VPANEL)VPanel; -#endif + // if we are in mouse mode if (m_iInputMode == MOUSE) { @@ -2419,13 +2418,12 @@ void Menu::OnCursorEnteredMenuItem(int VPanel) //----------------------------------------------------------------------------- #ifdef PLATFORM_64BITS void Menu::OnCursorExitedMenuItem( vgui::Panel* VPanel ) -{ - VPANEL menuItem = (VPANEL) VPanel; #else void Menu::OnCursorExitedMenuItem( int VPanel ) +#endif { VPANEL menuItem = (VPANEL) VPanel; -#endif + // only care if we are in mouse mode if (m_iInputMode == MOUSE) { diff --git a/src/vgui2/vgui_controls/MenuBar.cpp b/src/vgui2/vgui_controls/MenuBar.cpp index 1c7052cc4..22518533b 100644 --- a/src/vgui2/vgui_controls/MenuBar.cpp +++ b/src/vgui2/vgui_controls/MenuBar.cpp @@ -221,7 +221,11 @@ void MenuBar::OnMenuClose() //----------------------------------------------------------------------------- // Purpose: Message map //----------------------------------------------------------------------------- +#ifdef PLATFORM_64BITS +void MenuBar::OnCursorEnteredMenuButton(vgui::Panel* VPanel) +#else void MenuBar::OnCursorEnteredMenuButton(int VPanel) +#endif { VPANEL menuButton = (VPANEL)VPanel; // see if we had a menu open diff --git a/src/vgui2/vgui_controls/MenuButton.cpp b/src/vgui2/vgui_controls/MenuButton.cpp index 19b35ae67..2bf4aadef 100644 --- a/src/vgui2/vgui_controls/MenuButton.cpp +++ b/src/vgui2/vgui_controls/MenuButton.cpp @@ -238,7 +238,11 @@ void MenuButton::OnCursorEntered() // forward the message on to the parent of this menu. KeyValues *msg = new KeyValues ("CursorEnteredMenuButton"); // tell the parent this menuitem is the one that was entered so it can open the menu if it wants +#ifdef PLATFORM_64BITS + msg->SetPtr("VPanel", (void*)GetVPanel()); +#else msg->SetInt("VPanel", GetVPanel()); +#endif ivgui()->PostMessage(GetVParent(), msg, NULL); }