Interesting .. thanks Yorg..

I was wondering if it was no better done somewhere around the
finishclientputinserver() area..
might be where im going wrong :D

the rational being - this is where player::spawn() is made...

BTW : great example on how some documentation on the sdk would help
greatly! LOL /me ducks flames...

2009/1/23 Yorg Kuijs <[email protected]>:
> Well I have this:
> void CHL2MP_Player::PickDefaultSpawnTeam( void )
> {
>    if ( GetTeamNumber() == 0 )
>    {
>        if ( HL2MPRules()->IsTeamplay() == false )
>        {
>            if ( GetModelPtr() == NULL )
>            {
>                const char *szModelName = NULL;
>                szModelName = engine->GetClientConVarValue(
> engine->IndexOfEdict( edict() ), "cl_playermodel" );
>
>                if ( ValidatePlayerModel( szModelName ) == false )
>                {
>                    char szReturnString[512];
>
>                    Q_snprintf( szReturnString, sizeof (szReturnString
> ), "cl_playermodel models/combine_soldier.mdl\n" );
>                    engine->ClientCommand ( edict(), szReturnString );
>                }
>
>                ChangeTeam( TEAM_SPECTATOR );
>            }
>        }
>        else if ( HL2MPRules()->IsTeamplay() == true )
>        {
>            if ( GetModelPtr() == NULL )
>            {
>                ChangeTeam( TEAM_SPECTATOR );
>            }
>        }
>    }
> }
>
> this makes it choose the spectator team as the default on connect.
> hope that helps!
>
> Sykes wrote:
>> Anyone got some advice on where to start..
>>
>> the hl2mp code seems to inherit a nest of calls from parent classes..
>>
>> I'd like a player to go straight to spectator mode on connect?!
>>
>> cheers
>>
>> _______________________________________________
>>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

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

Reply via email to