add: if pos - start != render_distance then increase stop
This commit is contained in:
parent
76a3894730
commit
f17dee09e8
8
utils.py
8
utils.py
@ -6,6 +6,14 @@ def render(pos: int, min: int, max: int, render_distance: int, elements: list):
|
|||||||
if (stop > max):
|
if (stop > max):
|
||||||
stop = max;
|
stop = max;
|
||||||
i = 0;
|
i = 0;
|
||||||
|
y = pos - start;
|
||||||
|
if (y < min):
|
||||||
|
y = pos;
|
||||||
|
if (stop - start != render_distance * 2 + 1):
|
||||||
|
if (pos - start != render_distance):
|
||||||
|
stop = stop + render_distance - start - pos
|
||||||
|
# elif (stop + render_distance > max):
|
||||||
|
# start = start - (stop + render_distance - max)
|
||||||
y = pos - start;
|
y = pos - start;
|
||||||
if (y < min):
|
if (y < min):
|
||||||
y = pos;
|
y = pos;
|
||||||
|
Loading…
Reference in New Issue
Block a user