home *** CD-ROM | disk | FTP | other *** search
/ Game Level Design / GLDesign.bin / Software / UnrealEngine2Runtime / UE2Runtime-22262001_Demo.exe / Engine / Classes / WeaponAttachment.uc < prev    next >
Text File  |  2003-06-23  |  1KB  |  39 lines

  1. class WeaponAttachment extends InventoryAttachment
  2.     native
  3.     nativereplication;
  4.  
  5. var        byte    FlashCount;            // when incremented, draw muzzle flash for current frame
  6. var        bool    bAutoFire;            // When set to true.. begin auto fire sequence (used to play looping anims)
  7. var        name    FiringMode;            // replicated to identify what type of firing/reload animations to play
  8. var        float    FiringSpeed;        // used by human animations to determine the appropriate speed to play firing animations
  9.  
  10. // FIXME - should firingmode be compressed to byte?
  11.  
  12. replication
  13. {
  14.     // Things the server should send to the client.
  15.     reliable if( bNetDirty && !bNetOwner && (Role==ROLE_Authority) )
  16.         FlashCount, FiringMode, bAutoFire;
  17. }
  18.  
  19. /* 
  20. ThirdPersonEffects called by Pawn's C++ tick if FlashCount incremented
  21. becomes true
  22. OR called locally for local player
  23. */
  24. simulated event ThirdPersonEffects()
  25. {
  26.     // spawn 3rd person effects
  27.  
  28.     // have pawn play firing anim
  29.     if ( Instigator != None )
  30.         Instigator.PlayFiring(1.0,FiringMode);
  31. }
  32.  
  33. defaultproperties
  34. {
  35.     bReplicateInstigator=true
  36.     FiringSpeed=+1.0
  37.     bActorShadows=true
  38. }
  39.