diff --git a/src/r_3dfloors.cpp b/src/r_3dfloors.cpp index fbdc34edce..412a6057a1 100644 --- a/src/r_3dfloors.cpp +++ b/src/r_3dfloors.cpp @@ -140,6 +140,7 @@ void R_3D_EnterSkybox() height_top = NULL; height_cur = NULL; height_max = -1; + fakeActive = 0; CurrentSkybox++; } @@ -157,6 +158,7 @@ void R_3D_LeaveSkybox() height_top = current.height_top; height_cur = current.height_cur; height_max = current.height_max; + fakeActive = height_top != NULL; CurrentSkybox--; } diff --git a/src/r_main.cpp b/src/r_main.cpp index 80edd18d6d..f4ba8c6e52 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -762,7 +762,7 @@ void R_RenderActorView (AActor *actor, bool dontmaplines) MaskedCycles.Reset(); WallScanCycles.Reset(); - fakeActive = 0; // kg3D - reset fake floor idicator + fakeActive = 0; // kg3D - reset fake floor indicator R_3D_ResetClip(); // reset clips (floor/ceiling) R_SetupBuffer (); diff --git a/src/r_plane.cpp b/src/r_plane.cpp index 75c308b5a8..d3c5f8c94a 100644 --- a/src/r_plane.cpp +++ b/src/r_plane.cpp @@ -1002,15 +1002,15 @@ static void R_DrawSkyStriped (visplane_t *pl) CVAR (Bool, tilt, false, 0); //CVAR (Int, pa, 0, 0) -void R_DrawPlanes () +int R_DrawPlanes () { visplane_t *pl; int i; - int vpcount; + int vpcount = 0; ds_color = 3; - for (i = vpcount = 0; i < MAXVISPLANES; i++) + for (i = 0; i < MAXVISPLANES; i++) { for (pl = visplanes[i]; pl; pl = pl->next) { @@ -1024,6 +1024,7 @@ void R_DrawPlanes () } } } + return vpcount; } // kg3D - draw all visplanes with "height" @@ -1329,7 +1330,6 @@ void R_DrawSkyBoxes () for (*freehead = visplanes[MAXVISPLANES], visplanes[MAXVISPLANES] = NULL; *freehead; ) freehead = &(*freehead)->next; - } ADD_STAT(skyboxes) diff --git a/src/r_plane.h b/src/r_plane.h index 6bcb36a193..7ad711bcc0 100644 --- a/src/r_plane.h +++ b/src/r_plane.h @@ -87,7 +87,7 @@ void R_InitPlanes (); void R_DeinitPlanes (); void R_ClearPlanes (bool fullclear); -void R_DrawPlanes (); +int R_DrawPlanes (); void R_DrawSkyBoxes (); void R_DrawSkyPlane (visplane_t *pl); void R_DrawNormalPlane (visplane_t *pl, fixed_t alpha, bool additive, bool masked);