Skip to content

Commit 7b74e5d

Browse files
Merge branch 'stable' into extended-hud
2 parents 19c8218 + 07b7709 commit 7b74e5d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

client/src/r_bsp.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ void R_Subsector (int num)
671671

672672
basecolormap = frontsector->colormap->maps;
673673

674-
ceilingplane = P_CeilingHeight(camera) > viewz ||
674+
ceilingplane = P_CeilingHeight(viewx, viewy, frontsector) > viewz ||
675675
frontsector->ceilingpic == skyflatnum ||
676676
(frontsector->heightsec &&
677677
!(frontsector->heightsec->MoreFlags & SECF_IGNOREHEIGHTSEC) &&
@@ -691,7 +691,7 @@ void R_Subsector (int num)
691691
// killough 3/7/98: Add (x,y) offsets to flats, add deep water check
692692
// killough 3/16/98: add floorlightlevel
693693
// killough 10/98: add support for skies transferred from sidedefs
694-
floorplane = P_FloorHeight(camera) < viewz || // killough 3/7/98
694+
floorplane = P_FloorHeight(viewx, viewy, frontsector) < viewz || // killough 3/7/98
695695
(frontsector->heightsec &&
696696
!(frontsector->heightsec->MoreFlags & SECF_IGNOREHEIGHTSEC) &&
697697
frontsector->heightsec->ceilingpic == skyflatnum) ?

common/r_data.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545

4646
#include <ctype.h>
4747

48+
#include <cmath>
49+
4850
#include <algorithm>
4951

5052
//
@@ -478,7 +480,7 @@ tallpost_t* R_GetTextureColumn(int texnum, int colnum)
478480
if (mask + 1 == width)
479481
colnum &= mask;
480482
else
481-
colnum %= width;
483+
colnum -= width * std::floor((float)colnum / (float)width);
482484
int lump = texturecolumnlump[texnum][colnum];
483485
int ofs = texturecolumnofs[texnum][colnum];
484486

0 commit comments

Comments
 (0)