Time Attack respawn button: Specify hold behaviour

Now that TA wipes are their intended length, holding Respawn during Time Attack for more than a single frame repeatedly restarts the run. This is not ideal, and frankly wasteful of CPU. Here is the specified replacement for this case:
- Holding gc_respawn will hold on a black(/white) screen before mapload.
    - Allows for taking a conscious breather (or opportunity to curse) in the middle of long Time Attack sessions.
- Ticcmdbuilder will not interpret gc_respawn into BT_ constants in Time Attack contexts at all.
    - Fixes the occasionally visible E-Brake when coming out of this breather state.
This commit is contained in:
toaster 2025-05-31 15:03:46 +01:00
parent 71e1179030
commit 57cdb4fcb5
3 changed files with 37 additions and 2 deletions

View file

@ -404,7 +404,10 @@ class TiccmdBuilder
map(gc_item, BT_ATTACK); // fire
map(gc_lookback, BT_LOOKBACK); // rear view
map(gc_respawn, BT_RESPAWN | (freecam() ? 0 : BT_EBRAKEMASK)); // respawn
if (!modeattacking)
{
map(gc_respawn, BT_RESPAWN | (freecam() ? 0 : BT_EBRAKEMASK)); // respawn
}
map(gc_vote, BT_VOTE); // mp general function button
// lua buttons a thru c

View file

@ -466,7 +466,7 @@ boolean M_Responder(event_t *ev)
if (Playing() && !demo.playback)
{
// Quick Retry (Y in modeattacking)
if (modeattacking && G_PlayerInputDown(0, gc_y, splitscreen + 1) == true)
if (modeattacking && G_PlayerInputDown(0, gc_respawn, splitscreen + 1) == true)
{
M_TryAgain(0);
return true;

View file

@ -8681,6 +8681,38 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
}
F_RunWipe(wipetype, wipedefs[wipetype], false, ((levelfadecol == 0) ? "FADEMAP1" : "FADEMAP0"), false, false);
// Hold respawn to keep waiting until you're ready
if (G_IsModeAttackRetrying() && !demo.playback)
{
nowtime = lastwipetic;
while (G_PlayerInputDown(0, gc_respawn, splitscreen + 1) == true)
{
while (!((nowtime = I_GetTime()) - lastwipetic))
{
I_Sleep(cv_sleep.value);
I_UpdateTime();
} \
I_OsPolling();
G_ResetAllDeviceResponding();
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
{
HandleGamepadDeviceEvents(&events[eventtail]);
G_MapEventsToControls(&events[eventtail]);
}
lastwipetic = nowtime;
if (moviemode && rendermode == render_opengl)
M_LegacySaveFrame();
else if (moviemode && rendermode == render_soft)
I_CaptureVideoFrame();
NetKeepAlive();
}
//wipestyleflags |= (WSF_FADEOUT|WSF_TOWHITE);
}
}
}