From fc8790e1d0bd299d84ded220435ea516d2676b50 Mon Sep 17 00:00:00 2001 From: Steam Deck User Date: Mon, 13 Mar 2023 17:32:17 -0400 Subject: [PATCH] Fix crosshair values for weapons, add Springfield to engine --- source/psp/video_hardware_QMB.cpp | 6 + source/psp/video_hardware_draw.cpp | 218 ++++++++++----------------- source/psp/video_hardware_screen.cpp | 2 + source/quakedef.h | 3 + 4 files changed, 90 insertions(+), 139 deletions(-) diff --git a/source/psp/video_hardware_QMB.cpp b/source/psp/video_hardware_QMB.cpp index 67481a0..262864f 100644 --- a/source/psp/video_hardware_QMB.cpp +++ b/source/psp/video_hardware_QMB.cpp @@ -2466,6 +2466,9 @@ float pap_detr(int weapon) case W_BIATCH: return 1; break; + case W_SPRING: + return 0; + break; case W_KAR: return 0; break; @@ -2541,6 +2544,9 @@ float pap_detr(int weapon) case W_COMPRESSOR: return 1; break; + case W_PULVERIZER: + return 1; + break; case W_M1000: return 1; break; diff --git a/source/psp/video_hardware_draw.cpp b/source/psp/video_hardware_draw.cpp index 0297fac..a621a65 100644 --- a/source/psp/video_hardware_draw.cpp +++ b/source/psp/video_hardware_draw.cpp @@ -1169,95 +1169,66 @@ int CrossHairWeapon (void) { case W_COLT: case W_BIATCH: - i = 15; - break; - case W_KAR: - case W_ARMAGEDDON: - i = 50; - break; - case W_THOMPSON: - case W_GIBS: - i = 10; - break; case W_357: case W_KILLU: - i = 10; + i = 22; break; + case W_PTRS: + case W_PENETRATOR: + case W_KAR_SCOPE: + case W_HEADCRACKER: + case W_KAR: + case W_ARMAGEDDON: + case W_SPRING: + case W_PULVERIZER: + i = 65; + break; + case W_MP40: + case W_AFTERBURNER: + case W_STG: + case W_SPATZ: + case W_THOMPSON: + case W_GIBS: case W_BAR: case W_WIDOW: + case W_PPSH: + case W_REAPER: + case W_RAY: + case W_PORTER: + case W_TYPE: + case W_SAMURAI: + case W_FG: + case W_IMPELLER: + case W_MP5: + case W_KOLLIDER: i = 10; break; case W_BROWNING: case W_ACCELERATOR: - i = 20; - break; - case W_DB: - case W_BORE: - i = 25; - break; - case W_FG: - case W_IMPELLER: - i = 10; - break; - case W_GEWEHR: - case W_COMPRESSOR: - i = 10; - break; - case W_KAR_SCOPE: - case W_HEADCRACKER: - i = 50; - break; - case W_M1: - case W_M1000: - i = 10; - break; - case W_M1A1: - case W_WIDDER: - i = 10; - break; - case W_MP40: - case W_AFTERBURNER: - i = 10; - break; case W_MG: case W_BARRACUDA: - i = 20; - break; - case W_PANZER: - case W_LONGINUS: - i = 0; - break; - case W_PPSH: - case W_REAPER: - i = 10; - break; - case W_PTRS: - case W_PENETRATOR: - i = 50; - break; - case W_RAY: - case W_PORTER: - i = 10; + i = 30; break; case W_SAWNOFF: case W_SNUFF: - i = 30; - break; - case W_STG: - case W_SPATZ: - i = 10; + i = 50; break; case W_TRENCH: case W_GUT: - i = 25; + case W_DB: + case W_BORE: + i = 35; break; - case W_TYPE: - case W_SAMURAI: - i = 10; - break; - case W_MP5: - i = 10; + case W_GEWEHR: + case W_COMPRESSOR: + case W_M1: + case W_M1000: + case W_M1A1: + case W_WIDDER: + i = 5; break; + case W_PANZER: + case W_LONGINUS: case W_TESLA: i = 0; break; @@ -1266,6 +1237,8 @@ int CrossHairWeapon (void) break; } + i *= 0.75; + if (cl.perks & 64) i *= 0.65; @@ -1278,95 +1251,60 @@ int CrossHairMaxSpread (void) { case W_COLT: case W_BIATCH: - i = 30; - break; - case W_KAR: - case W_ARMAGEDDON: - i = 75; - break; + case W_STG: + case W_SPATZ: + case W_MP40: + case W_AFTERBURNER: case W_THOMPSON: case W_GIBS: - i = 25; - break; - case W_357: - case W_KILLU: - i = 20; - break; case W_BAR: case W_WIDOW: - i = 35; - break; + case W_357: + case W_KILLU: case W_BROWNING: case W_ACCELERATOR: + case W_FG: + case W_IMPELLER: + case W_MP5: + case W_KOLLIDER: + case W_MG: + case W_BARRACUDA: + case W_PPSH: + case W_REAPER: + case W_RAY: + case W_PORTER: + case W_TYPE: + case W_SAMURAI: + i = 48; + break; + case W_PTRS: + case W_PENETRATOR: + case W_KAR_SCOPE: + case W_HEADCRACKER: + case W_KAR: + case W_ARMAGEDDON: + case W_SPRING: + case W_PULVERIZER: + i = 75; + break; + case W_SAWNOFF: + case W_SNUFF: i = 50; break; case W_DB: case W_BORE: - i = 25; - break; - case W_FG: - case W_IMPELLER: - i = 40; - break; + case W_TRENCH: + case W_GUT: case W_GEWEHR: case W_COMPRESSOR: - i = 35; - break; - case W_KAR_SCOPE: - case W_HEADCRACKER: - i = 75; - break; case W_M1: case W_M1000: - i = 35; - break; case W_M1A1: case W_WIDDER: i = 35; break; - case W_MP40: - case W_AFTERBURNER: - i = 25; - break; - case W_MG: - case W_BARRACUDA: - i = 50; - break; case W_PANZER: case W_LONGINUS: - i = 0; - break; - case W_PPSH: - case W_REAPER: - i = 25; - break; - case W_PTRS: - case W_PENETRATOR: - i = 75; - break; - case W_RAY: - case W_PORTER: - i = 20; - break; - case W_SAWNOFF: - case W_SNUFF: - i = 30; - break; - case W_STG: - case W_SPATZ: - i = 35; - break; - case W_TRENCH: - case W_GUT: - i = 25; - break; - case W_TYPE: - case W_SAMURAI: - i = 25; - break; - case W_MP5: - i = 25; - break; case W_TESLA: i = 0; break; @@ -1375,6 +1313,8 @@ int CrossHairMaxSpread (void) break; } + i *= 0.75; + if (cl.perks & 64) i *= 0.65; diff --git a/source/psp/video_hardware_screen.cpp b/source/psp/video_hardware_screen.cpp index 987e2e8..c84ea69 100644 --- a/source/psp/video_hardware_screen.cpp +++ b/source/psp/video_hardware_screen.cpp @@ -1321,6 +1321,8 @@ int GetWeaponZoomAmmount (void) case W_COLT: return 10; break; + case W_SPRING: + case W_PULVERIZER: case W_KAR: case W_ARMAGEDDON: return 25; diff --git a/source/quakedef.h b/source/quakedef.h index c46e051..59d117a 100644 --- a/source/quakedef.h +++ b/source/quakedef.h @@ -185,6 +185,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define W_TESLA 56 #define W_DG3 57 //tesla +#define W_SPRING 58 +#define W_PULVERIZER 59 + #define W_NOWEP 420 //===========================================