halflife icon indicating copy to clipboard operation
halflife copied to clipboard

[TFC] Holster weapon & func_tank use

Open tehORiON opened this issue 13 years ago • 5 comments

When you use a func_tank and your current weapon is e.g. the crowbar, it appears to holster the weapon, but when you hit your attack button it will bring the weapon back and you will attack with it whilest attacking with the func_tank. This appears to be a client issue only.

Testmap: http://www.sendspace.com/file/mk6598

tehORiON avatar Aug 09 '13 10:08 tehORiON

@alfred-valve Alright so the issue is quite simple, for some reason tfc used an outdated sdk:

BOOL CFuncTank :: StartControl( CBasePlayer *pController )
{
    if ( m_pController != NULL )
        return FALSE;

    // Team only or disabled?
    if ( m_iszMaster )
    {
        if ( !UTIL_IsMasterTriggered( m_iszMaster, pController ) )
            return FALSE;
    }

    ALERT( at_console, "using TANK!\n");

    // Holster player's weapon
    m_pController = pController;
    if ( m_pController->m_pActiveItem )
    {
        m_pController->m_pActiveItem->Holster();
        m_pController->pev->weaponmodel = 0;
    }

    m_pController->m_iHideHUD |= HIDEHUD_WEAPONS;
    m_vecControllerUsePos = m_pController->pev->origin;

    pev->nextthink = pev->ltime + 0.1;

    return TRUE;
}

This bit:

if ( m_pController->m_pActiveItem )
{
    m_pController->m_pActiveItem->Holster();
    m_pController->pev->weaponmodel = 0;
}

It's supposed to hide the viewmodel as well (like it also does in the updated sdk), thus add m_pController->pev->viewmodel = 0; and it's fixed.

tehORiON avatar Aug 29 '13 14:08 tehORiON

dear Valve. can you fix this while ur in the process of updating the game? seeing as it isn't fixed in the current beta. (all platforms)

Demon1986 avatar Apr 22 '19 14:04 Demon1986

Fixed, this will be included in the next beta update.

mikela-valve avatar May 16 '19 00:05 mikela-valve

Fixed in beta 'Exe build: 11:12:36 May 21 2019 (8244)'.

mikela-valve avatar May 21 '19 19:05 mikela-valve

Closing as fixed.

mikela-valve avatar Jun 02 '19 08:06 mikela-valve