From ff1d51b4fe22e18c05cb15535904e4256cbaec88 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 11 Oct 2022 17:32:16 +1100 Subject: [PATCH] - Fix 4x horiz negation issues. --- source/games/duke/src/player_d.cpp | 2 +- source/games/duke/src/render.cpp | 2 +- source/games/sw/src/weapon.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 2b891b7e0..3bdf5bf72 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -2048,7 +2048,7 @@ int operateTripbomb(int snum) auto p = &ps[snum]; HitInfo hit{}; - hitscan(p->pos, p->cursector, DVector3(p->angle.ang.ToVector() * 1024, -p->horizon.sum().Tan() * 16.), hit, CLIPMASK1); + hitscan(p->pos, p->cursector, DVector3(p->angle.ang.ToVector() * 1024, p->horizon.sum().Tan() * 16.), hit, CLIPMASK1); if (hit.hitSector == nullptr || hit.actor()) return 0; diff --git a/source/games/duke/src/render.cpp b/source/games/duke/src/render.cpp index 4743d30b1..464b6ae88 100644 --- a/source/games/duke/src/render.cpp +++ b/source/games/duke/src/render.cpp @@ -89,7 +89,7 @@ void GameInterface::UpdateCameras(double smoothratio) display_mirror = 1; // should really be 'display external view'. auto cstat = camera->spr.cstat; camera->spr.cstat = CSTAT_SPRITE_INVISIBLE; - render_camtex(camera, camera->spr.pos, camera->sector(), camera->interpolatedangle(smoothratio), maphoriz(camera->spr.shade), nullAngle, tex, rect, smoothratio); + render_camtex(camera, camera->spr.pos, camera->sector(), camera->interpolatedangle(smoothratio), maphoriz(-camera->spr.shade), nullAngle, tex, rect, smoothratio); camera->spr.cstat = cstat; display_mirror = 0; }); diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index e0bf658b6..83a42df0a 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -15390,7 +15390,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, DAngle horiz) // Inserting and setting up variables auto actorNew = SpawnActor(STAT_MISSILE, 0, s_Tracer, actor->sector(), - actor->spr.pos.plusZ(-horiz.Tan() * 36.), actor->spr.angle, TRACER_VELOCITY); + actor->spr.pos.plusZ(horiz.Tan() * 36.), actor->spr.angle, TRACER_VELOCITY); actorNew->spr.hitag = LUMINOUS; //Always full brightness if (Operator!= nullptr)