From dadb150b2544f33cfa11dc019f311816d007e128 Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 9 Oct 2023 18:50:05 -0700 Subject: [PATCH] Freecam: use Y button to focus player --- src/g_build_ticcmd.cpp | 2 +- src/p_user.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/g_build_ticcmd.cpp b/src/g_build_ticcmd.cpp index 72dbe83f4..7f41eb865 100644 --- a/src/g_build_ticcmd.cpp +++ b/src/g_build_ticcmd.cpp @@ -389,7 +389,7 @@ class TiccmdBuilder map(gc_item, BT_ATTACK); // fire map(gc_lookback, BT_LOOKBACK); // rear view - map(gc_respawn, BT_RESPAWN | BT_EBRAKEMASK); // respawn + map(gc_respawn, BT_RESPAWN | (freecam() ? 0 : BT_EBRAKEMASK)); // respawn map(gc_vote, BT_VOTE); // mp general function button // lua buttons a thru c diff --git a/src/p_user.c b/src/p_user.c index 2b0e03e9f..ed8f1a215 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2934,8 +2934,8 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num) cam->button_a_held--; } - // if you hold item, you will lock on to displayplayer. (The last player you were ""f12-ing"") - if (cam->freecam && cmd->buttons & BT_ATTACK) + // if you hold Y, you will lock on to displayplayer. (The last player you were ""f12-ing"") + if (cam->freecam && cmd->buttons & BT_RESPAWN) { lastp = &players[displayplayers[0]]; // Fun fact, I was trying displayplayers[0]->mo as if it was Lua like an absolute idiot. cam->angle = R_PointToAngle2(cam->x, cam->y, lastp->mo->x, lastp->mo->y);