The team==TEAM1 was a typo in the email, but thanks for the suggestion
of the switch.


On Sun, 2 Jan 2005 00:42:31 +0100, Elektordi <[EMAIL PROTECTED]> wrote:
> There is a error:
>
> if ( team == TEAM2 )
> Q_strcpy( teamspawn, "info_player_team2" );
>
> and not::
>
> if ( team == TEAM1 )
>
> But you should use a switch or else if in order to have a fall back to
> info_player_start... I think it's better to have one of it in a map in case
> of error !
>
> And for the "if ( !team )", remplace the random assign with a spectator
> spawn and display team selection...
>
> Elektordi
>
> ----- Original Message -----
> From: Jarrett Hawrylak <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Saturday, January 01, 2005 4:37 AM
> Subject: Re: [hlcoders] Spawning info_player_team1
>
> > I opted to merely alter the EntSelectSpawnPoint in player.cpp like this:
> > int team = GetTeamNumber();
> > if ( !team )
> > {
> > team = random->RandomInt( 1, 3 );
> > ChangeTeam( team );
> > }
> > char teamspawn[20];
> > if ( team == TEAM1 )
> > Q_strcpy( teamspawn, "info_player_team1" );
> > if ( team == TEAM1 )
> > Q_strcpy( teamspawn, "info_player_team2" );
> > if ( team == TEAM3 )
> > Q_strcpy( teamspawn, "info_player_team3" );
> >
> > And then changing everywhere where it searches for a
> > "info_player_deathmatch" or "info_player_start" or whatever to
> > teamspawn, excluding the last one for a safety(Couldn't find one of
> > the above spots/Invalid team[Spectator])
> > On Fri, 31 Dec 2004 18:52:59 -0500, r00t 3:16 <[EMAIL PROTECTED]>
> wrote:
> > > I setup in the sdk_gamerules.cpp and shareddefs.h
> > > my teams
> > > I also changed LINK_ENTITY_TO_CLASS to match my teams.
> > >
> > > I am sort of stuck now.
> > > I see in player.cpp which is client side ? Does the spawning.
> > > sdk_player.cpp does not have EntSelectSpawnPoint()
> > > EntSelectSpawnPoint() in player.cpp seems to control where the players
> > > spawn.
> > > eg: info_player_start || info_player_deathmatch
> > > I need info_player_team1 || info_player_team2
> > > Now should I modify the player.cpp or override the EntSelectSpawnPoint
> in
> > > sdk_player.cpp / .h
> > > I also have in the FGD file
> > > @PointClass base(Angles) studio("models/editor/playerstart.mdl") =
> > > info_player_team1 :
> > > "This entity marks the start point for team1."
> > >
> > > @PointClass base(Angles) studio("models/editor/playerstart.mdl") =
> > > info_player_team2 :
> > > "This entity marks the start point for team2"
> > >
> > > I use the sdk_vehicles map for testing btw.
> > > I change the info_player_start to info_player_team1
> > >
> > > The part I am confused at I guess is where do I modify at?
> > > player.cpp ? or sdk_player?
> > > If I modify the player.cpp I would imagine I can find out what team was
> > > selected and then do the rest of the code.
> > >
> > > Any advice?
> > >
> > > Thanks in advance.
> > >
> > > r00t 3:16
> > > CQC Gaming
> > > www.cqc-gaming.com
> > >
> > > _______________________________________________
> > > 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
> >
> > _____________________________________________________________________
> >
> > Envie de discuter gratuitement avec vos amis ?
> > T�l�chargez Yahoo! Messenger http://yahoo.ifrance.com
>
> _____________________________________________________________________
>
> Envie de discuter gratuitement avec vos amis ?
> T�l�chargez Yahoo! Messenger http://yahoo.ifrance.com
>
>
> _______________________________________________
> 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