ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
650 stars 76 forks source link

[TF2] Enable death animations for robots in mvm #4122

Open condor00fr opened 2 years ago

condor00fr commented 2 years ago

robots have a fully working set of death animations (aside from engiebots who use player ones) for backstab and headshots, why where they disabled I have no idea as they don't impact gameplay in any way and adds a comic touch.

Additionally it would be nice to make robots fall back to player animations when there arn't any actual ones in the game files (such as swimming/ jumping, ect) engie bots already does this and is really good for server plugins that lets you play as a robot.

JonaMake commented 2 years ago

why not, nice idea

Ashetf2 commented 1 year ago

There's a condition in CTFPlayerShared::GetSequenceForDeath in tf_player_shared.cpp which checks if the gamemode is MvM.

{
    if ( !pRagdoll )
        return -1;

    if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() )
    {
        if ( m_pOuter && ( m_pOuter->GetTeamNumber() == TF_TEAM_PVE_INVADERS ) )
            return -1;
    }

Removing the check && ( m_pOuter->GetTeamNumber() == TF_TEAM_PVE_INVADERS ) should enable these animations for the robots.