mirror of
https://github.com/celisej567/source-sdk-2013.git
synced 2026-09-11 20:11:33 +03:00
Fix custom procedural crash
This commit is contained in:
@@ -736,6 +736,12 @@ CBaseEntity *CGlobalEntityList::FindEntityCustomProcedural( CBaseEntity *pStartE
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user