Added fail safe in case there's no landing target set

This commit is contained in:
Bronzehawk75 2024-02-11 19:58:51 -05:00
parent f7c9e3d19a
commit 4c55da2d78

View File

@ -1841,16 +1841,23 @@ void CNPC_CombineDropship::InputDropMines( inputdata_t &inputdata )
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CNPC_CombineDropship::InputDropStrider( inputdata_t &inputdata )
void CNPC_CombineDropship::InputDropStrider(inputdata_t& inputdata)
{
if ( !m_hContainer || !FClassnameIs( m_hContainer, "npc_strider" ) )
if (!m_hContainer || !FClassnameIs(m_hContainer, "npc_strider"))
{
Warning("npc_combinedropship %s was told to drop Strider, but isn't carrying one!\n", STRING(GetEntityName()) );
Warning("npc_combinedropship %s was told to drop Strider, but isn't carrying one!\n", STRING(GetEntityName()));
return;
}
#ifdef MAPBASE
LandCommon();
if (m_iszLandTarget != NULL_STRING)
{
LandCommon();
}
else
{
SetLandingState(LANDING_STRIDER);
}
#else
QAngle angles = GetAbsAngles();