From 7c59c9e6ec80e2f1f7be17ff21e49cbc3467d673 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 19 Jul 2024 19:25:05 +0200 Subject: [PATCH] fix ScreenCoords on 2 plyr splitscreen and shearing + remove non 16:10 hack since that issue was fixed elsewhere --- src/k_kart.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index e62b29382..028fec21c 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9202,11 +9202,11 @@ static boolean K_GetScreenCoords(vector2_t *vec, player_t *player, mobj_t *targe offset = FixedMul(FINETANGENT(((aimingangle+ANGLE_90)>>ANGLETOFINESHIFT) & 4095), xres); // this isn't fovtan... what am i even doing anymore if (splitscreen == 1) - offset = 17*offset/10; - // OpenGL with software perspective is miscentered on non-16:10 resolutions + offset = 17*offset/120; #ifdef HWRENDER - if (rendermode == render_opengl) - offset = FixedMul(offset, FixedDiv(104857, FixedDiv(xres, yres))); + // OpenGL with software perspective is miscentered on non-16:10 resolutions + //if (rendermode == render_opengl) + //offset = FixedMul(offset, FixedDiv(104857, FixedDiv(xres, yres))); #endif // thanks fickle offset = FixedDiv(offset, fovratio); @@ -9229,12 +9229,14 @@ static boolean K_GetScreenCoords(vector2_t *vec, player_t *player, mobj_t *targe int splitindex = stplyrnum; // adjust coords for splitscreen - if (splitscreen == 1){ // 2P + if (splitscreen == 1) // 2P + { y = y>>1; if (splitindex) y = y + yres; } - if (splitscreen >= 2) { // 3P or 4P + if (splitscreen >= 2) // 3P or 4P + { x = x>>1; y = y>>1; if (splitindex & 1)