diff options
Diffstat (limited to 'src/game/g_team.c')
-rw-r--r-- | src/game/g_team.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/game/g_team.c b/src/game/g_team.c index e57da1bd..c3c490e5 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -63,26 +63,6 @@ team_t G_TeamFromString( char *str ) } /* -================ -G_TeamName -================ -*/ -char *G_TeamName( team_t team ) -{ - switch( team ) - { - case TEAM_NONE: - return "spectator"; - case TEAM_ALIENS: - return "alien"; - case TEAM_HUMANS: - return "human"; - default: - return "unknown"; - } -} - -/* ============== OnSameTeam ============== @@ -194,6 +174,26 @@ void G_ChangeTeam( gentity_t *ent, team_t newTeam ) } ClientUserinfoChanged( ent->client->ps.clientNum ); + + if( oldTeam != TEAM_NONE && newTeam != TEAM_NONE ) + { + G_LogPrintf( + "team: %i %i %i: %s" S_COLOR_WHITE " left the %ss and joined the %ss\n", + ent->s.number, newTeam, oldTeam, ent->client->pers.netname, + BG_TeamName( oldTeam ), BG_TeamName( newTeam ) ); + } + else if( newTeam == TEAM_NONE ) + { + G_LogPrintf( "team: %i %i %i: %s" S_COLOR_WHITE " left the %ss\n", + ent->s.number, newTeam, oldTeam, ent->client->pers.netname, + BG_TeamName( oldTeam ) ); + } + else + { + G_LogPrintf( "team: %i %i %i: %s" S_COLOR_WHITE " joined the %ss\n", + ent->s.number, newTeam, oldTeam, ent->client->pers.netname, + BG_TeamName( newTeam ) ); + } } /* |