mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +00:00
Merge branch 'public_next'
This commit is contained in:
commit
149a8bb760
4 changed files with 30 additions and 17 deletions
11
src/m_misc.c
11
src/m_misc.c
|
@ -1057,7 +1057,7 @@ static boolean M_SetupaPNG(png_const_charp filename, png_bytep pal)
|
|||
static inline moviemode_t M_StartMovieAPNG(const char *pathname)
|
||||
{
|
||||
#ifdef USE_APNG
|
||||
UINT8 *palette;
|
||||
UINT8 *palette = NULL;
|
||||
const char *freename = NULL;
|
||||
boolean ret = false;
|
||||
|
||||
|
@ -1073,8 +1073,13 @@ static inline moviemode_t M_StartMovieAPNG(const char *pathname)
|
|||
return MM_OFF;
|
||||
}
|
||||
|
||||
if (rendermode == render_soft) M_CreateScreenShotPalette();
|
||||
ret = M_SetupaPNG(va(pandf,pathname,freename), (palette = screenshot_palette));
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
M_CreateScreenShotPalette();
|
||||
palette = screenshot_palette;
|
||||
}
|
||||
|
||||
ret = M_SetupaPNG(va(pandf,pathname,freename), palette);
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
|
|
|
@ -584,23 +584,28 @@ static pslope_t *P_NewVertexSlope(INT16 tag1, INT16 tag2, INT16 tag3, UINT8 flag
|
|||
//
|
||||
void P_CopySectorSlope(line_t *line)
|
||||
{
|
||||
sector_t *fsec = line->frontsector;
|
||||
int i, special = line->special;
|
||||
sector_t *fsec = line->frontsector;
|
||||
int i, special = line->special;
|
||||
|
||||
// Check for copy linedefs
|
||||
for(i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
|
||||
{
|
||||
sector_t *srcsec = sectors + i;
|
||||
// Check for copy linedefs
|
||||
for (i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
|
||||
{
|
||||
sector_t *srcsec = sectors + i;
|
||||
|
||||
if((special - 719) & 1 && !fsec->f_slope && srcsec->f_slope)
|
||||
fsec->f_slope = srcsec->f_slope; //P_CopySlope(srcsec->f_slope);
|
||||
if((special - 719) & 2 && !fsec->c_slope && srcsec->c_slope)
|
||||
fsec->c_slope = srcsec->c_slope; //P_CopySlope(srcsec->c_slope);
|
||||
}
|
||||
if ((special - 719) & 1 && !fsec->f_slope && srcsec->f_slope)
|
||||
fsec->f_slope = srcsec->f_slope; //P_CopySlope(srcsec->f_slope);
|
||||
if ((special - 719) & 2 && !fsec->c_slope && srcsec->c_slope)
|
||||
fsec->c_slope = srcsec->c_slope; //P_CopySlope(srcsec->c_slope);
|
||||
}
|
||||
|
||||
fsec->hasslope = true;
|
||||
fsec->hasslope = true;
|
||||
|
||||
line->special = 0; // Linedef was use to set slopes, it finished its job, so now make it a normal linedef
|
||||
// if this is an FOF control sector, make sure any target sectors also are marked as having slopes
|
||||
if (fsec->numattached)
|
||||
for (i = 0; i < (int)fsec->numattached; i++)
|
||||
sectors[fsec->attached[i]].hasslope = true;
|
||||
|
||||
line->special = 0; // Linedef was use to set slopes, it finished its job, so now make it a normal linedef
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -5745,6 +5745,10 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, f
|
|||
// Add slopes
|
||||
ffloor->t_slope = &sec2->c_slope;
|
||||
ffloor->b_slope = &sec2->f_slope;
|
||||
// mark the target sector as having slopes, if the FOF has any of its own
|
||||
// (this fixes FOF slopes glitching initially at level load in software mode)
|
||||
if (sec2->hasslope)
|
||||
sec->hasslope = true;
|
||||
#endif
|
||||
|
||||
if ((flags & FF_SOLID) && (master->flags & ML_EFFECT1)) // Block player only
|
||||
|
|
|
@ -347,7 +347,6 @@ static restype_t ResourceFileDetect (const char* filename)
|
|||
static lumpinfo_t* ResGetLumpsStandalone (FILE* handle, UINT16* numlumps, const char* lumpname)
|
||||
{
|
||||
lumpinfo_t* lumpinfo = Z_Calloc(sizeof (*lumpinfo), PU_STATIC, NULL);
|
||||
lumpinfo = Z_Calloc(sizeof (*lumpinfo), PU_STATIC, NULL);
|
||||
lumpinfo->position = 0;
|
||||
fseek(handle, 0, SEEK_END);
|
||||
lumpinfo->size = ftell(handle);
|
||||
|
|
Loading…
Reference in a new issue