Add air movement controls for player in App.tsx and related files
This commit is contained in:
@@ -1359,6 +1359,16 @@ function readPlayerStartMovementTemplate(value: unknown, label: string) {
|
||||
`${label}.jump.variableHeight`,
|
||||
preset.jump.variableHeight
|
||||
),
|
||||
moveWhileJumping: readOptionalBoolean(
|
||||
jump?.moveWhileJumping,
|
||||
`${label}.jump.moveWhileJumping`,
|
||||
preset.jump.moveWhileJumping
|
||||
),
|
||||
moveWhileFalling: readOptionalBoolean(
|
||||
jump?.moveWhileFalling,
|
||||
`${label}.jump.moveWhileFalling`,
|
||||
preset.jump.moveWhileFalling
|
||||
),
|
||||
maxHoldMs:
|
||||
jump?.maxHoldMs === undefined
|
||||
? preset.jump.maxHoldMs
|
||||
|
||||
@@ -1348,6 +1348,28 @@ function validatePlayerStartEntity(
|
||||
);
|
||||
}
|
||||
|
||||
if (!isBoolean(entity.movementTemplate?.jump?.moveWhileJumping)) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
"error",
|
||||
"invalid-player-start-move-while-jumping",
|
||||
"Player Start move while jumping setting must be a boolean.",
|
||||
`${path}.movementTemplate.jump.moveWhileJumping`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!isBoolean(entity.movementTemplate?.jump?.moveWhileFalling)) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
"error",
|
||||
"invalid-player-start-move-while-falling",
|
||||
"Player Start move while falling setting must be a boolean.",
|
||||
`${path}.movementTemplate.jump.moveWhileFalling`
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (!isBoolean(entity.movementTemplate?.jump?.bunnyHop)) {
|
||||
diagnostics.push(
|
||||
createDiagnostic(
|
||||
|
||||
@@ -15,7 +15,8 @@ import {
|
||||
type WorldSettings
|
||||
} from "./world-settings";
|
||||
|
||||
export const SCENE_DOCUMENT_VERSION = 33 as const;
|
||||
export const SCENE_DOCUMENT_VERSION = 34 as const;
|
||||
export const PLAYER_START_AIR_CONTROL_SCENE_DOCUMENT_VERSION = 34 as const;
|
||||
export const WHITEBOX_BEVEL_SCENE_DOCUMENT_VERSION = 32 as const;
|
||||
export const PLAYER_START_LOCOMOTION_CORE_SCENE_DOCUMENT_VERSION = 32 as const;
|
||||
export const PLAYER_START_MOVEMENT_TEMPLATE_SCENE_DOCUMENT_VERSION =
|
||||
|
||||
Reference in New Issue
Block a user