File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,16 +316,18 @@ export class CrouchAnimation extends PlayerAnimation {
316316 player . elytra . position . z = player . cape . position . z ;
317317 player . elytra . rotation . x = player . cape . rotation . x - ( 10.8 * Math . PI ) / 180 ;
318318 const pr1 = this . progress / this . speed ;
319- if ( Math . abs ( Math . sin ( ( pr * Math . PI ) / 2 ) ) === 1 ) {
319+ if ( Math . abs ( Math . sin ( ( pr * Math . PI ) / 2 ) ) === 1 || ( this . showProgress && Math . floor ( Math . abs ( pr ) ) % 2 === 0 ) ) {
320320 this . erp = ! this . isCrouched ? pr1 : this . erp ;
321321 this . isCrouched = true ;
322322 player . elytra . leftWing . rotation . z =
323323 0.26179944 + 0.4582006 * Math . abs ( Math . sin ( ( Math . min ( pr1 - this . erp , 1 ) * Math . PI ) / 2 ) ) ;
324+ player . elytra . leftWing . rotation . y = 0.3 * Math . abs ( Math . sin ( ( Math . min ( pr1 - this . erp , 1 ) * Math . PI ) / 2 ) ) ;
324325 player . elytra . updateRightWing ( ) ;
325326 } else if ( this . isCrouched !== undefined ) {
326327 this . erp = this . isCrouched ? pr1 : this . erp ;
327328 player . elytra . leftWing . rotation . z =
328329 0.72 - 0.4582006 * Math . abs ( Math . sin ( ( Math . min ( pr1 - this . erp , 1 ) * Math . PI ) / 2 ) ) ;
330+ player . elytra . leftWing . rotation . y = 0.3 - 0.3 * Math . abs ( Math . sin ( ( Math . min ( pr1 - this . erp , 1 ) * Math . PI ) / 2 ) ) ;
329331 player . elytra . updateRightWing ( ) ;
330332 this . isCrouched = false ;
331333 }
You can’t perform that action at this time.
0 commit comments