From 884ad51aa45e225f2224df8e4e8be4b8256691d9 Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Sun, 16 Mar 2025 16:14:34 +0100 Subject: [PATCH] Small fixups to new code. --- language.version | 4 ++-- zscript/handler/swwm_handler_crosshair.zsc | 24 ++++++++++++---------- zscript/weapons/swwm_blazeit.zsc | 6 +++--- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/language.version b/language.version index 509e974ab..147c15c5e 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1203 \cu(dom 16 mar 2025 15:50:48 CET)\c-"; -SWWM_SHORTVER="\cw1.3pre r1203 \cu(2025-03-16 15:50:48)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1203 \cu(dom 16 mar 2025 16:14:34 CET)\c-"; +SWWM_SHORTVER="\cw1.3pre r1203 \cu(2025-03-16 16:14:34)\c-"; diff --git a/zscript/handler/swwm_handler_crosshair.zsc b/zscript/handler/swwm_handler_crosshair.zsc index ebcb6fabe..9806bce45 100644 --- a/zscript/handler/swwm_handler_crosshair.zsc +++ b/zscript/handler/swwm_handler_crosshair.zsc @@ -28,7 +28,7 @@ extend Class SWWMHandler transient ui Vector3 tpos[MAX_CROSSHAIRS]; // current trace positions in world space transient ui Color tcol[MAX_CROSSHAIRS]; // current crosshair colors transient ui SWWMProjectionData tprojdata; // cached Fast projection data - transient ui Vector2 lagvpos[MAX_CROSSHAIRS]; // "lagged" clip pos for crosshairs + transient ui Vector3 lagndc[MAX_CROSSHAIRS]; // "lagged" clip pos for crosshairs transient ui bool tactive[MAX_CROSSHAIRS]; // denotes that the crosshair is "active" for drawing transient ui double prevframe; // previous frame timestamp @@ -128,8 +128,7 @@ extend Class SWWMHandler if ( int(ts.x)%2 ) oddfix.x = -floor(sz/2.)+1.; if ( int(ts.y)%2 ) oddfix.y = -floor(sz/2.)+1.; SWWMUtility.PrepareProjData(tprojdata,e.ViewPos,e.ViewAngle,e.ViewPitch,e.ViewRoll,players[consoleplayer].fov); - int cliptop = tprojdata.viewy, clipbottom = tprojdata.viewy+tprojdata.viewh, - clipleft = tprojdata.viewx, clipright = tprojdata.viewx+tprojdata.vieww; + Screen.SetClipRect(tprojdata.viewx,tprojdata.viewy,tprojdata.vieww,tprojdata.viewh); Vector2 actpos[MAX_CROSSHAIRS]; for ( int i=0; i