Hey list,
didnt manage to fix auto assign yet but its not important, just a nice 
side function so I decided to move the next problem, fixing a bug with 
spectate.

When you join a game instead of immediatly spawning and joining a team 
you join the spectators, works fine but if you fly into anything(such as 
a wall) you start falling down the map until you reach the bottom and 
then start falling again from ground to inside the map to bottom of maps 
boundaries...

This is really annoying and I was wondering if anyone knows this bug and 
knows a fix? I've been looking for a while but there's just tons of code 
relating to spectate modes and other spectate related things.. but I 
think the fault may be in the following code(this is as is not editted 
by me):
void CBasePlayer::ForceObserverMode(int mode)
{
    int tempMode = OBS_MODE_ROAMING;

    if ( m_iObserverMode == mode )
        return;

    // don't change last mode if already in forced mode

    if ( m_bForcedObserverMode )
    {
        tempMode = m_iObserverLastMode;
    }
   
    SetObserverMode( mode );

    if ( m_bForcedObserverMode )
    {
        m_iObserverLastMode = tempMode;
    }

    m_bForcedObserverMode = true;
}

void CBasePlayer::CheckObserverSettings()
{
    // check if we are in forced mode and may go back to old mode
    if ( m_bForcedObserverMode )
    {
        CBaseEntity * target = m_hObserverTarget;

        if ( !IsValidObserverTarget(target) )
        {
            // if old target is still invalid, try to find valid one
            target = FindNextObserverTarget( false );
        }

        if ( target )
        {
                // we found a valid target
                m_bForcedObserverMode = false;    // disable force mode
                SetObserverMode( m_iObserverLastMode ); // switch to 
last mode
                SetObserverTarget( target ); // goto target
               
                // TODO check for HUD icons
                return;
        }
        else
        {
            // else stay in forced mode, no changes
            return;
        }
    }

    // make sure our last mode is valid
    if ( m_iObserverLastMode < OBS_MODE_FIXED )
    {
        m_iObserverLastMode = OBS_MODE_ROAMING;

so anyone any idea? am I looking in the right place and if so whats 
wrong.. if not where should I look?

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to