Count skipped checkpoints when jumping past them
This commit is contained in:
1 parent
249cd0c08a
commit
de3578eafe
1 file changed
+5
-3
@@ -145,9 +145,11 @@ public class JumpGenerator {
|
|||||||
this.player.showTitle(Title.title(Component.empty(), Component.text(this.combo, COMBO_COLOR)));
|
this.player.showTitle(Title.title(Component.empty(), Component.text(this.combo, COMBO_COLOR)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isCheckpoint(index)) {
|
// auch ein übersprungener Checkpoint zählt: der letzte zwischen altem und neuem Stand
|
||||||
this.checkpoint = this.step(index).pos();
|
int reachedCheckpoint = index / 10 * 10;
|
||||||
Progress.save(this.player.getUuid(), index);
|
if(reachedCheckpoint > previous) {
|
||||||
|
this.checkpoint = this.step(reachedCheckpoint).pos();
|
||||||
|
Progress.save(this.player.getUuid(), reachedCheckpoint);
|
||||||
this.player.playSound(CHECKPOINT_SOUND);
|
this.player.playSound(CHECKPOINT_SOUND);
|
||||||
this.player.showTitle(CHECKPOINT_TITLE);
|
this.player.showTitle(CHECKPOINT_TITLE);
|
||||||
this.player.sendPacket(new ParticlePacket(Particle.CRIT, this.checkpoint, this.checkpoint.add(0.5), 1.5f, 50));
|
this.player.sendPacket(new ParticlePacket(Particle.CRIT, this.checkpoint, this.checkpoint.add(0.5), 1.5f, 50));
|
||||||
|
|||||||
Reference in new issue
Block a user