Skip to content

Commit

Permalink
noggit: liquid_layer: fix _center not being transferred when copying …
Browse files Browse the repository at this point in the history
…a layer causing lod issues (_center is used to find the distance to the camera)
  • Loading branch information
Adspartan committed Jun 1, 2024
1 parent e382c80 commit c9379ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/noggit/liquid_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ liquid_layer::liquid_layer(liquid_layer&& other)
, _liquid_vertex_format(other._liquid_vertex_format)
, _minimum(other._minimum)
, _maximum(other._maximum)
, _center(other._center)
, _subchunks(other._subchunks)
, _vertices(other._vertices)
, _indices_by_lod(other._indices_by_lod)
Expand All @@ -172,6 +173,7 @@ liquid_layer::liquid_layer(liquid_layer const& other)
, _liquid_vertex_format(other._liquid_vertex_format)
, _minimum(other._minimum)
, _maximum(other._maximum)
, _center(other._center)
, _subchunks(other._subchunks)
, _vertices(other._vertices)
, _indices_by_lod(other._indices_by_lod)
Expand All @@ -186,6 +188,7 @@ liquid_layer& liquid_layer::operator= (liquid_layer&& other)
std::swap(_liquid_vertex_format, other._liquid_vertex_format);
std::swap(_minimum, other._minimum);
std::swap(_maximum, other._maximum);
std::swap(_center, other._center);
std::swap(_subchunks, other._subchunks);
std::swap(_vertices, other._vertices);
std::swap(pos, other.pos);
Expand All @@ -203,6 +206,7 @@ liquid_layer& liquid_layer::operator=(liquid_layer const& other)
_liquid_vertex_format = other._liquid_vertex_format;
_minimum = other._minimum;
_maximum = other._maximum;
_center = other._center;
_subchunks = other._subchunks;
_vertices = other._vertices;
_indices_by_lod = other._indices_by_lod;
Expand Down

0 comments on commit c9379ce

Please sign in to comment.