diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index da06535274..98860716b9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,7 +44,7 @@ set( MINOR_VERSIONS "50" "49" "48" "47" "46" "45" "44" "43" "42" "41" "27" "26" "25" "24" "23" "22" "21" "20" "21" "19" "18" "17" "16" "15" "14" "13" "12" "11" "10" "09" "08" "07" "06" "05" "04" "03" "02" "01" "00" ) -set( MAJOR_VERSIONS "30" "28" "26" "24" "22" "20" ) +set( MAJOR_VERSIONS "34" "28" "26" "24" "22" "20" ) set( FMOD_DIR_VERSIONS ${FMOD_DIR_VERSIONS} "../fmod" ) foreach( majver ${MAJOR_VERSIONS} ) foreach( minver ${MINOR_VERSIONS} ) diff --git a/src/am_map.cpp b/src/am_map.cpp index a6b03446fe..ec7e998599 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1670,6 +1670,7 @@ void AM_drawSubsectors() // (Make the comparison in floating point to avoid overflows and improve performance.) double secx; double secy; + double seczb, seczt; double cmpz = FIXED2DBL(viewz); if (players[consoleplayer].camera && sec == players[consoleplayer].camera->Sector) @@ -1683,6 +1684,8 @@ void AM_drawSubsectors() secx = FIXED2DBL(sec->soundorg[0]); secy = FIXED2DBL(sec->soundorg[1]); } + seczb = floorplane->ZatPoint(secx, secy); + seczt = sec->ceilingplane.ZatPoint(secx, secy); for (unsigned int i = 0; i < sec->e->XFloor.ffloors.Size(); ++i) { @@ -1690,7 +1693,13 @@ void AM_drawSubsectors() if (!(rover->flags & FF_EXISTS)) continue; if (rover->flags & FF_FOG) continue; if (rover->alpha == 0) continue; - if (rover->top.plane->ZatPoint(secx, secy) < cmpz) + double roverz = rover->top.plane->ZatPoint(secx, secy); + // Ignore 3D floors that are above or below the sector itself: + // they are hidden. Since 3D floors are sorted top to bottom, + // if we get below the sector floor, we can stop. + if (roverz > seczt) continue; + if (roverz < seczb) break; + if (roverz < cmpz) { maptex = *(rover->top.texture); floorplane = rover->top.plane; diff --git a/src/p_spec.cpp b/src/p_spec.cpp index d73575bea5..a60751aa2e 100644 --- a/src/p_spec.cpp +++ b/src/p_spec.cpp @@ -1046,18 +1046,18 @@ void P_SpawnPortal(line_t *line, int sectortag, int plane, int alpha) { // Check if this portal needs to be copied to other sectors // This must be done here to ensure that it gets done only after the portal is set up - if (lines[i].special == Sector_SetPortal && - lines[i].args[1] == 1 && - lines[i].args[2] == plane && - lines[i].args[3] == sectortag) + if (lines[j].special == Sector_SetPortal && + lines[j].args[1] == 1 && + lines[j].args[2] == plane && + lines[j].args[3] == sectortag) { - if (lines[i].args[0] == 0) + if (lines[j].args[0] == 0) { - SetPortal(lines[i].frontsector, plane, reference, alpha); + SetPortal(lines[j].frontsector, plane, reference, alpha); } else { - for (int s=-1; (s = P_FindSectorFromTag(lines[i].args[0],s)) >= 0;) + for (int s=-1; (s = P_FindSectorFromTag(lines[j].args[0],s)) >= 0;) { SetPortal(§ors[s], plane, reference, alpha); } diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 55ba296b64..bee304f4c5 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -855,15 +855,15 @@ struct SDL_PrivateVideoData struct SDL_VideoDevice { const char *name; - int (*functions)()[9]; + int (*functions[9])(); SDL_VideoInfo info; SDL_PixelFormat *displayformatalphapixel; - int (*morefuncs)()[9]; + int (*morefuncs[9])(); Uint16 *gamma; - int (*somefuncs)()[9]; + int (*somefuncs[9])(); unsigned int texture; // Only here if SDL was compiled with OpenGL support. Ack! int is_32bit; - int (*itsafuncs)()[13]; + int (*itsafuncs[13])(); SDL_Surface *surfaces[3]; SDL_Palette *physpal; SDL_Color *gammacols; @@ -874,7 +874,7 @@ struct SDL_VideoDevice SDL_PrivateVideoData *hidden; // Why did they have to bury this so far in? }; -extern SDL_VideDevice *current_video; +extern SDL_VideoDevice *current_video; #define SDL_Display (current_video->hidden->X11_Display) SDL_Cursor *CreateColorCursor(FTexture *cursorpic) diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index 0bfb979a69..2013294a83 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -1254,11 +1254,13 @@ FMultiPatchTexture::FMultiPatchTexture (FScanner &sc, int usetype) { sc.MustGetFloat(); xScale = FLOAT2FIXED(sc.Float); + if (xScale == 0) sc.ScriptError("Texture %s is defined with null x-scale\n", Name); } else if (sc.Compare("YScale")) { sc.MustGetFloat(); yScale = FLOAT2FIXED(sc.Float); + if (yScale == 0) sc.ScriptError("Texture %s is defined with null y-scale\n", Name); } else if (sc.Compare("WorldPanning")) {