Mantis 0001042:

o Fixed bug where a player could not switch teams after the game had started

Commented out the lines in AvHPlayer::GetIsAuthorized that prevented it. To be replaced by Nexus.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@237 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-07-05 01:55:12 +00:00
parent 36e38984a2
commit dc94d3525d

View file

@ -9807,14 +9807,15 @@ bool AvHPlayer::GetIsAuthorized(AvHAuthAction inAction, int inParameter) const
// check it's an active team
if( theTeam == GetGameRules()->GetTeamA()->GetTeamNumber() || theTeam == GetGameRules()->GetTeamB()->GetTeamNumber() )
{
if( GetGameRules()->GetCheatsEnabled() ) { return true; } // cheaters can switch
if( !GetGameRules()->GetGameStarted() ) { return true; } // can switch teams before start
if( this->GetHasBeenSpectator() ) { return false; } // spectators have seen everybody
for(int counter = TEAM_ACTIVE_BEGIN; counter < TEAM_ACTIVE_END; counter++)
{
if( theTeam != counter && this->GetHasSeenTeam( (AvHTeamNumber)counter ) )
{ return false; } // we've seen another active team
}
// tankefugl: 0001042 -- allow switching of teams -- placeholder before Nexus
// if( GetGameRules()->GetCheatsEnabled() ) { return true; } // cheaters can switch
// if( !GetGameRules()->GetGameStarted() ) { return true; } // can switch teams before start
// if( this->GetHasBeenSpectator() ) { return false; } // spectators have seen everybody
// for(int counter = TEAM_ACTIVE_BEGIN; counter < TEAM_ACTIVE_END; counter++)
// {
// if( theTeam != counter && this->GetHasSeenTeam( (AvHTeamNumber)counter ) )
// { return false; } // we've seen another active team
// }
return true; // haven't seen another team, authorized to join
}
return false; // unknown/inactive team - never grant an unknown permission!