!neck_break bool

This commit is contained in:
ethan merchant 2024-11-08 21:39:10 -05:00
parent 7ce5690db4
commit 28195a9549

View file

@ -63,8 +63,9 @@ static class Mono
box_pose.position = Rig.head.position + Rig.head.orientation * V.XYZ(0, -(SD_Y + 0.5f) * box_scale, -32 * U.cm);
}
// filter out neck breaking from snake_dir value set
if (snake[0] + Rig.new_dir != snake[1])
XYZi next_pos = snake[0] + Rig.new_dir;
bool neck_break = next_pos == snake[1];
if (!neck_break)
{
snake_dir = Rig.new_dir;
}