Merge branch 'next' into public_next

This commit is contained in:
spherallic 2023-05-04 15:46:02 +02:00
commit f1147618d0
8 changed files with 50 additions and 15 deletions

View file

@ -337,7 +337,7 @@ static tic_t introscenetime[NUMINTROSCENES] =
};
// custom intros
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer);
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer, boolean FLS);
void F_StartIntro(void)
{
@ -349,7 +349,7 @@ void F_StartIntro(void)
if (!cutscenes[introtoplay - 1])
D_StartTitle();
else
F_StartCustomCutscene(introtoplay - 1, false, false);
F_StartCustomCutscene(introtoplay - 1, false, false, false);
return;
}
@ -1257,7 +1257,7 @@ void F_StartCredits(void)
if (creditscutscene)
{
F_StartCustomCutscene(creditscutscene - 1, false, false);
F_StartCustomCutscene(creditscutscene - 1, false, false, false);
return;
}
@ -3859,7 +3859,7 @@ static INT32 scenenum, cutnum;
static INT32 picxpos, picypos, picnum, pictime, picmode, numpics, pictoloop;
static INT32 textxpos, textypos;
static boolean cutsceneover = false;
static boolean runningprecutscene = false, precutresetplayer = false;
static boolean runningprecutscene = false, precutresetplayer = false, precutFLS = false;
static void F_AdvanceToNextScene(void)
{
@ -3928,7 +3928,7 @@ void F_EndCutScene(void)
if (runningprecutscene)
{
if (server)
D_MapChange(gamemap, gametype, ultimatemode, precutresetplayer, 0, true, false);
D_MapChange(gamemap, gametype, ultimatemode, precutresetplayer, 0, true, precutFLS);
}
else
{
@ -3943,7 +3943,7 @@ void F_EndCutScene(void)
}
}
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer)
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer, boolean FLS)
{
if (!cutscenes[cutscenenum])
return;
@ -3962,6 +3962,7 @@ void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean reset
cutsceneover = false;
runningprecutscene = precutscene;
precutresetplayer = resetplayer;
precutFLS = FLS;
scenenum = picnum = 0;
cutnum = cutscenenum;

View file

@ -52,7 +52,7 @@ void F_EndingDrawer(void);
void F_CreditTicker(void);
void F_CreditDrawer(void);
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer);
void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean resetplayer, boolean FLS);
void F_CutsceneDrawer(void);
void F_EndCutScene(void);

View file

@ -411,8 +411,8 @@ consvar_t cv_cam_lockonboss[2] = {
consvar_t cv_moveaxis = CVAR_INIT ("joyaxis_move", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_sideaxis = CVAR_INIT ("joyaxis_side", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_lookaxis = CVAR_INIT ("joyaxis_look", "Y-Rudder-", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_turnaxis = CVAR_INIT ("joyaxis_turn", "X-Rudder", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_lookaxis = CVAR_INIT ("joyaxis_look", "X-Rudder-", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_turnaxis = CVAR_INIT ("joyaxis_turn", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_jumpaxis = CVAR_INIT ("joyaxis_jump", "None", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_spinaxis = CVAR_INIT ("joyaxis_spin", "None", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_fireaxis = CVAR_INIT ("joyaxis_fire", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL);
@ -422,8 +422,8 @@ consvar_t cv_digitaldeadzone = CVAR_INIT ("joy_digdeadzone", "0.25", CV_FLOAT|CV
consvar_t cv_moveaxis2 = CVAR_INIT ("joyaxis2_move", "Y-Axis", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_sideaxis2 = CVAR_INIT ("joyaxis2_side", "X-Axis", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_lookaxis2 = CVAR_INIT ("joyaxis2_look", "Y-Rudder-", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_turnaxis2 = CVAR_INIT ("joyaxis2_turn", "X-Rudder", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_lookaxis2 = CVAR_INIT ("joyaxis2_look", "X-Rudder-", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_turnaxis2 = CVAR_INIT ("joyaxis2_turn", "Z-Axis", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_jumpaxis2 = CVAR_INIT ("joyaxis2_jump", "None", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_spinaxis2 = CVAR_INIT ("joyaxis2_spin", "None", CV_SAVE, joyaxis_cons_t, NULL);
consvar_t cv_fireaxis2 = CVAR_INIT ("joyaxis2_fire", "Z-Rudder", CV_SAVE, joyaxis_cons_t, NULL);
@ -4108,7 +4108,7 @@ void G_AfterIntermission(void)
&& stagefailed == false)
{
// Start a custom cutscene.
F_StartCustomCutscene(mapheaderinfo[gamemap-1]->cutscenenum-1, false, false);
F_StartCustomCutscene(mapheaderinfo[gamemap-1]->cutscenenum-1, false, false, false);
}
else
{
@ -4958,7 +4958,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
imcontinuing = false;
if ((gametyperules & GTR_CUTSCENES) && !skipprecutscene && mapheaderinfo[gamemap-1]->precutscenenum && !modeattacking && !(marathonmode & MA_NOCUTSCENES)) // Start a custom cutscene.
F_StartCustomCutscene(mapheaderinfo[gamemap-1]->precutscenenum-1, true, resetplayer);
F_StartCustomCutscene(mapheaderinfo[gamemap-1]->precutscenenum-1, true, resetplayer, FLS);
else
G_DoLoadLevel(resetplayer);

View file

@ -1589,6 +1589,10 @@ void A_PointyThink(mobj_t *actor)
if (!actor->tracer) // For some reason we do not have spike balls...
return;
// Catch case where actor lastlook is -1 (which segfaults the following blocks)
if (actor->lastlook < 0)
return;
// Position spike balls relative to the value of 'lastlook'.
ball = actor->tracer;

View file

@ -3546,6 +3546,8 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
UINT8 shouldForce = LUA_HookShouldDamage(target, inflictor, source, damage, damagetype);
if (P_MobjWasRemoved(target))
return (shouldForce == 1); // mobj was removed
if (P_MobjWasRemoved(source))
source = NULL;
if (shouldForce == 1)
force = true;
else if (shouldForce == 2)
@ -3763,6 +3765,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
else
P_SetMobjState(target, target->info->painstate);
if (P_MobjWasRemoved(target))
return false;
if (target->type == MT_HIVEELEMENTAL)
target->extravalue1 += 3;

View file

@ -420,7 +420,20 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object)
P_SetPlayerMobjState(object, S_PLAY_ROLL);
}
else
pflags = object->player->pflags & (PF_STARTJUMP|PF_JUMPED|PF_NOJUMPDAMAGE|PF_SPINNING|PF_THOKKED|PF_BOUNCING); // I still need these.
{
boolean wasSpindashing = object->player->dashspeed > 0 && (object->player->charability2 == CA2_SPINDASH);
pflags = object->player->pflags & (PF_STARTJUMP | PF_JUMPED | PF_NOJUMPDAMAGE | PF_SPINNING | PF_THOKKED | PF_BOUNCING); // I still need these.
if (wasSpindashing) // Ensure we're in the rolling state, and not spindash.
P_SetPlayerMobjState(object, S_PLAY_ROLL);
if (object->player->charability == CA_GLIDEANDCLIMB && object->player->skidtime && (pflags & PF_JUMPED))
{
object->player->skidtime = 0; // No skidding should be happening, either.
pflags &= ~PF_JUMPED;
}
}
secondjump = object->player->secondjump;
washoming = object->player->homing;
P_ResetPlayer(object->player);

View file

@ -6904,6 +6904,13 @@ static void P_AddOverlay(mobj_t *thing)
static void P_RemoveOverlay(mobj_t *thing)
{
mobj_t *mo;
if (overlaycap == thing)
{
P_SetTarget(&overlaycap, thing->hnext);
P_SetTarget(&thing->hnext, NULL);
return;
}
for (mo = overlaycap; mo; mo = mo->hnext)
{
if (mo->hnext != thing)

View file

@ -1133,7 +1133,12 @@ void Y_Ticker(void)
}
// emerald bounce
if (intertic <= 1)
if (dedicated || !LUA_HudEnabled(hud_intermissionemeralds))
{
// dedicated servers don't need this, especially since it crashes when stagefailed
// also skip this if Lua disabled intermission emeralds, so it doesn't play sounds
}
else if (intertic <= 1)
{
data.spec.emeraldbounces = 0;
data.spec.emeraldmomy = 20;