Fix challenge start positions for the 2nd stage

This commit is contained in:
Melledy
2023-10-26 09:02:18 -07:00
parent 7e15a93af1
commit 175fc92460
2 changed files with 8 additions and 4 deletions

View File

@@ -24,8 +24,8 @@ import lombok.Setter;
public class ChallengeInstance { public class ChallengeInstance {
private final Player player; private final Player player;
private final ChallengeExcel excel; private final ChallengeExcel excel;
private final Position startPos; private Position startPos;
private final Position startRot; private Position startRot;
private boolean hasAvatarDied; private boolean hasAvatarDied;
private int currentStage; private int currentStage;
@@ -38,8 +38,8 @@ public class ChallengeInstance {
public ChallengeInstance(Player player, ChallengeExcel excel) { public ChallengeInstance(Player player, ChallengeExcel excel) {
this.player = player; this.player = player;
this.excel = excel; this.excel = excel;
this.startPos = player.getPos().clone(); this.startPos = new Position();
this.startRot = player.getRot().clone(); this.startRot = new Position();
this.currentStage = 1; this.currentStage = 1;
this.roundsLeft = excel.getChallengeCountDown(); this.roundsLeft = excel.getChallengeCountDown();
this.status = ChallengeStatus.CHALLENGE_DOING; this.status = ChallengeStatus.CHALLENGE_DOING;

View File

@@ -76,6 +76,10 @@ public class ChallengeManager extends BasePlayerManager {
return; return;
} }
// Save start positions
instance.getStartPos().set(getPlayer().getPos());
instance.getStartRot().set(getPlayer().getRot());
// Setup first challenge stage // Setup first challenge stage
instance.setupStage1(); instance.setupStage1();