mp/src/game/server/sdk/da_spawngenerator.cpp
int CSpawnPointGenerator::FillInDir( SpawnGridLoc *refLoc, int dir )
{
	StepThroughDir(refLoc, dir);
	int numCreated = 0;

	// create a new spot in each open space
	do {
		CBaseEntity *newSpot = CreateEntityByName( m_pszPointName );
		newSpot->SetAbsAngles(m_angles);
		newSpot->SetAbsOrigin(refLoc->vecOrigin);
		refLoc->iStatus = OCCUPIED;
		m_iSpawnsCreated++;
		numCreated++;
		UpdateTryLists(refLoc);
		refLoc = CheckStatusInDir(refLoc, dir);
	} while (refLoc && (refLoc->iStatus == OPEN));

	return numCreated;
}
// for every clear point in the given direction add a spawn point, return number created
for every clear point in the given direction add a spawn point, return number created
for every clear point in the given direction add a spawn point return number created
int CSpawnPointGenerator::FillInDir( SpawnGridLoc *refLoc, int dir )
{
	StepThroughDir(refLoc, dir);
	int numCreated = 0;
	do {
		CBaseEntity *newSpot = CreateEntityByName( m_pszPointName );
		newSpot->SetAbsAngles(m_angles);
		newSpot->SetAbsOrigin(refLoc->vecOrigin);
		refLoc->iStatus = OCCUPIED;
		m_iSpawnsCreated++;
		numCreated++;
		UpdateTryLists(refLoc);
		refLoc = CheckStatusInDir(refLoc, dir);
	} while (refLoc && (refLoc->iStatus == OPEN));
	return numCreated;
}
int CSpawnPointGenerator :: FillInDir ( SpawnGridLoc * refLoc , int dir ) { StepThroughDir ( refLoc , dir ) ; int numCreated = 0 ; do { CBaseEntity * newSpot = CreateEntityByName ( m_pszPointName ) ; newSpot -> SetAbsAngles ( m_angles ) ; newSpot -> SetAbsOrigin ( refLoc -> vecOrigin ) ; refLoc -> iStatus = OCCUPIED ; m_iSpawnsCreated ++ ; numCreated ++ ; UpdateTryLists ( refLoc ) ; refLoc = CheckStatusInDir ( refLoc , dir ) ; } while ( refLoc && ( refLoc -> iStatus == OPEN ) ) ; return numCreated ; }
for every clear point in the given direction add a spawn point, return number created
for every clear point in the given direction add a spawn point return number created
// create a new spot in each open space