diff --git a/src/Arts.cs b/src/Arts.cs index 30f6eb6..9ecff14 100644 --- a/src/Arts.cs +++ b/src/Arts.cs @@ -121,18 +121,19 @@ static class Arts ) ); } - // tail - if (Mono.grow_buffer > 0) { snake_t = 0.0f; } - int i_tail = Mono.snake_len - 1; - Vec3 tail_dir = Vec3.Direction(Mono.snake[i_tail - 1].ToVec3, Mono.snake[i_tail].ToVec3); - meshes["Segment"].Draw( - mat_mono, - Matrix.TRS( - Mono.snake[i_tail].ToVec3 + (tail_dir * (float)(snake_t) * 0.7f), - Quat.LookDir(tail_dir), - V.XYZ(1, 1, (float)(1.0 - snake_t)) - ) - ); + // false tail + if (tailmove.state && snake_t < 1.0f) { + int i_tail = Mono.snake_len - 1; + Vec3 tail_dir = Vec3.Direction(Mono.snake[i_tail - 1].ToVec3, Mono.snake[i_tail].ToVec3); + meshes["Segment"].Draw( + mat_mono, + Matrix.TRS( + Mono.snake[i_tail].ToVec3 + (tail_dir * (float)(snake_t) * 0.7f), + Quat.LookDir(tail_dir), + V.XYZ(1, 1, (float)(1.0 - snake_t)) + ) + ); + } // holes foreach (KeyValuePair hole in Mono.holes)