Prevent rendering without sufficient keyframes (fixes #45)

This commit is contained in:
johni0702
2016-12-24 01:44:51 +01:00
parent 5d520a5a3c
commit 2c898a8192

View File

@@ -512,6 +512,13 @@ public class GuiPathing {
lastTime = time;
}
// Make sure there are at least two position- and two time-keyframes
if (timeline.getPaths().get(POSITION_PATH).getSegments().isEmpty()
|| timeline.getPaths().get(TIME_PATH).getSegments().isEmpty()) {
GuiInfoPopup.open(replayHandler.getOverlay(), "replaymod.chat.morekeyframes");
return false;
}
return true;
}