Beta 3. Not a lot of really noticeable changes, just more polishing.

- Made Rifle scope shader toggleable, and tweaked its visuals a bit.
- Various adjustments to vector math (using portal-aware functions).
- Adjusted the penetration mechanics of the Quadshot, should be able to better go through multiple targets now.
- Fixed incorrect state jump after zoomed rifle altfire.
- Reduced the range of the Detector (2048 → 512), it was too massive.
- [flak_m] Fixed the issue where some looping weapon sounds would get stuck if the player died or dropped the weapon.
- Corrected Gun Lore description of Flamethrower altfire.
This commit is contained in:
Marisa the Magician 2019-09-28 20:59:00 +02:00
commit 80f472bb62
25 changed files with 118 additions and 102 deletions

View file

@ -55,9 +55,9 @@ Class URifle : UnrealWeapon
{
if ( sniperzoom <= 1. ) return;
if ( reticle.IsNull() ) reticle = TexMan.CheckForTexture("UReticle",Texman.Type_Any);
Screen.DrawTexture(reticle,false,300,300,DTA_VirtualWidth,600,DTA_VirtualHeight,600,DTA_LegacyRenderStyle,STYLE_Stencil,DTA_FillColor,Color(0,0,0));
Screen.DrawTexture(reticle,false,320,320,DTA_VirtualWidth,640,DTA_VirtualHeight,640,DTA_LegacyRenderStyle,STYLE_Stencil,DTA_FillColor,Color(255,0,0));
if ( !zfont ) zfont = Font.GetFont('UTFont40');
Screen.DrawText(zfont,Font.CR_UNTRANSLATED,700,700,String.Format("X%.1f",sniperzoom),DTA_VirtualWidth,1280,DTA_VirtualHeight,960,DTA_LegacyRenderStyle,STYLE_Stencil,DTA_FillColor,Color(0,0,0));
Screen.DrawText(zfont,Font.CR_UNTRANSLATED,700,700,String.Format("X%.1f",sniperzoom),DTA_VirtualWidth,1280,DTA_VirtualHeight,960,DTA_LegacyRenderStyle,STYLE_Stencil,DTA_FillColor,Color(255,0,0));
}
override void DetachFromOwner()
{
@ -72,7 +72,7 @@ Class URifle : UnrealWeapon
{
PlayerInfo p = players[consoleplayer];
if ( (p.Camera != Owner) || (sniperzoom <= 1.) ) Shader.SetEnabled(p,"URifleScope",false);
else Shader.SetEnabled(p,"URifleScope",true);
else Shader.SetEnabled(p,"URifleScope",CVar.GetCVar('sting_zoomshader',p).GetBool());
}
override void DoEffect()
{
@ -143,8 +143,8 @@ Class URifle : UnrealWeapon
l.target = self;
Vector3 x, y, z;
[x, y, z] = dt_CoordUtil.GetAxes(pitch,angle,roll);
Vector3 origin = Vec2OffsetZ(0,0,player.viewz)+10.0*x;
if ( !zoomed ) origin = origin+y*3.0-z*2.0;
Vector3 origin = level.Vec3Offset(Vec2OffsetZ(0,0,player.viewz),10*x);
if ( !zoomed ) origin = level.Vec3Offset(origin,y*3-z*2);
FLineTraceData d;
LineTrace(angle,10000,BulletSlope(),TRF_ABSPOSITION,origin.z,origin.x,origin.y,d);
if ( d.HitType == TRACE_HitActor )
@ -206,7 +206,7 @@ Class URifle : UnrealWeapon
s.scale *= 1.8;
s.alpha *= 0.3;
}
origin += x*4.0+y*6.0-z*10.0;
origin = level.Vec3Offset(origin,x*4+y*6-z*10);
let c = Spawn("UCasing",origin);
c.scale *= 1.25;
c.vel = x*FRandom[Junk](-1.5,1.5)+y*FRandom[Junk](2,4)+z*FRandom[Junk](2,3);
@ -292,7 +292,7 @@ Class URifle : UnrealWeapon
TNT1 A 7 A_RifleFire(true,true);
ZoomedAltFireEnd:
TNT1 A 6;
Goto Idle;
Goto ZoomedIdle;
Reload:
SRFI A 0 A_JumpIf(invoker.sniperzoom>1.0,"ZoomedReload");
SRFI A 8 A_ToggleLight();