File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,9 @@ export class CrouchAnimation extends PlayerAnimation {
237
237
private isCrouched : any ;
238
238
protected animate ( player : PlayerObject ) : void {
239
239
var pr = this . progress * 8 ;
240
+ if ( pr === 0 ) {
241
+ this . isCrouched = undefined ;
242
+ }
240
243
if ( this . runOnce ) {
241
244
if ( pr > 1 ) {
242
245
pr = 1 ;
@@ -255,7 +258,7 @@ export class CrouchAnimation extends PlayerAnimation {
255
258
player . cape . position . y =
256
259
8 - 1.851236166577372 * Math . abs ( Math . sin ( ( pr * Math . PI ) / 2 ) ) ;
257
260
player . cape . rotation . x =
258
- 0.18849555921538758 +
261
+ ( 10.8 * Math . PI ) / 180 +
259
262
0.294220265771 * Math . abs ( Math . sin ( ( pr * Math . PI ) / 2 ) ) ;
260
263
player . cape . position . z =
261
264
- 2 +
@@ -264,7 +267,7 @@ export class CrouchAnimation extends PlayerAnimation {
264
267
player . elytra . position . x = player . cape . position . x ;
265
268
player . elytra . position . y = player . cape . position . y ;
266
269
player . elytra . position . z = player . cape . position . z ;
267
- player . elytra . rotation . x = player . cape . rotation . x ;
270
+ player . elytra . rotation . x = player . cape . rotation . x - ( 10.8 * Math . PI ) / 180 ;
268
271
var pr1 = this . progress / this . speed ;
269
272
if ( Math . abs ( Math . sin ( ( pr * Math . PI ) / 2 ) ) === 1 ) {
270
273
this . erp = ! this . isCrouched ? pr1 : this . erp ;
You can’t perform that action at this time.
0 commit comments