auto-git:
[change] src/document/migrate-scene-document.ts
This commit is contained in:
@@ -1935,6 +1935,7 @@ function readPlayerStartMovementTemplate(value: unknown, label: string) {
|
|||||||
const jump = value.jump;
|
const jump = value.jump;
|
||||||
const sprint = value.sprint;
|
const sprint = value.sprint;
|
||||||
const crouch = value.crouch;
|
const crouch = value.crouch;
|
||||||
|
const edgeAssist = value.edgeAssist;
|
||||||
|
|
||||||
if (capabilities !== undefined && !isRecord(capabilities)) {
|
if (capabilities !== undefined && !isRecord(capabilities)) {
|
||||||
throw new Error(`${label}.capabilities must be an object.`);
|
throw new Error(`${label}.capabilities must be an object.`);
|
||||||
@@ -1952,6 +1953,10 @@ function readPlayerStartMovementTemplate(value: unknown, label: string) {
|
|||||||
throw new Error(`${label}.crouch must be an object.`);
|
throw new Error(`${label}.crouch must be an object.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (edgeAssist !== undefined && !isRecord(edgeAssist)) {
|
||||||
|
throw new Error(`${label}.edgeAssist must be an object.`);
|
||||||
|
}
|
||||||
|
|
||||||
return createPlayerStartMovementTemplate({
|
return createPlayerStartMovementTemplate({
|
||||||
kind,
|
kind,
|
||||||
moveSpeed:
|
moveSpeed:
|
||||||
@@ -2062,6 +2067,20 @@ function readPlayerStartMovementTemplate(value: unknown, label: string) {
|
|||||||
crouch.speedMultiplier,
|
crouch.speedMultiplier,
|
||||||
`${label}.crouch.speedMultiplier`
|
`${label}.crouch.speedMultiplier`
|
||||||
)
|
)
|
||||||
|
},
|
||||||
|
edgeAssist: {
|
||||||
|
enabled: readOptionalBoolean(
|
||||||
|
edgeAssist?.enabled,
|
||||||
|
`${label}.edgeAssist.enabled`,
|
||||||
|
preset.edgeAssist.enabled
|
||||||
|
),
|
||||||
|
pushToTopHeight:
|
||||||
|
edgeAssist?.pushToTopHeight === undefined
|
||||||
|
? preset.edgeAssist.pushToTopHeight
|
||||||
|
: expectNonNegativeFiniteNumber(
|
||||||
|
edgeAssist.pushToTopHeight,
|
||||||
|
`${label}.edgeAssist.pushToTopHeight`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user