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 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class UTHeroBerserk extends UTTimedPowerup; /** Overlay material applied to owner */ var MaterialInterface OverlayMaterialInstance; /** Multiplier applied to weapon fire rate */ var float FireRateMultiplier; simulated static function AddWeaponOverlay(UTGameReplicationInfo GRI) { GRI.WeaponOverlays[1] = default.OverlayMaterialInstance; } simulated function DisplayPowerup(Canvas Canvas, UTHud HUD, float ResolutionScale,out float YPos) { } /** adds or removes our bonus from the given pawn */ simulated function AdjustPawn(UTPawn P, bool bRemoveBonus) { if (P != None && Role == ROLE_Authority) { if (bRemoveBonus) { P.FireRateMultiplier *= FireRateMultiplier; } else { // halve firing time P.FireRateMultiplier *= 1.0/FireRateMultiplier; } P.FireRateChanged(); } } function GivenTo(Pawn NewOwner, bool bDoNotActivate) { local UTPawn P; Super.GivenTo(NewOwner, bDoNotActivate); P = UTPawn(NewOwner); if (P != None) { // apply Berserk overlay P.SetWeaponOverlayFlag(1); AdjustPawn(P, false); } } reliable client function ClientGivenTo(Pawn NewOwner, bool bDoNotActivate) { Super.ClientGivenTo(NewOwner, bDoNotActivate); if (Role < ROLE_Authority) { AdjustPawn(UTPawn(NewOwner), false); } } function ItemRemovedFromInvManager() { local UTPawn P; P = UTPawn(Owner); if ( P != None ) { P.ClearWeaponOverlayFlag(1); AdjustPawn(P, true); } } simulated event Destroyed() { if (Role < ROLE_Authority) { AdjustPawn(UTPawn(Owner), true); } Super.Destroyed(); } defaultproperties { OverlayMaterialInstance=Material'PICKUPS.Berserk.M_Berserk_Overlay' FireRateMultiplier=1.700000 bDropOnDisrupt=False bRenderOverlays=True bReceiveOwnerEvents=True bDropOnDeath=False Begin Object Class=SpriteComponent Name=Sprite ObjName=Sprite Archetype=SpriteComponent'UTGame.Default__UTTimedPowerup:Sprite' ObjectArchetype=SpriteComponent'UTGame.Default__UTTimedPowerup:Sprite' End Object Components(0)=Sprite Name="Default__UTHeroBerserk" ObjectArchetype=UTTimedPowerup'UTGame.Default__UTTimedPowerup' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |