mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-03 03:08:29 +02:00
fixed division by 0 error
This commit is contained in:
parent
0d5e94e925
commit
a460298a12
1 changed files with 3 additions and 1 deletions
|
@ -71,7 +71,9 @@ def draw_model(scene_scale, scene_trans, scene):
|
|||
for face in mesh.faces:
|
||||
for vertex_i in face:
|
||||
height = scene.vertices[vertex_i][color_axe]
|
||||
color = (height - min_height) / max_height
|
||||
color = 1
|
||||
if max_height != 0:
|
||||
color = (height - min_height) / max_height
|
||||
|
||||
glColor3f(color, color, color)
|
||||
glVertex3f(*scene.vertices[vertex_i])
|
||||
|
|
Loading…
Reference in a new issue