Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Nov 30, 2024
1 parent af6cf38 commit 3774e50
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/c_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -4617,6 +4617,9 @@ static void map_func2(char *cmd, char *parms)
C_Output(buffer);
HU_SetPlayerMessage(buffer, false, false);

if (legacyofrust)
mapcmdepisode = 1;

if (P_IsSecret(mapcmdepisode, mapcmdmap))
message_secret = true;
else if (gamemode == commercial)
Expand All @@ -4629,9 +4632,6 @@ static void map_func2(char *cmd, char *parms)
else if (mapcmdmap == 9)
message_secret = true;

if (legacyofrust)
mapcmdepisode = 1;

gameepisode = mapcmdepisode;

if (gamemission == doom)
Expand Down
10 changes: 6 additions & 4 deletions src/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1236,11 +1236,13 @@ mobj_t *P_SpawnMapThing(mapthing_t *mthing, const bool spawnmonsters)
if (type < 0 || (i = P_FindDoomedNum(type)) == nummobjtypes)
{
// [BH] make unknown thing type non-fatal and show console warning instead
char *temp = commify(thingid);
char *temp1 = commify(thingid);
char *temp2 = commify(type);

C_Warning(2, "Thing %s at (%i, %i) wasn't spawned because its type is unknown.",
temp, mthing->x, mthing->y);
free(temp);
C_Warning(2, "Thing %s at (%i, %i) wasn't spawned because it has an unknown type of %s.",
temp1, mthing->x, mthing->y, temp2);
free(temp1);
free(temp2);

return NULL;
}
Expand Down
21 changes: 13 additions & 8 deletions src/r_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,19 @@ static short STEP2;

static bool IsSolidAtSpot(const column_t *column, const int spot)
{
if (column)
while (column->topdelta != 0xFF)
if (spot < column->topdelta)
return false;
else if (spot <= column->topdelta + column->length)
return true;
else
column = (const column_t *)((const byte *)column + 3 + column->length + 1);
if (!column)
return false;

while (column->topdelta != 0xFF)
{
if (spot < column->topdelta)
return false;

if (spot <= column->topdelta + column->length)
return true;

column = (const column_t *)((const byte *)column + 3 + column->length + 1);
}

return false;
}
Expand Down
6 changes: 3 additions & 3 deletions src/st_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,9 @@ bool ST_Responder(const event_t *ev)
C_Output(message);
HU_SetPlayerMessage(message, false, false);

if (legacyofrust)
epsd = 1;

if (P_IsSecret(epsd, map))
message_secret = true;
else if (gamemode == commercial)
Expand All @@ -1049,9 +1052,6 @@ bool ST_Responder(const event_t *ev)
message_secret = true;
}

if (legacyofrust)
epsd = 1;

// [BH] always display message
message_dontfuckwithme = true;

Expand Down

0 comments on commit 3774e50

Please sign in to comment.