Merge branch 'ValveSoftware:master' into VRAD-Added-support-for-extrapasses-commandline-

This commit is contained in:
[un usuario second] 2025-03-30 00:00:47 +01:00 committed by GitHub
commit 7f74bd6d1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 43 additions and 10 deletions

View file

@ -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() ) )
{

View file

@ -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 );

View file

@ -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; }

View file

@ -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" );

View file

@ -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 )

View file

@ -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" );

View file

@ -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<MenuButton *> m_pMenuButtons;

View file

@ -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)
{

View file

@ -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

View file

@ -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);
}