//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTFPlayerResource::Spawn( void )
{
	BaseClass::Spawn();

	// Use autodetect, but only once every second.
	NetworkProp()->SetUpdateInterval( 2.0f );
}
示例#2
0
//-----------------------------------------------------------------------------
// Purpose: Needed because this is an entity, but should never be used
//-----------------------------------------------------------------------------
void CBliinkTeam::Init( const char *pName, int iNumber )
{
	BaseClass::Init( pName, iNumber );

	// Only detect changes every half-second.
	NetworkProp()->SetUpdateInterval( 0.75f );
}
示例#3
0
void CSDKPlayer::SetupVisibility( CBaseEntity *pViewEntity, unsigned char *pvs, int pvssize )
{
	BaseClass::SetupVisibility( pViewEntity, pvs, pvssize );

	int area = pViewEntity ? pViewEntity->NetworkProp()->AreaNum() : NetworkProp()->AreaNum();
	PointCameraSetupVisibility( this, area, pvs, pvssize );
}
示例#4
0
//-----------------------------------------------------------------------------
// Purpose: Needed because this is an entity, but should never be used
//-----------------------------------------------------------------------------
void CDODTeam::Init( const char *pName, int iNumber )
{
	BaseClass::Init( pName, iNumber );

	// Only detect changes every half-second.
	NetworkProp()->SetUpdateInterval( 0.75f );

	m_hPlayerClassInfoHandles.Purge();
}
示例#5
0
CWorld::CWorld( )
{
	AddEFlags( EFL_NO_AUTO_EDICT_ATTACH | EFL_KEEP_ON_RECREATE_ENTITIES );
	NetworkProp()->AttachEdict( INDEXENT(RequiredEdictIndex()) );
	ActivityList_Init();
	EventList_Init();
	
	SetSolid( SOLID_BSP );
	SetMoveType( MOVETYPE_NONE );

	m_bColdWorld = false;
}
示例#6
0
CWorld::CWorld( )
{
	AddEFlags( EFL_NO_AUTO_EDICT_ATTACH | EFL_KEEP_ON_RECREATE_ENTITIES );
	NetworkProp()->AttachEdict( INDEXENT(RequiredEdictIndex()) );
	ActivityList_Init();
	EventList_Init();
	
	SetSolid( SOLID_BSP );
	SetMoveType( MOVETYPE_NONE );

	m_bColdWorld = false;

	// Set this in the constructor for legacy maps (sjb)
	m_iTimeOfDay = TIME_MIDNIGHT;
}
示例#7
0
//-----------------------------------------------------------------------------
// Purpose: Constructor
// Input  :
// Output :
//-----------------------------------------------------------------------------
CUnitBase::CUnitBase() : m_fAccuracy(1.0f), m_bCanBeSeen(true)
{
	SetAllowNavIgnore(true);

	// Default navigator/pathfind values
	m_fDeathDrop = 600.0f;
	m_fSaveDrop = 300.0f;
	m_fMaxClimbHeight = 0.0f; // Indicates not capable of climbing
	m_fTestRouteStartHeight = 100.0f;
	m_fMinSlope = 0.83f; // Require slope is less than ~35 degrees by default

#ifndef CLIENT_DLL
	DensityMap()->SetType( DENSITY_GAUSSIAN );

	m_fLastRangeAttackLOSTime = -1;
	m_iAttackLOSMask = MASK_BLOCKLOS_AND_NPCS|CONTENTS_IGNORE_NODRAW_OPAQUE;
	m_fLastTakeDamageTime = -1;

	m_fEnemyChangeToleranceSqr = 128.0f * 128.0f;

	// Default unit type
	SetUnitType("unit_unknown");

	m_bFOWFilterFriendly = true;

	m_UseMinimalSendTable.SetAll();
	NetworkProp()->SetUpdateInterval( 0.4f );
#else
	m_OldNetworkedUnitTypeSymbol = -1;
	m_NetworkedUnitTypeSymbol = -1;

	SetPredictionEligible( true );

	m_bUpdateClientAnimations = true;

	m_pTeamColorGlowEffect = NULL;
#endif // CLIENT_DLL

	AddToUnitList();
}