Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Sep 16, 2024
1 parent 5c2157b commit 7c48973
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Fire from the player’s incinerator and calamity blade is now randomly mirrored and translucent.
* *DOOM Retro’s* higher resolution status bar is now displayed.
* The help screen has been updated to include the incinerator and calamity blade.
* The shadows cast by some monsters have improved in position.
* The positions of shadows cast by some monsters have improved.
* The new monsters no longer bob up and down when in a liquid sector.
* A bug is fixed whereby [Andrew Hulshult’s](https://www.hulshult.com/) *IDKFA* soundtrack wasn’t being played in some maps when [`extras.wad`](https://doomwiki.org/wiki/Extras.wad) was autoloaded.
* Minor improvements have been made to the support of [*Master Levels*](https://doomwiki.org/wiki/Master_Levels_for_Doom_II), [*Ancient Aliens*](https://www.doomworld.com/idgames/levels/doom2/Ports/megawads/aaliens) and [*Back To Saturn X E2: Tower In The Fountain Of Sparks*](https://www.doomworld.com/forum/topic/69960).
Expand Down
6 changes: 0 additions & 6 deletions src/c_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -6125,10 +6125,7 @@ static weapontype_t favoriteweapon(bool total)
}

if (shotsfiredstat < stat_shotsfired_calamityblade)
{
shotsfiredstat = stat_shotsfired_calamityblade;
favorite = wp_calamityblade;
}
}
}
else
Expand All @@ -6149,10 +6146,7 @@ static weapontype_t favoriteweapon(bool total)
}

if (shotsfiredstat < viewplayer->shotsfired_calamityblade)
{
shotsfiredstat = viewplayer->shotsfired_calamityblade;
favorite = wp_calamityblade;
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/p_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -3117,6 +3117,8 @@ void P_SetupLevel(int ep, int map)
int lumpnum;
static int prevlumpnum = -1;

id24compatible = false;

nummappedlines = 0;
totalkills = 0;
totalitems = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/r_sky.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ static void SpreadFire(void)
fireindices[src - FIREWIDTH] = 0;
else
{
const int rand_index = M_Random() & 3;
const int r = M_BigRandom() & 3;

fireindices[src - rand_index + 1 - FIREWIDTH] = index - (rand_index & 1);
fireindices[src - r + 1 - FIREWIDTH] = index - (r & 1);
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/r_skydefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@
==============================================================================
*/

#include "c_console.h"
#include "cJSON/cJSON.h"
#include "m_array.h"
#include "r_defs.h"
#include "r_skydefs.h"
#include "r_state.h"
#include "w_wad.h"

static bool ParseFire(cJSON *json, fire_t *out)
Expand Down Expand Up @@ -138,12 +141,14 @@ skydefs_t *R_ParseSkyDefs(void)
cJSON *js_flatmap = NULL;
skydefs_t *out;

if (lumpnum < 0)
if (lumpnum == -1)
return NULL;

if (!((json = cJSON_Parse(W_CacheLumpNum(lumpnum)))))
{
cJSON_Delete(json);
C_Warning(1, "The " BOLD("SKYDEFS") " lump in " BOLD("%s") " couldn't be parsed.",
leafname(lumpinfo[lumpnum]->wadfile->path));
return NULL;
}

Expand Down Expand Up @@ -175,5 +180,6 @@ skydefs_t *R_ParseSkyDefs(void)
}

cJSON_Delete(json);
id24compatible = true;
return out;
}

0 comments on commit 7c48973

Please sign in to comment.