class SchlonzSniperRifle extends SniperRifle; // compensate for bright fog simulated function SetZoomBlendColor(Canvas c) { /* local Byte val; local Color clr; local Color fog; clr.R = 255; clr.G = 255; clr.B = 255; clr.A = 255; if( Instigator.Region.Zone.bDistanceFog ) { fog = Instigator.Region.Zone.DistanceFogColor; val = 0; val = Max( val, fog.R); val = Max( val, fog.G); val = Max( val, fog.B); if( val > 128 ) { val -= 128; clr.R -= val; clr.G -= val; clr.B -= val; } } c.DrawColor = clr; */ } simulated event RenderOverlays( Canvas Canvas ) { local float tileScaleX; local float tileScaleY; local float bX; local float bY; local float fX; local float fY; local float charge; local float tX; local float tY; local float barOrgX; local float barOrgY; local float barSizeX; local float barSizeY; if( LastFOV > PlayerController( Instigator.Controller ).DesiredFOV ) { PlaySound( Sound'WeaponSounds.LightningGun.LightningZoomIn', SLOT_Misc,,,,,false ); } else if ( LastFOV < PlayerController(Instigator.Controller).DesiredFOV ) { PlaySound( Sound'WeaponSounds.LightningGun.LightningZoomOut', SLOT_Misc,,,,,false ); } LastFOV = PlayerController( Instigator.Controller ).DesiredFOV; if( PlayerController( Instigator.Controller ).DesiredFOV == PlayerController( Instigator.Controller ).DefaultFOV ) { Super.RenderOverlays( Canvas ); zoomed=false; } else { if ( FireMode[0].NextFireTime <= Level.TimeSeconds ) { charge = 1.0; } else { charge = 1.0 - ((FireMode[0].NextFireTime-Level.TimeSeconds) / FireMode[0].FireRate); } tileScaleX = Canvas.SizeX / 640.0f; tileScaleY = Canvas.SizeY / 480.0f; bX = borderX * tileScaleX; bY = borderY * tileScaleY; fX = focusX * tileScaleX; fY = focusY * tileScaleX; tX = testX * tileScaleX; tY = testY * tileScaleX; barOrgX = RechargeOrigin.X * tileScaleX; barOrgY = RechargeOrigin.Y * tileScaleY; barSizeX = RechargeSize.X * tileScaleX; barSizeY = RechargeSize.Y * tileScaleY; SetZoomBlendColor(Canvas); Canvas.Style = 255; Canvas.SetPos(0,0); Canvas.DrawTile( Material'XGameShaders.RedeemerReticle', 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 0, 0, 512, 512 ); Canvas.SetPos(0.5*Canvas.SizeX,0); Canvas.DrawTile( Material'XGameShaders.RedeemerReticle', 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 0, -512, 512 ); Canvas.SetPos(0,0.5*Canvas.SizeY); Canvas.DrawTile( Material'XGameShaders.RedeemerReticle', 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 0, 512, 512, -512 ); Canvas.SetPos(0.5*Canvas.SizeX,0.5*Canvas.SizeY); Canvas.DrawTile( Material'XGameShaders.RedeemerReticle', 0.5 * Canvas.SizeX, 0.5 * Canvas.SizeY, 512, 512, -512, -512 ); // Draw the Charging meter -AsP Canvas.DrawColor = ChargeColor; Canvas.DrawColor.A = 255; if( charge <1 ) Canvas.DrawColor.R = 255*charge; else { Canvas.DrawColor.R = 0; Canvas.DrawColor.B = 0; } if( charge == 1 ) Canvas.DrawColor.G = 255; else Canvas.DrawColor.G = 0; Canvas.Style = ERenderStyle.STY_Alpha; // STY_Alpha Canvas.SetPos( barOrgX, barOrgY ); Canvas.DrawTile( Texture'Engine.WhiteTexture',barSizeX,barSizeY*charge, 0.0, 0.0,Texture'Engine.WhiteTexture'.USize,Texture'Engine.WhiteTexture'.VSize*charge ); zoomed = true; } } // RenderOverlays defaultproperties { FireModeClass(0)=Class'SchlonzUT.SchlonzSniperFire' PickupClass=Class'SchlonzUT.SchlonzSniperRiflePickup' AttachmentClass=Class'SchlonzUT.SchlonzSniperAttachment' ItemName="Sniper Rifle" }