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 |
class MutArena extends Mutator config; var() config string ArenaWeaponClassName; var bool bInitialized; var class<Weapon> ArenaWeaponClass; var string ArenaWeaponPickupClassName; var string ArenaAmmoPickupClassName; var localized string ArenaDisplayText, ArenaDescText; simulated function BeginPlay() { local WeaponLocker L; foreach AllActors(class'WeaponLocker', L) L.GotoState('Disabled'); Super.BeginPlay(); } function Initialize() { local int FireMode; bInitialized = true; DefaultWeaponName = ArenaWeaponClassName; ArenaWeaponClass = class<Weapon>(DynamicLoadObject(ArenaWeaponClassName,class'Class')); DefaultWeapon = ArenaWeaponClass; ArenaWeaponPickupClassName = string(ArenaWeaponClass.default.PickupClass); for( FireMode = 0; FireMode<2; FireMode++ ) { if( (ArenaWeaponClass.default.FireModeClass[FireMode] != None) && (ArenaWeaponClass.default.FireModeClass[FireMode].default.AmmoClass != None) && (ArenaWeaponClass.default.FireModeClass[FireMode].default.AmmoClass.default.PickupClass != None) ) { ArenaAmmoPickupClassName = string(ArenaWeaponClass.default.FireModeClass[FireMode].default.AmmoClass.default.PickupClass); break; } } } function bool CheckReplacement( Actor Other, out byte bSuperRelevant ) { if ( !bInitialized ) Initialize(); bSuperRelevant = 0; if ( xWeaponBase(Other) != None ) xWeaponBase(Other).WeaponType = ArenaWeaponClass; else if ( (Weapon(Other) != None) && (Other.Class != ArenaWeaponClass) ) { if ( Weapon(Other).bNoInstagibReplace ) { bSuperRelevant = 0; return true; } return false; } else if ( (WeaponPickup(Other) != None) && (string(Other.Class) != ArenaWeaponPickupClassName) ) ReplaceWith( Other, ArenaWeaponPickupClassName); else if ( (Ammo(Other) != None) && (string(Other.Class) != ArenaAmmoPickupClassName) ) ReplaceWith( Other, ArenaAmmoPickupClassName); else { if ( Other.IsA('WeaponLocker') ) Other.GotoState('Disabled'); return true; } return false; } static function FillPlayInfo(PlayInfo PlayInfo) { local array<CacheManager.WeaponRecord> Recs; local string WeaponOptions; local int i; Super.FillPlayInfo(PlayInfo); class'CacheManager'.static.GetWeaponList(Recs); for (i = 0; i < Recs.Length; i++) { if (WeaponOptions != "") WeaponOptions $= ";"; WeaponOptions $= Recs[i].ClassName $ ";" $ Recs[i].FriendlyName; } PlayInfo.AddSetting(default.RulesGroup, "ArenaWeaponClassName", default.ArenaDisplayText, 0, 1, "Select", WeaponOptions); } static event string GetDescriptionText(string PropName) { if (PropName == "ArenaWeaponClassName") return default.ArenaDescText; return Super.GetDescriptionText(PropName); } defaultproperties { ArenaWeaponClassName="XWeapons.RocketLauncher" ArenaDisplayText="Arena Weapon" ArenaDescText="Determines which weapon will be used in the arena match" GroupName="Arena" FriendlyName="Arena" Description="Replace weapons and ammo in map." bNetTemporary=Wahr bAlwaysRelevant=Wahr RemoteRole=ROLE_SimulatedProxy } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |