Merge branch 'next' into SRB2-lavafall-crash-avoidance

This commit is contained in:
Lactozilla 2024-11-24 13:40:52 -03:00
commit d6b6ed5bc1
5 changed files with 17 additions and 23 deletions

View file

@ -5605,7 +5605,7 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
// Can't have palette rendering if shaders are disabled. // Can't have palette rendering if shaders are disabled.
boolean HWR_ShouldUsePaletteRendering(void) boolean HWR_ShouldUsePaletteRendering(void)
{ {
return (cv_glpaletterendering.value && HWR_UseShader()); return (pMasterPalette != NULL && cv_glpaletterendering.value && HWR_UseShader());
} }
// enable or disable palette rendering state depending on settings and availability // enable or disable palette rendering state depending on settings and availability
@ -5722,7 +5722,7 @@ consvar_t cv_glbatching = CVAR_INIT ("gr_batching", "On", 0, CV_OnOff, NULL);
static CV_PossibleValue_t glpalettedepth_cons_t[] = {{16, "16 bits"}, {24, "24 bits"}, {0, NULL}}; static CV_PossibleValue_t glpalettedepth_cons_t[] = {{16, "16 bits"}, {24, "24 bits"}, {0, NULL}};
consvar_t cv_glpaletterendering = CVAR_INIT ("gr_paletterendering", "Off", CV_SAVE|CV_CALL, CV_OnOff, CV_glpaletterendering_OnChange); consvar_t cv_glpaletterendering = CVAR_INIT ("gr_paletterendering", "On", CV_SAVE|CV_CALL, CV_OnOff, CV_glpaletterendering_OnChange);
consvar_t cv_glpalettedepth = CVAR_INIT ("gr_palettedepth", "16 bits", CV_SAVE|CV_CALL, glpalettedepth_cons_t, CV_glpalettedepth_OnChange); consvar_t cv_glpalettedepth = CVAR_INIT ("gr_palettedepth", "16 bits", CV_SAVE|CV_CALL, glpalettedepth_cons_t, CV_glpalettedepth_OnChange);
#define ONLY_IF_GL_LOADED if (vid.glstate != VID_GL_LIBRARY_LOADED) return; #define ONLY_IF_GL_LOADED if (vid.glstate != VID_GL_LIBRARY_LOADED) return;

View file

@ -1784,8 +1784,8 @@ state_t states[NUMSTATES] =
{SPR_RING, FF_ANIMATE|FF_GLOBALANIM, -1, {NULL}, 23, 1, S_RING, 0}, // S_RING {SPR_RING, FF_ANIMATE|FF_GLOBALANIM, -1, {NULL}, 23, 1, S_RING, 0}, // S_RING
// Blue Sphere for special stages // Blue Sphere for special stages
{SPR_SPHR, FF_FULLBRIGHT, -1, {NULL}, 0, 0, S_NULL, 0}, // S_BLUESPHERE {SPR_SPHR, FF_SEMIBRIGHT, -1, {NULL}, 0, 0, S_NULL, 0}, // S_BLUESPHERE
{SPR_SPHR, FF_FULLBRIGHT {SPR_SPHR, FF_SEMIBRIGHT
#ifdef MANIASPHERES #ifdef MANIASPHERES
|FF_ANIMATE|FF_RANDOMANIM |FF_ANIMATE|FF_RANDOMANIM
#endif #endif
@ -1794,13 +1794,13 @@ state_t states[NUMSTATES] =
// Bomb Sphere // Bomb Sphere
{SPR_SPHR, FF_FULLBRIGHT|3, 2, {NULL}, 0, 0, S_BOMBSPHERE2, 0}, // S_BOMBSPHERE1 {SPR_SPHR, FF_FULLBRIGHT|3, 2, {NULL}, 0, 0, S_BOMBSPHERE2, 0}, // S_BOMBSPHERE1
{SPR_SPHR, FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_BOMBSPHERE3, 0}, // S_BOMBSPHERE2 {SPR_SPHR, FF_SEMIBRIGHT|4, 1, {NULL}, 0, 0, S_BOMBSPHERE3, 0}, // S_BOMBSPHERE2
{SPR_SPHR, FF_FULLBRIGHT|5, 2, {NULL}, 0, 0, S_BOMBSPHERE4, 0}, // S_BOMBSPHERE3 {SPR_SPHR, FF_SEMIBRIGHT|5, 2, {NULL}, 0, 0, S_BOMBSPHERE4, 0}, // S_BOMBSPHERE3
{SPR_SPHR, FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_BOMBSPHERE1, 0}, // S_BOMBSPHERE4 {SPR_SPHR, FF_SEMIBRIGHT|4, 1, {NULL}, 0, 0, S_BOMBSPHERE1, 0}, // S_BOMBSPHERE4
// NiGHTS Chip // NiGHTS Chip
{SPR_NCHP, FF_FULLBRIGHT|FF_ANIMATE, -1, {NULL}, 15, 2, S_NULL, 0}, // S_NIGHTSCHIP {SPR_NCHP, FF_SEMIBRIGHT|FF_ANIMATE, -1, {NULL}, 15, 2, S_NULL, 0}, // S_NIGHTSCHIP
{SPR_NCHP, FF_FULLBRIGHT|FF_ANIMATE|16, -1, {NULL}, 15, 2, S_NULL, 0}, // S_NIGHTSCHIPBONUS {SPR_NCHP, FF_SEMIBRIGHT|FF_ANIMATE|16, -1, {NULL}, 15, 2, S_NULL, 0}, // S_NIGHTSCHIPBONUS
// NiGHTS Star // NiGHTS Star
{SPR_NSTR, FF_ANIMATE, -1, {NULL}, 14, 2, S_NULL, 0}, // S_NIGHTSSTAR {SPR_NSTR, FF_ANIMATE, -1, {NULL}, 14, 2, S_NULL, 0}, // S_NIGHTSSTAR
@ -1858,9 +1858,9 @@ state_t states[NUMSTATES] =
{SPR_CEMG, FF_FULLBRIGHT|6, -1, {NULL}, 0, 0, S_NULL, 0}, // S_CEMG7 {SPR_CEMG, FF_FULLBRIGHT|6, -1, {NULL}, 0, 0, S_NULL, 0}, // S_CEMG7
// Emerald hunt shards // Emerald hunt shards
{SPR_SHRD, 0, -1, {NULL}, 0, 0, S_NULL, 0}, // S_SHRD1 {SPR_SHRD, FF_SEMIBRIGHT, -1, {NULL}, 0, 0, S_NULL, 0}, // S_SHRD1
{SPR_SHRD, 1, -1, {NULL}, 0, 0, S_NULL, 0}, // S_SHRD2 {SPR_SHRD, FF_SEMIBRIGHT|1, -1, {NULL}, 0, 0, S_NULL, 0}, // S_SHRD2
{SPR_SHRD, 2, -1, {NULL}, 0, 0, S_NULL, 0}, // S_SHRD3 {SPR_SHRD, FF_SEMIBRIGHT|2, -1, {NULL}, 0, 0, S_NULL, 0}, // S_SHRD3
// Bubble Source // Bubble Source
{SPR_BBLS, 0, 8, {A_BubbleSpawn}, 2048, 0, S_BUBBLES2, 0}, // S_BUBBLES1 {SPR_BBLS, 0, 8, {A_BubbleSpawn}, 2048, 0, S_BUBBLES2, 0}, // S_BUBBLES1

View file

@ -1152,11 +1152,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port)
// test ip address of server // test ip address of server
for (i = 0; i < mysocketses; ++i) for (i = 0; i < mysocketses; ++i)
{ {
/* sendto tests that there is a network to this if (runp->ai_addr->sa_family == myfamily[i])
address */
if (runp->ai_addr->sa_family == myfamily[i] &&
sendto(mysockets[i], NULL, 0, 0,
runp->ai_addr, runp->ai_addrlen) == 0)
{ {
memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen); memcpy(&clientaddress[newnode], runp->ai_addr, runp->ai_addrlen);
break; break;

View file

@ -2995,7 +2995,7 @@ static void P_LoadTextmap(void)
side_t *sd; side_t *sd;
mapthing_t *mt; mapthing_t *mt;
CONS_Alert(CONS_NOTICE, "UDMF support is still a work-in-progress; its specs and features are prone to change until it is fully implemented.\n"); //CONS_Alert(CONS_NOTICE, "UDMF support is still a work-in-progress; its specs and features are prone to change until it is fully implemented.\n");
/// Given the UDMF specs, some fields are given a default value. /// Given the UDMF specs, some fields are given a default value.
/// If an element's field has a default value set, it is omitted /// If an element's field has a default value set, it is omitted

View file

@ -307,12 +307,10 @@ static void W_LoadDehackedLumps(UINT16 wadnum, boolean mainfile)
* \param resblock resulting MD5 checksum * \param resblock resulting MD5 checksum
* \return 0 if MD5 checksum was made, and is at resblock, 1 if error was found * \return 0 if MD5 checksum was made, and is at resblock, 1 if error was found
*/ */
#ifndef NOMD5
static INT32 W_MakeFileMD5(const char *filename, void *resblock) static INT32 W_MakeFileMD5(const char *filename, void *resblock)
{ {
#ifdef NOMD5
(void)filename;
memset(resblock, 0x00, 16);
#else
FILE *fhandle; FILE *fhandle;
if ((fhandle = fopen(filename, "rb")) != NULL) if ((fhandle = fopen(filename, "rb")) != NULL)
@ -329,9 +327,9 @@ static INT32 W_MakeFileMD5(const char *filename, void *resblock)
fclose(fhandle); fclose(fhandle);
return 0; return 0;
} }
#endif
return 1; return 1;
} }
#endif
// Invalidates the cache of lump numbers. Call this whenever a wad is added. // Invalidates the cache of lump numbers. Call this whenever a wad is added.
static void W_InvalidateLumpnumCache(void) static void W_InvalidateLumpnumCache(void)