Merge remote-tracking branch 'origin/master' into yet-fewer-bot-maintenance

This commit is contained in:
AJ Martinez 2024-03-13 05:46:42 -07:00
commit af6cf15537
8 changed files with 71 additions and 28 deletions

View file

@ -1548,8 +1548,9 @@ skippedghosttic:
if (*g->p == DEMOMARKER)
{
g->mo->momx = g->mo->momy = g->mo->momz = 0;
#if 1 // freeze frame (maybe more useful for time attackers)
#if 0 // freeze frame (maybe more useful for time attackers) (2024-03-11: you leave it behind anyway!)
g->mo->colorized = true;
g->mo->fuse = 10*TICRATE;
if (follow)
follow->colorized = true;
#else // dissapearing act

View file

@ -22,6 +22,11 @@
extern "C" consvar_t cv_devmode_screen;
static bool race_rules()
{
return gametyperules & GTR_CIRCUIT;
}
#define SWITCHTIME TICRATE * 5 // cooldown between unforced switches
#define BOREDOMTIME 3 * TICRATE / 2 // how long until players considered far apart?
#define TRANSFERTIME TICRATE // how long to delay reaction shots?
@ -86,7 +91,9 @@ struct DirectorInfo
}
// if there's only one player left in the list, just switch to that player
if (playerstat[0].sorted != -1 && playerstat[1].sorted == -1)
if (playerstat[0].sorted != -1 && (playerstat[1].sorted == -1 ||
// TODO: Battle; I just threw this together quick. Focus on leader.
!race_rules()))
{
change(playerstat[0].sorted, false);
return;

View file

@ -4425,10 +4425,9 @@ static void K_drawKartMinimap(void)
demoghost *g = ghosts;
while (g)
{
if (g->mo->skin)
if (g->mo && !P_MobjWasRemoved(g->mo) && g->mo->skin)
{
skin = ((skin_t*)g->mo->skin)-skins;
else
skin = 0;
workingPic = R_CanShowSkinInDemo(skin) ? faceprefix[skin][FACE_MINIMAP] : kp_unknownminimap;
@ -4446,6 +4445,8 @@ static void K_drawKartMinimap(void)
interpy = R_InterpolateFixed(g->mo->old_y, g->mo->y);
K_drawKartMinimapIcon(interpx, interpy, x, y, splitflags, workingPic, colormap);
}
g = g->next;
}
}

View file

@ -547,6 +547,7 @@ typedef enum
playback_view2,
playback_view3,
playback_view4,
playback_director,
playback_freecam,
playback_quit
} playback_e;

View file

@ -509,6 +509,13 @@ static void K_MovePlayerToRespawnPoint(player_t *player)
player->respawn.distanceleft = 0;
}
// Almost all legitimate driving, no matter how clumsy, should be faster than death in TA.
// Advance only as far as we need to prevent respawn loops!
if (modeattacking)
{
player->respawn.distanceleft = 0;
}
player->respawn.wp = player->respawn.wp->nextwaypoints[nwp];
K_RespawnAtWaypoint(player, player->respawn.wp);

View file

@ -10,9 +10,22 @@
#include "../../d_main.h" // D_StartTitle
#include "../../k_credits.h"
#include "../../g_demo.h"
#include "../../k_director.h"
static void M_PlaybackTick(void);
// This is barebones, just toggle director on all screens.
static void M_PlaybackToggleDirector(INT32 choice)
{
(void)choice;
UINT8 i;
for (i = 0; i <= r_splitscreen; ++i)
{
K_ToggleDirector(i, !K_DirectorIsEnabled(i));
}
}
menuitem_t PAUSE_PlaybackMenu[] =
{
{IT_CALL | IT_STRING, "Hide Menu", NULL, "M_PHIDE", {.routine = M_SelectableClearMenus}, 0, 0},
@ -30,8 +43,9 @@ menuitem_t PAUSE_PlaybackMenu[] =
{IT_ARROWS | IT_STRING, "Viewpoint 3", NULL, "M_PNVIEW", {.routine = M_PlaybackAdjustView}, 120, 0},
{IT_ARROWS | IT_STRING, "Viewpoint 4", NULL, "M_PNVIEW", {.routine = M_PlaybackAdjustView}, 136, 0},
{IT_CALL | IT_STRING, "Toggle Free Camera", NULL, "M_PVIEWS", {.routine = M_PlaybackToggleFreecam}, 156, 0},
{IT_CALL | IT_STRING, "Stop Playback", NULL, "M_PEXIT", {.routine = M_PlaybackQuit}, 172, 0},
{IT_CALL | IT_STRING, "Toggle Director", NULL, "UN_IC11A", {.routine = M_PlaybackToggleDirector}, 156, 0},
{IT_CALL | IT_STRING, "Toggle Free Camera", NULL, "M_PVIEWS", {.routine = M_PlaybackToggleFreecam}, 172, 0},
{IT_CALL | IT_STRING, "Stop Playback", NULL, "M_PEXIT", {.routine = M_PlaybackQuit}, 188, 0},
};
menu_t PAUSE_PlaybackMenuDef = {
@ -39,7 +53,7 @@ menu_t PAUSE_PlaybackMenuDef = {
NULL,
0,
PAUSE_PlaybackMenu,
BASEVIDWIDTH/2 - 88, 2,
BASEVIDWIDTH/2 - 96, 2,
0, 0,
MBF_UD_LR_FLIPPED,
NULL,
@ -155,7 +169,7 @@ static void M_PlaybackTick(void)
if (modeattacking)
{
for (i = playback_viewcount; i <= playback_view4; i++)
for (i = playback_viewcount; i <= playback_director; i++)
PAUSE_PlaybackMenu[i].status = IT_DISABLED;
PAUSE_PlaybackMenu[playback_freecam].mvar1 = 72;
@ -166,17 +180,18 @@ static void M_PlaybackTick(void)
else
{
PAUSE_PlaybackMenu[playback_viewcount].status = IT_ARROWS|IT_STRING;
PAUSE_PlaybackMenu[playback_freecam].status = IT_CALL|IT_STRING;
for (i = 0; i <= r_splitscreen; i++)
PAUSE_PlaybackMenu[playback_view1+i].status = IT_ARROWS|IT_STRING;
for (i = r_splitscreen+1; i < 4; i++)
PAUSE_PlaybackMenu[playback_view1+i].status = IT_DISABLED;
PAUSE_PlaybackMenu[playback_freecam].mvar1 = 156;
PAUSE_PlaybackMenu[playback_quit].mvar1 = 172;
PAUSE_PlaybackMenu[playback_freecam].mvar1 = 172;
PAUSE_PlaybackMenu[playback_quit].mvar1 = 188;
//currentMenu->x = BASEVIDWIDTH/2 - 94;
currentMenu->x = BASEVIDWIDTH/2 - 88;
currentMenu->x = BASEVIDWIDTH/2 - 96;
}
}

View file

@ -2571,7 +2571,7 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source,
return false;
}
if (modeattacking)
if (modeattacking & ATTACKING_SPB)
{
// Death in SPB Attack is an instant loss.
P_DoPlayerExit(player, PF_NOCONTEST);

View file

@ -3304,10 +3304,21 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (turn > turnspeed)
{
// TODO: this code let the panning angle flip
// depending on your camera angle when entering
// the loop.
// It caused just about every loop to look weird
// sometimes, since the camera could move
// differently than configured.
// I don't know if this behavior should ever come
// back, but in case it should, I'm leaving this
// comment here.
#if 0
if (turn < ANGLE_90)
{
turnspeed = -(turnspeed);
}
#endif
focusangle += turnspeed;
}
@ -3462,7 +3473,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
y = mo->y - FixedMul(FINESINE((angle>>ANGLETOFINESHIFT) & FINEMASK), distxy);
// SRB2Kart: set camera panning
if (camstill || resetcalled || player->playerstate == PST_DEAD)
if (camstill || resetcalled || player->playerstate == PST_DEAD || player->loop.radius)
pan = xpan = ypan = 0;
else
{