mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
add source-sdk-2013
This commit is contained in:
+15
-15
@@ -103,8 +103,8 @@ static int __cdecl CompareSpawnOrder(HierarchicalSpawn_t *pEnt1, HierarchicalSpa
|
||||
{
|
||||
if ( g_pClassnameSpawnPriority )
|
||||
{
|
||||
int o1 = pEnt1->m_hEntity ? g_pClassnameSpawnPriority->GetStringID( pEnt1->m_hEntity->GetClassname() ) : -1;
|
||||
int o2 = pEnt2->m_hEntity ? g_pClassnameSpawnPriority->GetStringID( pEnt2->m_hEntity->GetClassname() ) : -1;
|
||||
int o1 = pEnt1->m_pEntity ? g_pClassnameSpawnPriority->GetStringID( pEnt1->m_pEntity->GetClassname() ) : -1;
|
||||
int o2 = pEnt2->m_pEntity ? g_pClassnameSpawnPriority->GetStringID( pEnt2->m_pEntity->GetClassname() ) : -1;
|
||||
if ( o1 < o2 )
|
||||
return 1;
|
||||
if ( o2 < o1 )
|
||||
@@ -152,7 +152,7 @@ static void ComputeSpawnHierarchyDepth( int nEntities, HierarchicalSpawn_t *pSpa
|
||||
int nEntity;
|
||||
for (nEntity = 0; nEntity < nEntities; nEntity++)
|
||||
{
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_hEntity;
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_pEntity;
|
||||
if (pEntity && !pEntity->IsDormant())
|
||||
{
|
||||
pSpawnList[nEntity].m_nDepth = ComputeSpawnHierarchyDepth_r( pEntity );
|
||||
@@ -202,7 +202,7 @@ void SetupParentsForSpawnList( int nEntities, HierarchicalSpawn_t *pSpawnList )
|
||||
int nEntity;
|
||||
for (nEntity = nEntities - 1; nEntity >= 0; nEntity--)
|
||||
{
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_hEntity;
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_pEntity;
|
||||
if ( pEntity )
|
||||
{
|
||||
if ( strchr(STRING(pEntity->m_iParent), ',') )
|
||||
@@ -234,7 +234,7 @@ void RememberInitialEntityPositions( int nEntities, HierarchicalSpawn_t *pSpawnL
|
||||
{
|
||||
for (int nEntity = 0; nEntity < nEntities; nEntity++)
|
||||
{
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_hEntity;
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_pEntity;
|
||||
|
||||
if ( pEntity )
|
||||
{
|
||||
@@ -250,7 +250,7 @@ void SpawnAllEntities( int nEntities, HierarchicalSpawn_t *pSpawnList, bool bAct
|
||||
for (nEntity = 0; nEntity < nEntities; nEntity++)
|
||||
{
|
||||
VPROF( "MapEntity_ParseAllEntities_Spawn");
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_hEntity;
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_pEntity;
|
||||
|
||||
if ( pSpawnList[nEntity].m_pDeferredParent )
|
||||
{
|
||||
@@ -272,15 +272,15 @@ void SpawnAllEntities( int nEntities, HierarchicalSpawn_t *pSpawnList, bool bAct
|
||||
for ( int i = nEntity+1; i < nEntities; i++ )
|
||||
{
|
||||
// this is a child object that will be deleted now
|
||||
if ( pSpawnList[i].m_hEntity && pSpawnList[i].m_hEntity->IsMarkedForDeletion() )
|
||||
if ( pSpawnList[i].m_pEntity && pSpawnList[i].m_pEntity->IsMarkedForDeletion() )
|
||||
{
|
||||
pSpawnList[i].m_hEntity = NULL;
|
||||
pSpawnList[i].m_pEntity = NULL;
|
||||
}
|
||||
}
|
||||
// Spawn failed.
|
||||
gEntList.CleanupDeleteList();
|
||||
// Remove the entity from the spawn list
|
||||
pSpawnList[nEntity].m_hEntity = NULL;
|
||||
pSpawnList[nEntity].m_pEntity = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -291,7 +291,7 @@ void SpawnAllEntities( int nEntities, HierarchicalSpawn_t *pSpawnList, bool bAct
|
||||
bool bAsyncAnims = mdlcache->SetAsyncLoad( MDLCACHE_ANIMBLOCK, false );
|
||||
for (nEntity = 0; nEntity < nEntities; nEntity++)
|
||||
{
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_hEntity;
|
||||
CBaseEntity *pEntity = pSpawnList[nEntity].m_pEntity;
|
||||
|
||||
if ( pEntity )
|
||||
{
|
||||
@@ -368,7 +368,7 @@ void MapEntity_ParseAllEntities(const char *pMapData, IMapEntityFilter *pFilter,
|
||||
continue;
|
||||
}
|
||||
|
||||
// To
|
||||
// To
|
||||
if ( dynamic_cast<CWorld*>( pEntity ) )
|
||||
{
|
||||
VPROF( "MapEntity_ParseAllEntities_SpawnWorld");
|
||||
@@ -378,7 +378,7 @@ void MapEntity_ParseAllEntities(const char *pMapData, IMapEntityFilter *pFilter,
|
||||
DispatchSpawn(pEntity);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
CNodeEnt *pNode = dynamic_cast<CNodeEnt*>(pEntity);
|
||||
if ( pNode )
|
||||
{
|
||||
@@ -423,7 +423,7 @@ void MapEntity_ParseAllEntities(const char *pMapData, IMapEntityFilter *pFilter,
|
||||
else
|
||||
{
|
||||
// Queue up this entity for spawning
|
||||
pSpawnList[nEntities].m_hEntity = pEntity;
|
||||
pSpawnList[nEntities].m_pEntity = pEntity;
|
||||
pSpawnList[nEntities].m_nDepth = 0;
|
||||
pSpawnList[nEntities].m_pDeferredParentAttachment = NULL;
|
||||
pSpawnList[nEntities].m_pDeferredParent = NULL;
|
||||
@@ -459,7 +459,7 @@ void MapEntity_ParseAllEntities(const char *pMapData, IMapEntityFilter *pFilter,
|
||||
CBaseEntity *pEntity = pPointTemplate->GetTemplateEntity( iTemplateNum );
|
||||
for ( int iEntNum = 0; iEntNum < nEntities; iEntNum++ )
|
||||
{
|
||||
if ( pSpawnList[iEntNum].m_hEntity == pEntity )
|
||||
if ( pSpawnList[iEntNum].m_pEntity == pEntity )
|
||||
{
|
||||
// Give the point_template the mapdata
|
||||
pPointTemplate->AddTemplate( pEntity, pSpawnMapData[iEntNum].m_pMapData, pSpawnMapData[iEntNum].m_iMapDataLength );
|
||||
@@ -471,7 +471,7 @@ void MapEntity_ParseAllEntities(const char *pMapData, IMapEntityFilter *pFilter,
|
||||
gEntList.CleanupDeleteList();
|
||||
|
||||
// Remove the entity from the spawn list
|
||||
pSpawnList[iEntNum].m_hEntity = NULL;
|
||||
pSpawnList[iEntNum].m_pEntity = NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user