diff --git a/src/f_finale.c b/src/f_finale.c index 4a1267265..fc9849a3f 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1351,6 +1351,8 @@ void F_GameEndTicker(void) // ============== // TITLE SCREEN // ============== +mobj_t *titlemapcameraref = NULL; + void F_StartTitleScreen(void) { if (menumeta[MN_MAIN].musname[0]) @@ -1535,22 +1537,28 @@ void F_TitleScreenTicker(boolean run) mobj_t *mo2; mobj_t *cameraref = NULL; - for (th = thinkercap.next; th != &thinkercap; th = th->next) + // If there's a Line 422 Switch Cut-Away view, don't force us. + if (!titlemapcameraref || titlemapcameraref->type != MT_ALTVIEWMAN) { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker - continue; + for (th = thinkercap.next; th != &thinkercap; th = th->next) + { + if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker + continue; - mo2 = (mobj_t *)th; + mo2 = (mobj_t *)th; - if (!mo2) - continue; + if (!mo2) + continue; - if (mo2->type != MT_ALTVIEWMAN) - continue; + if (mo2->type != MT_ALTVIEWMAN) + continue; - cameraref = mo2; - break; + cameraref = titlemapcameraref = mo2; + break; + } } + else + cameraref = titlemapcameraref; if (cameraref) { diff --git a/src/f_finale.h b/src/f_finale.h index 3a9ad2091..c1cc49ec4 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -80,6 +80,7 @@ typedef enum } titlemap_enum; extern UINT8 titlemapinaction; +extern mobj_t *titlemapcameraref; // // WIPE diff --git a/src/p_spec.c b/src/p_spec.c index abd11361b..b2e2f0865 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2591,7 +2591,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) case 413: // Change music // console player only unless NOCLIMB is set - if ((line->flags & ML_NOCLIMB) || (mo && mo->player && P_IsLocalPlayer(mo->player))) + if ((line->flags & ML_NOCLIMB) || (mo && mo->player && P_IsLocalPlayer(mo->player)) || titlemapinaction) { UINT16 tracknum = (UINT16)sides[line->sidenum[0]].bottomtexture; @@ -2890,7 +2890,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) { mobj_t *altview; - if (!mo || !mo->player) // only players have views + if ((!mo || !mo->player) && !titlemapinaction) // only players have views, and title screens return; if ((secnum = P_FindSectorFromLineTag(line, -1)) < 0) @@ -2900,6 +2900,14 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) if (!altview) return; + // If titlemap, set the camera ref for title's thinker + // This is not revoked until overwritten; awayviewtics is ignored + if (titlemapinaction) + { + titlemapcameraref = altview; + return; + } + P_SetTarget(&mo->player->awayviewmobj, altview); mo->player->awayviewtics = P_AproxDistance(line->dx, line->dy)>>FRACBITS;