From 216ae3f317e7293c1fa31255e7676b8716399795 Mon Sep 17 00:00:00 2001 From: Bronzehawk75 Date: Sat, 17 Feb 2024 00:28:47 -0500 Subject: [PATCH] Dropship now fires proper output when strider dies --- sp/src/game/server/hl2/npc_combinedropship.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sp/src/game/server/hl2/npc_combinedropship.cpp b/sp/src/game/server/hl2/npc_combinedropship.cpp index 07863928..5f57848b 100644 --- a/sp/src/game/server/hl2/npc_combinedropship.cpp +++ b/sp/src/game/server/hl2/npc_combinedropship.cpp @@ -300,6 +300,9 @@ private: bool IsHovering(); void UpdateGroundRotorWashSound( float flAltitude ); void UpdateRotorWashVolume( CSoundPatch *pRotorSound, float flVolume, float flDeltaTime ); +#ifdef MAPBASE + void DeathNotice(CBaseEntity* pVictim); +#endif private: // Timers @@ -2490,7 +2493,7 @@ void CNPC_CombineDropship::PrescheduleThink( void ) m_hContainer = NULL; - m_flTimeTakeOff = gpGlobals->curtime + 5.0f; + m_flTimeTakeOff = gpGlobals->curtime + 3.0f; SetLandingState(LANDING_UNLOADING); return; @@ -3342,6 +3345,19 @@ void CNPC_CombineDropship::MakeTracer( const Vector &vecTracerSrc, const trace_t } } +#ifdef MAPBASE +//----------------------------------------------------------------------------- +// Purpose: Need a way to tell if our strider died +//----------------------------------------------------------------------------- +void CNPC_CombineDropship::DeathNotice( CBaseEntity *pVictim ) +{ + if ( m_iCrateType == CRATE_STRIDER && GetLandingState() == LANDING_NO ) + { + m_OnContainerShotDownBeforeDropoff.Set( 1, m_hContainer, this ); + } +} +#endif + AI_BEGIN_CUSTOM_NPC( npc_combinedropship, CNPC_CombineDropship ) DECLARE_ACTIVITY( ACT_DROPSHIP_FLY_IDLE );