-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertical swimming. #3251
Vertical swimming. #3251
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ import { | |
avatarMapName, | ||
appsMapName, | ||
playersMapName, | ||
crouchMaxTime, | ||
defaultMaxTime, | ||
activateMaxTime, | ||
// useMaxTime, | ||
aimTransitionMaxTime, | ||
|
@@ -909,7 +909,7 @@ class InterpolatedPlayer extends StatePlayer { | |
}; | ||
this.actionBinaryTimeStepsArray = Object.keys(this.actionBinaryTimeSteps).map(k => this.actionBinaryTimeSteps[k]); | ||
this.actionInterpolants = { | ||
crouch: new BiActionInterpolant(() => this.actionBinaryInterpolants.crouch.get(), 0, crouchMaxTime), | ||
crouch: new BiActionInterpolant(() => this.actionBinaryInterpolants.crouch.get(), 0, defaultMaxTime), | ||
activate: new UniActionInterpolant(() => this.actionBinaryInterpolants.activate.get(), 0, activateMaxTime), | ||
use: new InfiniteActionInterpolant(() => this.actionBinaryInterpolants.use.get(), 0), | ||
pickUp: new InfiniteActionInterpolant(() => this.actionBinaryInterpolants.pickUp.get(), 0), | ||
|
@@ -961,7 +961,7 @@ class UninterpolatedPlayer extends StatePlayer { | |
} | ||
static init() { | ||
this.actionInterpolants = { | ||
crouch: new BiActionInterpolant(() => this.hasAction('crouch'), 0, crouchMaxTime), | ||
crouch: new BiActionInterpolant(() => this.hasAction('crouch'), 0, defaultMaxTime), | ||
activate: new UniActionInterpolant(() => this.hasAction('activate'), 0, activateMaxTime), | ||
use: new InfiniteActionInterpolant(() => this.hasAction('use'), 0), | ||
pickUp: new InfiniteActionInterpolant(() => this.hasAction('pickUp'), 0), | ||
|
@@ -973,20 +973,35 @@ class UninterpolatedPlayer extends StatePlayer { | |
fly: new InfiniteActionInterpolant(() => this.hasAction('fly'), 0), | ||
swim: new InfiniteActionInterpolant(() => this.hasAction('swim'), 0), | ||
jump: new InfiniteActionInterpolant(() => this.hasAction('jump'), 0), | ||
dance: new BiActionInterpolant(() => this.hasAction('dance'), 0, crouchMaxTime), | ||
emote: new BiActionInterpolant(() => this.hasAction('emote'), 0, crouchMaxTime), | ||
dance: new BiActionInterpolant(() => this.hasAction('dance'), 0, defaultMaxTime), | ||
emote: new BiActionInterpolant(() => this.hasAction('emote'), 0, defaultMaxTime), | ||
movements: new InfiniteActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could probably move the useIoManager call up to the top of the function and then re-use it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to move it up to the top of the function, but when doing so, |
||
return ioManager.keys.up || ioManager.keys.down || ioManager.keys.left || ioManager.keys.right; | ||
return ioManager.keys.up || ioManager.keys.down || ioManager.keys.left || ioManager.keys.right || ioManager.keys.space || ioManager.keys.ctrl; | ||
}, 0), | ||
movementsTransition: new BiActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
return ioManager.keys.up || ioManager.keys.down || ioManager.keys.left || ioManager.keys.right || ioManager.keys.space || ioManager.keys.ctrl; | ||
}, 0, defaultMaxTime), | ||
horizontalMovementsTransition: new BiActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
return ioManager.keys.up || ioManager.keys.down || ioManager.keys.left || ioManager.keys.right; | ||
}, 0, crouchMaxTime), | ||
}, 0, defaultMaxTime), | ||
sprint: new BiActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
return ioManager.keys.shift; | ||
}, 0, crouchMaxTime), | ||
}, 0, defaultMaxTime), | ||
swimUp: new BiActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
return ioManager.keys.space; | ||
}, 0, defaultMaxTime), | ||
swimDown: new BiActionInterpolant(() => { | ||
const ioManager = metaversefile.useIoManager(); | ||
return ioManager.keys.ctrl; | ||
}, 0, defaultMaxTime), | ||
surface: new BiActionInterpolant(() => { | ||
return !this.avatar.swimmingOnSurfaceState; | ||
}, 0, defaultMaxTime), | ||
// throw: new UniActionInterpolant(() => this.hasAction('throw'), 0, throwMaxTime), | ||
// chargeJump: new InfiniteActionInterpolant(() => this.hasAction('chargeJump'), 0), | ||
// standCharge: new InfiniteActionInterpolant(() => this.hasAction('standCharge'), 0), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,6 @@ | |
"fog": { | ||
"fogType": "exp", | ||
"args": [[0, 5, 10], 0] | ||
}, | ||
"ssr": { | ||
|
||
} | ||
} | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like VSCode auto formatting.
I know we have a bunch of red squigglies, but can we remove these / paste them back in for the sake of making a really simple PR and then we can do formatting separately?