Fixed a long standing bug I didn't realize where I did -1 on the map in the raycaster which made the textures not actually work.

master
Zed A. Shaw 1 week ago
parent 90c37fe4c9
commit e361984c40
  1. 2
      raycaster.cpp

@ -304,7 +304,7 @@ void Raycaster::cast_rays() {
int draw_end = line_height / 2 + $height / 2 + $pitch;
if(draw_end >= $height) draw_end = $height - 1;
auto texture = textures::get_surface($map[map_y][map_x] - 1);
auto texture = textures::get_surface($map[map_y][map_x]);
// calculate value of wall_x
double wall_x; // where exactly the wall was hit

Loading…
Cancel
Save