update spirit
This commit is contained in:
@@ -80,13 +80,16 @@ export class JumpController {
|
||||
/** Called on `jumpPressed` UI event. */
|
||||
public pressJump(nowMs: number): IJumpDispatchResult {
|
||||
if (!this.motion.isGrounded) {
|
||||
console.log('[JumpController] pressJump REJECTED — airborne, phase=', this.phase);
|
||||
return { phase: this.phase, height: 0, horizontalImpulse: 0, reason: 'airborne' };
|
||||
}
|
||||
if (this.phase !== 'idle') {
|
||||
console.log('[JumpController] pressJump REJECTED — phase=', this.phase, ', not idle');
|
||||
return { phase: this.phase, height: 0, horizontalImpulse: 0, reason: 'already_in_jump' };
|
||||
}
|
||||
this.phase = 'charging';
|
||||
this.pressTs = nowMs;
|
||||
console.log('[JumpController] pressJump ACCEPTED — entering charging phase');
|
||||
return { phase: this.phase, height: 0, horizontalImpulse: 0 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user