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 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 |
//============================================================================= // 227 GameRules, modify certain game rules. // Should be added to rules list by a mutator. // Note: Do *not* use this class if you want your mod backwards compatible. //============================================================================= class GameRules extends Info abstract; var GameRules NextRules; /* Note: Try to enable only those flags you really need in order to save server resources */ var() bool bNotifyLogin; // Handle login releated stuff (ModifyPlayerSpawnClass/OverridePrelogin/AllowDownload) var() bool bNotifySpawnPoint; // Call ModifyPlayerStart/ModifyPlayer var() bool bNotifyRules; // Modify serverinfo rules (ModifyRules) var() bool bNotifyMessages; // Handle message functions (AllowBroadcast/AllowChat) var() bool bModifyDamage; // Call ModifyDamage on me. var() bool bHandleDeaths; // Handle death functions (NotifyKilled/PreventDeath) var() bool bModifyAI; // Call ModifyThreat var() bool bHandleMapEvents; // Call map switching functions (CanCoopTravel/CanRestartGame/CanRestartPlayer/AllowServerTravel) var() bool bHandleInventory; // Call CanPickupInventory /* To add to gamerules list: G = Spawn(Your rules class); if( Level.Game.GameRules==None ) Level.Game.GameRules = G; else Level.Game.GameRules.AddRules(G); */ function AddRules( GameRules Add ) { local GameRules G; for ( G=Self; G.NextRules!=None; G=G.NextRules ) {} G.NextRules = Add; } // Called whenever a Player uses 'Admin' command (always called) function string ExecAdminCmd( PlayerPawn Other, string Cmd ) { if ( NextRules!=None ) Return NextRules.ExecAdminCmd(Other,Cmd); if ( !Other.bAdmin ) Return ""; Return Other.ConsoleCommand(Cmd); } function PreBeginPlay(); // Don't call actor PreBeginPlay. // Called whenever a pawn has Died. function NotifyKilled( Pawn Killed, Pawn Killer, name DamageType ); // Called whenever a pawn takes damage. function ModifyDamage( Pawn Injured, Pawn EventInstigator, out int Damage, vector HitLocation, name DamageType, out vector Momentum ); // Prevent a pawn from dying. function bool PreventDeath( Pawn Dying, Pawn Killer, name DamageType ) { Return False; } // Modify a Pawn's threat to an another pawn. function ModifyThreat( Pawn Other, Pawn Hated, out byte Attitude ); // GetEnum(Enum'EAttitude',Attitude) // Allow an actor to use BroadcastMessage function bool AllowBroadcast( Actor Broadcasting, string Msg ) { Return True; } // Allow a player to talk a chat message function bool AllowChat( PlayerPawn Chatting, out string Msg ) { Return True; } // Modify a spawnpoint for a pawn function ModifyPlayerStart( Pawn Respawning, out NavigationPoint SpawningPoint, byte Team ); // Coop server travel function bool CanCoopTravel( Pawn Ender, out string NextURL ) { Return True; } // Modify a newly respawned pawn function ModifyPlayer( Pawn Other ); // A Pawn can pick up inventory function bool CanPickupInventory( Pawn Other, Inventory Inv ) { Return True; } // Modify a playerpawn class to spawn with function ModifyPlayerSpawnClass( string Options, out Class<PlayerPawn> AClass ); // Player can restart himself (called by ServerRestartPlayer). function bool CanRestartPlayer( PlayerPawn Other ) { Return True; } // Player can restart game (called by ServerRestartGame). function bool CanRestartGame( PlayerPawn Other ) { Return True; } // Modify server query rules function ModifyRules( out string Rules ); // Modify prelogin for whatsoever reason. function OverridePrelogin( string Options, string PlayerName, out string Error); /* Check if allowed to download a file off server, return false to give client downloading not allowed error */ function bool AllowDownload( NetConnection Conn, string PLName, string PLIP, string FileName, int FileSize ) { return true; } // ServerTravel was attempted: function bool AllowServerTravel( out string URL, bool bItems ) { return true; } defaultproperties { RemoteRole=ROLE_None } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |