~swag/armagetronad/0.2.9-sty+ct+ap-fork

« back to all changes in this revision

Viewing changes to src/engine/eTeam.cpp

merge with mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
404
404
void eTeam::UnInvite( ePlayerNetID * player )
405
405
{
406
406
    tASSERT( player );
 
407
    size_t wasInvited = player->invitations_.erase( this );
407
408
    if ( player->CurrentTeam() == this && this->IsLocked() )
408
409
    {
409
410
        sn_ConsoleOut( tOutput( "$invite_team_kick", player->GetColoredName(), Name() ) );
410
411
        player->SetTeam(0);
411
412
    }
412
 
    else
 
413
    else if ( wasInvited )
413
414
    {
414
415
        sn_ConsoleOut( tOutput( "$invite_team_uninvite", player->GetColoredName(), Name() ) );
415
416
    }
416
 
    player->invitations_.erase( this );
417
417
}
418
418
 
419
419
// check if a player is invited