Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- simulated event RenderOverlays( canvas Canvas )
- {
- local rotator NewRot;
- local bool bPlayerOwner;
- local int Hand;
- local PlayerPawn PlayerOwner;
- if ( bHideWeapon || (Owner == None) )
- return;
- PlayerOwner = PlayerPawn(Owner);
- if ( PlayerOwner != None )
- {
- bPlayerOwner = true;
- Hand = PlayerOwner.Handedness;
- }
- if ( (Level.NetMode == NM_Client) && bPlayerOwner && (Hand == 2) )
- {
- bHideWeapon = true;
- return;
- }
- if ( !bPlayerOwner || (PlayerOwner.Player == None) )
- Pawn(Owner).WalkBob = vect(0,0,0);
- if ( (bMuzzleFlash > 0) && bDrawMuzzleFlash && Level.bHighDetailMode && (MFTexture != None) )
- {
- MuzzleScale = Default.MuzzleScale * Canvas.ClipX/640.0;
- if ( !bSetFlashTime )
- {
- bSetFlashTime = true;
- FlashTime = Level.TimeSeconds + FlashLength;
- }
- else if ( FlashTime < Level.TimeSeconds )
- bMuzzleFlash = 0;
- if ( bMuzzleFlash > 0 )
- {
- if ( Hand == 0 )
- Canvas.SetPos(Canvas.ClipX/2 - MuzzleScale * FlashS + Canvas.ClipX * (-0.2 * Default.FireOffset.Y * FlashO), Canvas.ClipY/2 - MuzzleScale * FlashS + Canvas.ClipY * (FlashY + FlashC));
- else
- Canvas.SetPos(Canvas.ClipX/2 - MuzzleScale * FlashS + Canvas.ClipX * (Hand * Default.FireOffset.Y * FlashO), Canvas.ClipY/2 - MuzzleScale * FlashS + Canvas.ClipY * FlashY);
- Canvas.Style = 3;
- Canvas.DrawIcon(MFTexture, MuzzleScale);
- Canvas.Style = 1;
- }
- }
- else
- bSetFlashTime = false;
- SetLocation( Owner.Location + CalcDrawOffset() );
- NewRot = Pawn(Owner).ViewRotation;
- if ( Hand == 0 )
- newRot.Roll = -2 * Default.Rotation.Roll;
- else
- newRot.Roll = Default.Rotation.Roll * Hand;
- DrawScale3D.Y = Hand;
- setRotation(newRot);
- if(PlayerOwner.DesiredFOV == PlayerOwner.DefaultFOV)
- Canvas.DrawActor(self, false);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement