Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 |
//============================================================================== // UnrealTeamChatRoom allows the server to have two channels with the same name - one for each team // // Written by Ron Prestenback // © 2003, Epic Games, Inc. All Rights Reserved //============================================================================== class UnrealTeamChatRoom extends UnrealChatRoom; simulated function bool IsTeamChannel() { return VoiceChatReplicationInfo(Owner) != None && !IsPublicChannel(); } simulated function bool CanJoinChannel(PlayerReplicationInfo PRI) { if ( !Super.CanJoinChannel(PRI) ) return false; if ( PRI.Team == None ) { log("CanJoinChannel returning false PRI.Team == None",'VoiceChat'); return false; } if ( GetTeam() != PRI.Team.TeamIndex ) { // Always allowed to join public channels if ( IsPublicChannel() ) return true; // Team, Offense, Defense if ( IsTeamChannel() ) return false; // Only if server allows cross-team private chat if ( TeamVoiceReplicationInfo(VoiceChatManager).bTeamChatOnly ) return false; } return true; } // This function is called from TeamInfo.AddToTeam() // It handles switching a player's membership in any "team" channels to the corresponding channel on the new team function bool NotifyTeamChange(PlayerReplicationInfo PRI, int NewTeamIndex) { local VoiceChatRoom Other; // Only one copy of public channels, so don't worry about it if ( IsPublicChannel() ) return false; // Not joining our team - we don't care if ( GetTeam() != NewTeamIndex ) return false; // This player is a member of this channel already, just skip if ( IsMember(PRI) ) return false; if ( IsTeamChannel() ) { // Find out if this player is a member of the opposing team's channel Other = VoiceChatManager.GetChannelAt(TeamVoiceReplicationInfo(VoiceChatManager).GetOpposingTeamChannel(ChannelIndex)); if ( Other != None ) return Other.IsMember(PRI); } return Super.NotifyTeamChange(PRI,NewTeamIndex); } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |