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 |
class WeaponAttachment extends InventoryAttachment native nativereplication; var byte FlashCount; // when incremented, draw muzzle flash for current frame var byte FiringMode; // replicated to identify what type of firing/reload animations to play var byte SpawnHitCount; // when incremented, spawn hit effect at mHitLocation var bool bAutoFire; // When set to true.. begin auto fire sequence (used to play looping anims) var float FiringSpeed; // used by human animations to determine the appropriate speed to play firing animations var vector mHitLocation; // used for spawning hit effects client side var bool bMatchWeapons; // for team beacons (link gun potential links) var color BeaconColor; // if bMatchWeapons, what color team beacon should be var class<Actor> SplashEffect; replication { // Things the server should send to the client. reliable if( bNetDirty && (!bNetOwner || bDemoRecording || bRepClientDemo) && (Role==ROLE_Authority) ) FlashCount, FiringMode, bAutoFire; reliable if ( bNetDirty && (Role==ROLE_Authority) ) mHitLocation, SpawnHitCount; } /* ThirdPersonEffects called by Pawn's C++ tick if FlashCount incremented becomes true OR called locally for local player */ simulated event ThirdPersonEffects() { // spawn 3rd person effects // have pawn play firing anim if ( Instigator != None ) { if ( FiringMode == 1 ) Instigator.PlayFiring(1.0,'1'); else Instigator.PlayFiring(1.0,'0'); } } simulated function CheckForSplash() { local Actor HitActor; local vector HitNormal, HitLocation; if ( !Level.bDropDetail && (Level.DetailMode != DM_Low) && (SplashEffect != None) && !Instigator.PhysicsVolume.bWaterVolume ) { // check for splash bTraceWater = true; HitActor = Trace(HitLocation,HitNormal,mHitLocation,Instigator.Location,true); bTraceWater = false; if ( (FluidSurfaceInfo(HitActor) != None) || ((PhysicsVolume(HitActor) != None) && PhysicsVolume(HitActor).bWaterVolume) ) Spawn(SplashEffect,,,HitLocation,rot(16384,0,0)); } } /* UpdateHit - used to update properties so hit effect can be spawn client side */ function UpdateHit(Actor HitActor, vector HitLocation, vector HitNormal); defaultproperties { FiringSpeed=1.000000 BeaconColor=(G=255,A=255) CullDistance=4000.000000 bActorShadows=Wahr bReplicateInstigator=Wahr NetUpdateFrequency=8.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |