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 00130 00131 00132 00133 00134 |
// ============================================================================ // JBMutator // Copyright 2006 by Jrubzjeknf <rrvanolst@hotmail.com> // $Id: JBMutator.uc,v 1.4 2007-04-25 15:17:41 jrubzjeknf Exp $ // // Jailbreak's base mutator. // ============================================================================ class JBMutator extends DMMutator HideDropDown CacheExempt; // ============================================================================ // Variables // ============================================================================ var array<String> VariableNames; // ============================================================================ // AddMutator // // Does not add NoJailKill addons, since it's implemented in Jailbreak. Checks // if the added mutator is an Arena mutator like Instagib. // ============================================================================ function AddMutator(Mutator M) { if (M != None && M.GroupName ~= "NoJailKill") { log("Warning: Superfluous NoJailKill addon NOT loaded - remove this addon from the addon list"); if (!Jailbreak(Level.Game).bNoJailKill) { log("Warning: Jailbreak.bNoJailKill is now enabled. Please enable it permanently to use NoJailKill functionality"); Jailbreak(Level.Game).bNoJailKill = True; } return; } Super.AddMutator(M); if (M != None && M.GroupName ~= "Arena") Jailbreak(Level.Game).bArenaMutatorActive = True; } // ============================================================================ // AlwaysKeep // // Prevents the ShieldGun from being deleted from a user's inventory by an // Arena mutator when it's added in prison. // ============================================================================ function bool AlwaysKeep(Actor Other) { local JBTagPlayer TagPlayer; if (Jailbreak(Level.Game).bArenaMutatorActive && Jailbreak(Level.Game).bEnableJailFights && Weapon(Other) != None && !Weapon(Other).bCanThrow && Weapon(Other).bMeleeWeapon && Other.Instigator != None && Other.Instigator.PlayerReplicationInfo != None) { TagPlayer = class'JBTagPlayer'.static.FindFor(Other.Instigator.PlayerReplicationInfo); return TagPlayer.IsInJail() || Super.AlwaysKeep(Other); } return Super.AlwaysKeep(Other); } // ============================================================================ // CheckReplacement // // All sentinels are passed through this function. Checks if we want to // replace it with our own. // ============================================================================ function bool CheckReplacement(Actor Other, out byte bSuperRelevant) { if (ASVehicleFactory(Other) != None && Mid(Other, InStr(Level, ".")+1, 37) ~= "ASVehicleFactory_SentinelCeiling_Proj") { ReplaceSentinelFactory(Other); return False; } return True; } // ============================================================================ // ReplaceSentinelFactory // // Stop the current factory from spawning sentinels, spawn our own factory and // copy the custom variables. // ============================================================================ function ReplaceSentinelFactory(Actor OldFactory) { local class<Actor> NewFactoryClass; local Actor NewFactory; local int i; // Prevent the old factory from spawning more sentinels. SVehicleFactory(OldFactory).VehicleClass = None; // Spawn our own sentinel fctory. NewFactoryClass = class<Actor>(DynamicLoadObject("JBToolbox2.JBSentinelCeilingFactory", class'Class')); NewFactory = Spawn(NewFactoryClass,, OldFactory.Tag, OldFactory.Location, OldFactory.Rotation); // Copy the custom variables. for (i=0; i<VariableNames.length; ++i) NewFactory.SetPropertyText(VariableNames[i], OldFactory.GetPropertyText(VariableNames[i])); } // ============================================================================ // Default properties // ============================================================================ defaultproperties { VariableNames(0) = "bSleepWhenDisabled" VariableNames(1) = "ProjectileClass" VariableNames(2) = "ProjectileSpawnOffset" VariableNames(3) = "FireRate" VariableNames(4) = "FireSound" VariableNames(5) = "AttachmentClass" VariableNames(6) = "FlashEmitterClass" VariableNames(7) = "SmokeEmitterClass" } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |