Batfoxkid / Freak-Fortress-2-Rewrite

The gamemode that's now also a standalone boss maker.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
19 stars 9 forks source link

freak_fortress_2: Fix unlocking capture point is not working #133

Closed M60TM closed 11 months ago

M60TM commented 12 months ago

In detail:

void CTFGameRules::SetupOnStalemateStart( void )
{
...
        CArenaLogic *pArenaLogic = dynamic_cast< CArenaLogic * > (gEntList.FindEntityByClassname( NULL, "tf_logic_arena" ) );

        if ( pArenaLogic )
        {
            pArenaLogic->m_OnArenaRoundStart.FireOutput( pArenaLogic, pArenaLogic );

            if ( tf_arena_override_cap_enable_time.GetFloat() > 0 )
            {
                m_flCapturePointEnableTime = gpGlobals->curtime + tf_arena_override_cap_enable_time.GetFloat();
            }
            else
            {
                m_flCapturePointEnableTime = gpGlobals->curtime + pArenaLogic->m_flTimeToEnableCapPoint;
            }

            IGameEvent *event = gameeventmanager->CreateEvent( "arena_round_start" );
            if ( event )
            {
                gameeventmanager->FireEvent( event );
            }

            BroadcastSound( 255, "Announcer.AM_RoundStartRandom" );
        }
...
}