Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. simulated event RenderOverlays( canvas Canvas )
  2. {
  3. local rotator NewRot;
  4. local bool bPlayerOwner;
  5. local int Hand;
  6. local PlayerPawn PlayerOwner;
  7.  
  8. if ( bHideWeapon || (Owner == None) )
  9. return;
  10.  
  11. PlayerOwner = PlayerPawn(Owner);
  12. if ( PlayerOwner != None )
  13. {
  14. bPlayerOwner = true;
  15. Hand = PlayerOwner.Handedness;
  16. }
  17.  
  18. if ( (Level.NetMode == NM_Client) && bPlayerOwner && (Hand == 2) )
  19. {
  20. bHideWeapon = true;
  21. return;
  22. }
  23.  
  24. if ( !bPlayerOwner || (PlayerOwner.Player == None) )
  25. Pawn(Owner).WalkBob = vect(0,0,0);
  26.  
  27. if ( (bMuzzleFlash > 0) && bDrawMuzzleFlash && Level.bHighDetailMode && (MFTexture != None) )
  28. {
  29. MuzzleScale = Default.MuzzleScale * Canvas.ClipX/640.0;
  30. if ( !bSetFlashTime )
  31. {
  32. bSetFlashTime = true;
  33. FlashTime = Level.TimeSeconds + FlashLength;
  34. }
  35. else if ( FlashTime < Level.TimeSeconds )
  36. bMuzzleFlash = 0;
  37. if ( bMuzzleFlash > 0 )
  38. {
  39. if ( Hand == 0 )
  40. Canvas.SetPos(Canvas.ClipX/2 - MuzzleScale * FlashS + Canvas.ClipX * (-0.2 * Default.FireOffset.Y * FlashO), Canvas.ClipY/2 - MuzzleScale * FlashS + Canvas.ClipY * (FlashY + FlashC));
  41. else
  42. Canvas.SetPos(Canvas.ClipX/2 - MuzzleScale * FlashS + Canvas.ClipX * (Hand * Default.FireOffset.Y * FlashO), Canvas.ClipY/2 - MuzzleScale * FlashS + Canvas.ClipY * FlashY);
  43.  
  44. Canvas.Style = 3;
  45. Canvas.DrawIcon(MFTexture, MuzzleScale);
  46. Canvas.Style = 1;
  47. }
  48. }
  49. else
  50. bSetFlashTime = false;
  51.  
  52. SetLocation( Owner.Location + CalcDrawOffset() );
  53. NewRot = Pawn(Owner).ViewRotation;
  54.  
  55. if ( Hand == 0 )
  56. newRot.Roll = -2 * Default.Rotation.Roll;
  57. else
  58. newRot.Roll = Default.Rotation.Roll * Hand;
  59.  
  60. DrawScale3D.Y = Hand;
  61.  
  62. setRotation(newRot);
  63. if(PlayerOwner.DesiredFOV == PlayerOwner.DefaultFOV)
  64. Canvas.DrawActor(self, false);
  65. }