Updated build.gradle to automatically build fat jars with the dependencies in the /libs folder. This utilizes the shade.sh shell script. Use ./gradlew without explicitely invoking the build task, as this will automatically build a fat jar.
Sorry for this painful commit, but git somehow f'd up and sees changes in files where there aren't any.
This commit is contained in:
33
src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java
Normal file → Executable file
33
src/main/java/eu/crushedpixel/replaymod/replay/ReplayProcess.java
Normal file → Executable file
@@ -48,6 +48,8 @@ public class ReplayProcess {
|
||||
}
|
||||
|
||||
public static void startReplayProcess(boolean record) {
|
||||
ReplayHandler.selectKeyframe(null);
|
||||
|
||||
isVideoRecording = record;
|
||||
lastPosition = null;
|
||||
motionSpline = null;
|
||||
@@ -295,15 +297,13 @@ public class ReplayProcess {
|
||||
|
||||
private static void recordingTick() {
|
||||
if(ReplayHandler.isHurrying()) {
|
||||
if(!isVideoRecording()) {
|
||||
lastRealTime = System.currentTimeMillis();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(blocked && isVideoRecording()) {
|
||||
return;
|
||||
}
|
||||
|
||||
deepBlock = true;
|
||||
blocked = true;
|
||||
|
||||
@@ -345,15 +345,8 @@ public class ReplayProcess {
|
||||
motionSpline.calcSpline();
|
||||
}
|
||||
|
||||
long timeStep;
|
||||
|
||||
long curTime = System.currentTimeMillis();
|
||||
|
||||
if(isVideoRecording()) {
|
||||
timeStep = 1000/ReplayMod.replaySettings.getVideoFramerate();
|
||||
} else {
|
||||
timeStep = curTime - lastRealTime;
|
||||
}
|
||||
long timeStep = 1000/ReplayMod.replaySettings.getVideoFramerate();
|
||||
|
||||
int curRealReplayTime = (int)(lastRealReplayTime + timeStep);
|
||||
|
||||
@@ -409,14 +402,20 @@ public class ReplayProcess {
|
||||
}
|
||||
}
|
||||
|
||||
int currentDiff = nextPosStamp - lastPosStamp;
|
||||
int current = curRealReplayTime - lastPosStamp;
|
||||
int currentPosDiff = nextPosStamp - lastPosStamp;
|
||||
int currentPos = curRealReplayTime - lastPosStamp;
|
||||
|
||||
float currentStepPerc = (float)current/(float)currentDiff; //The percentage of the travelled path between the current positions
|
||||
if(Float.isInfinite(currentStepPerc)) currentStepPerc = 0;
|
||||
float currentPosStepPerc = (float)currentPos/(float)currentPosDiff; //The percentage of the travelled path between the current positions
|
||||
if(Float.isInfinite(currentPosStepPerc)) currentPosStepPerc = 0;
|
||||
|
||||
float splinePos = ((float)ReplayHandler.getKeyframeIndex(lastPos) + currentStepPerc)/(float)(ReplayHandler.getPosKeyframeCount()-1);
|
||||
float timePos = ((float)ReplayHandler.getKeyframeIndex(lastTime) + currentStepPerc)/(float)(ReplayHandler.getTimeKeyframeCount()-1);
|
||||
int currentTimeDiff = nextTimeStamp - lastTimeStamp;
|
||||
int currentTime = curRealReplayTime - lastTimeStamp;
|
||||
|
||||
float currentTimeStepPerc = (float)currentTime/(float)currentTimeDiff; //The percentage of the travelled path between the current timestamps
|
||||
if(Float.isInfinite(currentTimeStepPerc)) currentTimeStepPerc = 0;
|
||||
|
||||
float splinePos = ((float)ReplayHandler.getKeyframeIndex(lastPos) + currentPosStepPerc)/(float)(ReplayHandler.getPosKeyframeCount()-1);
|
||||
float timePos = ((float)ReplayHandler.getKeyframeIndex(lastTime) + currentTimeStepPerc)/(float)(ReplayHandler.getTimeKeyframeCount()-1);
|
||||
|
||||
Position pos = null;
|
||||
if(!linear) {
|
||||
|
||||
Reference in New Issue
Block a user