Overview | Package | Class | Source | Class tree | Glossary | Deus Ex 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 |
//============================================================================= // AugVision. //============================================================================= class AugVision extends Augmentation; var float mpAugValue; var float mpEnergyDrain; // ---------------------------------------------------------------------------- // Networking Replication // ---------------------------------------------------------------------------- replication { //server to client function calls reliable if (Role == ROLE_Authority) SetVisionAugStatus; } state Active { Begin: } function Activate() { local bool bWasActive; bWasActive = bIsActive; Super.Activate(); if (!bWasActive && bIsActive) { SetVisionAugStatus(CurrentLevel,LevelValues[CurrentLevel],True); Player.RelevantRadius = LevelValues[CurrentLevel]; } } function Deactivate() { local bool bWasActive; bWasActive = bIsActive; Super.Deactivate(); if (bWasActive && !bIsActive) { SetVisionAugStatus(CurrentLevel,LevelValues[CurrentLevel],False); Player.RelevantRadius = 0; } } // ---------------------------------------------------------------------- // SetVisionAugStatus() // ---------------------------------------------------------------------- simulated function SetVisionAugStatus(int Level, int LevelValue, bool IsActive) { if (IsActive) { if (++DeusExRootWindow(Player.rootWindow).hud.augDisplay.activeCount == 1) DeusExRootWindow(Player.rootWindow).hud.augDisplay.bVisionActive = True; } else { if (--DeusExRootWindow(Player.rootWindow).hud.augDisplay.activeCount == 0) DeusExRootWindow(Player.rootWindow).hud.augDisplay.bVisionActive = False; DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionBlinder = None; } DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevel = Level; DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevelValue = LevelValue; } simulated function PreBeginPlay() { Super.PreBeginPlay(); // If this is a netgame, then override defaults if ( Level.NetMode != NM_StandAlone ) { LevelValues[3] = mpAugValue; EnergyRate = mpEnergyDrain; } } defaultproperties { mpAugValue=800.000000 mpEnergyDrain=50.000000 EnergyRate=40.000000 Icon=Texture'DeusExUI.UserInterface.AugIconVision' smallIcon=Texture'DeusExUI.UserInterface.AugIconVision_Small' AugmentationName="Vision Enhancement" Description="By bleaching selected rod photoreceptors and saturating them with metarhodopsin XII, the 'nightvision' present in most nocturnal animals can be duplicated. Subsequent upgrades and modifications add infravision and sonar-resonance imaging that effectively allows an agent to see through walls.|n|nTECH ONE: Nightvision.|n|nTECH TWO: Infravision.|n|nTECH THREE: Close range sonar imaging.|n|nTECH FOUR: Long range sonar imaging." MPInfo="When active, you can see enemy players in the dark from any distance, and for short distances you can see through walls and see cloaked enemies. Energy Drain: Moderate" LevelValues(2)=320.000000 LevelValues(3)=800.000000 AugmentationLocation=LOC_Eye MPConflictSlot=6 } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |