This commit is contained in:
Fabian Greffrath 2021-11-26 08:22:24 +01:00
commit c439e0698a
7 changed files with 38 additions and 10 deletions

View File

@ -111,7 +111,7 @@ extern int bfgedition;
#define ORIGWIDTH 320 // [crispy] #define ORIGWIDTH 320 // [crispy]
#define ORIGHEIGHT 200 // [crispy] #define ORIGHEIGHT 200 // [crispy]
#define MAX_SCREENWIDTH (ORIGWIDTH << 2) // [crispy] #define MAX_SCREENWIDTH 1120 // [FG] corresponds to 21:9 in hires mode
#define MAX_SCREENHEIGHT (ORIGHEIGHT << 1) // [crispy] #define MAX_SCREENHEIGHT (ORIGHEIGHT << 1) // [crispy]
// The maximum number of players, multiplayer/networking. // The maximum number of players, multiplayer/networking.

View File

@ -2435,6 +2435,7 @@ static int G_GetWadComplevel(void)
static void G_MBFComp() static void G_MBFComp()
{ {
comp[comp_respawn] = 1; comp[comp_respawn] = 1;
comp[comp_soul] = 1;
comp[comp_ledgeblock] = 0; comp[comp_ledgeblock] = 0;
comp[comp_friendlyspawn] = 1; comp[comp_friendlyspawn] = 1;
comp[comp_voodooscroller] = 1; comp[comp_voodooscroller] = 1;
@ -2451,6 +2452,7 @@ static void G_BoomComp()
comp[comp_zombie] = 1; comp[comp_zombie] = 1;
comp[comp_infcheat] = 1; comp[comp_infcheat] = 1;
comp[comp_respawn] = 1; comp[comp_respawn] = 1;
comp[comp_soul] = 1;
comp[comp_ledgeblock] = 0; comp[comp_ledgeblock] = 0;
comp[comp_friendlyspawn] = 1; comp[comp_friendlyspawn] = 1;
comp[comp_voodooscroller] = 0; comp[comp_voodooscroller] = 0;

View File

@ -1259,9 +1259,16 @@ void I_GetScreenDimensions(void)
{ {
SCREENWIDTH = w * ah / h; SCREENWIDTH = w * ah / h;
// [crispy] make sure SCREENWIDTH is an integer multiple of 4 ... // [crispy] make sure SCREENWIDTH is an integer multiple of 4 ...
SCREENWIDTH = (SCREENWIDTH + (hires ? 0 : 3)) & (int)~3; if (hires)
// [crispy] ... but never exceeds MAXWIDTH (array size!) {
SCREENWIDTH = MIN(SCREENWIDTH, MAX_SCREENWIDTH); SCREENWIDTH = ((2 * SCREENWIDTH) & (int)~3) / 2;
}
else
{
SCREENWIDTH = (SCREENWIDTH + 3) & (int)~3;
}
// [crispy] ... but never exceeds MAX_SCREENWIDTH (array size!)
SCREENWIDTH = MIN(SCREENWIDTH, MAX_SCREENWIDTH / 2);
} }
WIDESCREENDELTA = (SCREENWIDTH - NONWIDEWIDTH) / 2; WIDESCREENDELTA = (SCREENWIDTH - NONWIDEWIDTH) / 2;

View File

@ -3011,7 +3011,7 @@ void A_FindTracer(mobj_t *actor)
fov = FixedToAngle(actor->state->args[0]); fov = FixedToAngle(actor->state->args[0]);
dist = (actor->state->args[1]); dist = (actor->state->args[1]);
actor->tracer = P_RoughTargetSearch(actor, fov, dist); P_SetTarget(&actor->tracer, P_RoughTargetSearch(actor, fov, dist));
} }
// //
@ -3023,7 +3023,7 @@ void A_ClearTracer(mobj_t *actor)
if (!mbf21 || !actor) if (!mbf21 || !actor)
return; return;
actor->tracer = NULL; P_SetTarget(&actor->tracer, NULL);
} }
// //

View File

@ -509,7 +509,7 @@ floater:
// [FG] game version specific differences // [FG] game version specific differences
int correct_lost_soul_bounce = !demo_compatibility || gameversion >= exe_ultimate; int correct_lost_soul_bounce = !demo_compatibility || gameversion >= exe_ultimate;
if (correct_lost_soul_bounce && mo->flags & MF_SKULLFLY) if ((!comp[comp_soul] || correct_lost_soul_bounce) && mo->flags & MF_SKULLFLY)
{ {
mo->momz = -mo->momz; // the skull slammed into something mo->momz = -mo->momz; // the skull slammed into something
} }
@ -567,6 +567,11 @@ floater:
if (mo->z + mo->height > mo->ceilingz) if (mo->z + mo->height > mo->ceilingz)
{ {
// cph 2001/04/15 -
// Lost souls were meant to bounce off of ceilings
if (!comp[comp_soul] && mo->flags & MF_SKULLFLY)
mo->momz = -mo->momz; // the skull slammed into something
// hit the ceiling // hit the ceiling
if (mo->momz > 0) if (mo->momz > 0)
@ -574,7 +579,11 @@ floater:
mo->z = mo->ceilingz - mo->height; mo->z = mo->ceilingz - mo->height;
if (mo->flags & MF_SKULLFLY) // cph 2001/04/15 -
// We might have hit a ceiling but had downward momentum (e.g. ceiling is
// lowering on us), so for old demos we must still do the buggy
// momentum reversal here
if (comp[comp_soul] && mo->flags & MF_SKULLFLY)
mo->momz = -mo->momz; // the skull slammed into something mo->momz = -mo->momz; // the skull slammed into something
if (!((mo->flags ^ MF_MISSILE) & (MF_MISSILE | MF_NOCLIP))) if (!((mo->flags ^ MF_MISSILE) & (MF_MISSILE | MF_NOCLIP)))

View File

@ -674,9 +674,19 @@ void R_InitTextures (void)
for (j=0 ; j<texture->patchcount ; j++, mpatch++, patch++) for (j=0 ; j<texture->patchcount ; j++, mpatch++, patch++)
{ {
short p;
patch->originx = SHORT(mpatch->originx); patch->originx = SHORT(mpatch->originx);
patch->originy = SHORT(mpatch->originy); patch->originy = SHORT(mpatch->originy);
patch->patch = patchlookup[SHORT(mpatch->patch)]; p = SHORT(mpatch->patch);
// [crispy] catch out-of-range patches
if (p >= 0 && p < nummappatches)
{
patch->patch = patchlookup[p];
}
else
{
patch->patch = -1;
}
if (patch->patch == -1) if (patch->patch == -1)
{ // killough 8/8/98 { // killough 8/8/98
printf("\nR_InitTextures: Missing patch %d in texture %.8s", printf("\nR_InitTextures: Missing patch %d in texture %.8s",

View File

@ -75,7 +75,7 @@ void ExtractFileBase(const char *path, char *dest)
if (++length == 9) if (++length == 9)
{ {
// [FG] remove length check // [FG] remove length check
printf ("Filename base of %s >8 chars",path); printf ("Filename base of %s >8 chars\n",path);
break; break;
} }
else else