//-----------------------------------------------------------------------------
// Purpose: Sets HL2 specific defaults.
//-----------------------------------------------------------------------------
void CHL2MP_Player::Spawn(void)
{
#ifdef GE_DLL
    m_bSpawnInterpCounter = !m_bSpawnInterpCounter;
    BaseClass::Spawn();
#else
    m_flNextModelChangeTime = 0.0f;
    m_flNextTeamChangeTime = 0.0f;

    PickDefaultSpawnTeam();

    BaseClass::Spawn();

    if ( !IsObserver() )
    {
        pl.deadflag = false;
        RemoveSolidFlags( FSOLID_NOT_SOLID );

        RemoveEffects( EF_NODRAW );

        GiveDefaultItems();
    }

    RemoveEffects( EF_NOINTERP );

    m_nRenderFX = kRenderNormal;

    m_Local.m_iHideHUD = 0;

    AddFlag(FL_ONGROUND); // set the player on the ground at the start of the round.

    m_impactEnergyScale = HL2MPPLAYER_PHYSDAMAGE_SCALE;

    if ( HL2MPRules()->IsIntermission() )
    {
        AddFlag( FL_FROZEN );
    }
    else
    {
        RemoveFlag( FL_FROZEN );
    }

    m_bSpawnInterpCounter = !m_bSpawnInterpCounter;

    m_Local.m_bDucked = false;

    SetPlayerUnderwater(false);

    m_bReady = false;
#endif
    //Tony; do the spawn animevent
    DoAnimationEvent( PLAYERANIMEVENT_SPAWN );

    SetContextThink( &CHL2MP_Player::HL2MPPushawayThink, gpGlobals->curtime + PUSHAWAY_THINK_INTERVAL, HL2MP_PUSHAWAY_THINK_CONTEXT );
}
//-----------------------------------------------------------------------------
// Purpose: Sets HL2 specific defaults.
//-----------------------------------------------------------------------------
void CHL2MP_Player::Spawn(void)
{
    m_flNextModelChangeTime = 0.0f;
    m_flNextTeamChangeTime = 0.0f;

    PickDefaultSpawnTeam();

    BaseClass::Spawn();

    pl.deadflag = false;
    m_lifeState = LIFE_ALIVE;
    RemoveSolidFlags( FSOLID_NOT_SOLID );

    RemoveEffects( EF_NODRAW );

    //BP On donne par défaut les armes correspondantes au mode de jeu
    //GiveDefaultItems();
    GiveAllItems();

    RemoveEffects( EF_NOINTERP );

    m_nRenderFX = kRenderNormal;

    m_Local.m_iHideHUD = 0;

    AddFlag(FL_ONGROUND); // set the player on the ground at the start of the round.

    m_impactEnergyScale = HL2MPPLAYER_PHYSDAMAGE_SCALE;

    if ( HL2MPRules()->IsIntermission() )
        AddFlag( FL_FROZEN );
    else
        RemoveFlag( FL_FROZEN );

    m_bSpawnInterpCounter = !m_bSpawnInterpCounter;

    m_Local.m_bDucked = false;

    SetPlayerUnderwater(false);

    m_bReady = false;

    m_hKiller.Set(NULL);

    //Tony; do the spawn animevent
    DoAnimationEvent( PLAYERANIMEVENT_SPAWN );

    SetContextThink( &CHL2MP_Player::HL2MPPushawayThink, gpGlobals->curtime + PUSHAWAY_THINK_INTERVAL, HL2MP_PUSHAWAY_THINK_CONTEXT );

    if ( GetTeamNumber() != TEAM_SPECTATOR )
        StopObserverMode();
}
//-----------------------------------------------------------------------------
// Purpose: Sets HL2 specific defaults.
//-----------------------------------------------------------------------------
void CHL2MP_Player::Spawn(void)
{
	m_flNextModelChangeTime = 0.0f;
	m_flNextTeamChangeTime = 0.0f;

	PickDefaultSpawnTeam();

	BaseClass::Spawn();
	
	if ( !IsObserver() )
	{
		pl.deadflag = false;
		RemoveSolidFlags( FSOLID_NOT_SOLID );

		RemoveEffects( EF_NODRAW );
		
		GiveDefaultItems();
	}

	SetNumAnimOverlays( 3 );
	ResetAnimation();

	m_nRenderFX = kRenderNormal;

	m_Local.m_iHideHUD = 0;
	
	AddFlag(FL_ONGROUND); // set the player on the ground at the start of the round.

	m_impactEnergyScale = HL2MPPLAYER_PHYSDAMAGE_SCALE;

	if ( HL2MPRules()->IsIntermission() )
	{
		AddFlag( FL_FROZEN );
	}
	else
	{
		RemoveFlag( FL_FROZEN );
	}

	m_iSpawnInterpCounter = (m_iSpawnInterpCounter + 1) % 8;

	m_Local.m_bDucked = false;

	SetPlayerUnderwater(false);

	m_bReady = false;

	m_flNextKickAttack = gpGlobals->curtime;
	CBaseViewModel *Leg = GetViewModel(1);
	Leg->SetWeaponModel("models/weapons/v_kick.mdl", NULL);
}
//-----------------------------------------------------------------------------
// Purpose: Sets HL2 specific defaults.
//-----------------------------------------------------------------------------
void CHL2MP_Player::Spawn(void)
{
	m_flNextModelChangeTime = 0.0f;
	m_flNextTeamChangeTime = 0.0f;

	PickDefaultSpawnTeam();

	BaseClass::Spawn();
	
	if ( !IsObserver() )
	{
		pl.deadflag = false;
		RemoveSolidFlags( FSOLID_NOT_SOLID );

		RemoveEffects( EF_NODRAW );
		
		GiveDefaultItems();
	}


	m_nRenderFX = kRenderNormal;

	m_Local.m_iHideHUD = 0;
	
	AddFlag(FL_ONGROUND); // set the player on the ground at the start of the round.

	m_impactEnergyScale = HL2MPPLAYER_PHYSDAMAGE_SCALE;

	if ( HL2MPRules()->IsIntermission() )
	{
		AddFlag( FL_FROZEN );
	}
	else
	{
		RemoveFlag( FL_FROZEN );
	}

	m_iSpawnInterpCounter = (m_iSpawnInterpCounter + 1) % 8;

	m_Local.m_bDucked = false;

	SetPlayerUnderwater(false);

	m_bReady = false;

	//Tony; do the spawn animevent
	DoAnimationEvent( PLAYERANIMEVENT_SPAWN );

}