nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
362f41d
)
gamnit: fix div by zero when there is no animation
author
Alexis Laferrière
<alexis.laf@xymus.net>
Mon, 17 Jul 2017 18:06:56 +0000
(14:06 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Fri, 28 Jul 2017 19:06:28 +0000
(15:06 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/gamnit/flat/flat_core.nit
patch
|
blob
|
history
diff --git
a/lib/gamnit/flat/flat_core.nit
b/lib/gamnit/flat/flat_core.nit
index
800b3de
..
932a584
100644
(file)
--- a/
lib/gamnit/flat/flat_core.nit
+++ b/
lib/gamnit/flat/flat_core.nit
@@
-687,7
+687,7
@@
private class Simple2dProgram
vec3 c; // coords
float end = a_start + a_loops/a_fps*a_n_frames;
- if (a_loops == -1.0 || time < end) {
+ if (a_fps != 0.0 && (a_loops == -1.0 || time < end)) {
// in animation
float frame = mod(floor((time-a_start)*a_fps), a_n_frames);
v_coord = a_tex_coord + a_tex_diff*frame;