mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-02-04 17:50:30 +03:00
Fix custom procedural crash
This commit is contained in:
parent
032cfdaec3
commit
aa03b6b51e
@ -736,6 +736,12 @@ CBaseEntity *CGlobalEntityList::FindEntityCustomProcedural( CBaseEntity *pStartE
|
|||||||
|
|
||||||
g_pScriptVM->ExecuteFunction( g_CustomProcedurals[i].hFunc, args, 5, &functionReturn, NULL, true );
|
g_pScriptVM->ExecuteFunction( g_CustomProcedurals[i].hFunc, args, 5, &functionReturn, NULL, true );
|
||||||
|
|
||||||
|
if (pStartEntity && ToEnt( functionReturn.m_hScript ) == pStartEntity)
|
||||||
|
{
|
||||||
|
Warning( "WARNING: Custom procedural %s returned entity identical to start entity (%s), returning null\n", g_CustomProcedurals[i].szName, pStartEntity->GetDebugName() );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return ToEnt( functionReturn.m_hScript );
|
return ToEnt( functionReturn.m_hScript );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user