mirror of
https://github.com/unknownworlds/NS.git
synced 2025-02-16 17:01:30 +00:00
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:
parent
36e38984a2
commit
dc94d3525d
1 changed files with 9 additions and 8 deletions
|
@ -9807,14 +9807,15 @@ bool AvHPlayer::GetIsAuthorized(AvHAuthAction inAction, int inParameter) const
|
||||||
// check it's an active team
|
// check it's an active team
|
||||||
if( theTeam == GetGameRules()->GetTeamA()->GetTeamNumber() || theTeam == GetGameRules()->GetTeamB()->GetTeamNumber() )
|
if( theTeam == GetGameRules()->GetTeamA()->GetTeamNumber() || theTeam == GetGameRules()->GetTeamB()->GetTeamNumber() )
|
||||||
{
|
{
|
||||||
if( GetGameRules()->GetCheatsEnabled() ) { return true; } // cheaters can switch
|
// tankefugl: 0001042 -- allow switching of teams -- placeholder before Nexus
|
||||||
if( !GetGameRules()->GetGameStarted() ) { return true; } // can switch teams before start
|
// if( GetGameRules()->GetCheatsEnabled() ) { return true; } // cheaters can switch
|
||||||
if( this->GetHasBeenSpectator() ) { return false; } // spectators have seen everybody
|
// if( !GetGameRules()->GetGameStarted() ) { return true; } // can switch teams before start
|
||||||
for(int counter = TEAM_ACTIVE_BEGIN; counter < TEAM_ACTIVE_END; counter++)
|
// 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
|
// 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 true; // haven't seen another team, authorized to join
|
||||||
}
|
}
|
||||||
return false; // unknown/inactive team - never grant an unknown permission!
|
return false; // unknown/inactive team - never grant an unknown permission!
|
||||||
|
|
Loading…
Reference in a new issue