-
Notifications
You must be signed in to change notification settings - Fork 218
My fixes (miniship + endbar mirror fix + fix coin lock bypass) #357
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
Open
Gpar2023
wants to merge
5
commits into
web-dashers:main
Choose a base branch
from
Gpar2023:gpar-fixes-miniship-mirror-end-bar
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5da24e9
Fix beams from not only working on non-mirror (hopefully)
Gpar2023 85ede58
Fix mini cube on ship rotation issue (FIX)
Gpar2023 3bda1be
Merge remote-tracking branch 'gparfix2/fix/mirror-portal-finish-vfx' …
Gpar2023 7601578
Merge remote-tracking branch 'gparfix2/fix-miniship-rot' into gpar-fi…
Gpar2023 642353f
Fixes locked coin bypass from old PR and overall
Gpar2023 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1816,7 +1816,8 @@ class PlayerObject { | |
| if (this.p.isFlying || this.p.isUfo) { | ||
| const _0x3904f8 = 10; | ||
| const _miniS = this.p.isMini ? 0.6 : 1; | ||
| const playerOffset = this.p.gravityFlipped ? (-30 * _miniS) : (10 * _miniS); | ||
| const _miniCubeOffset = this.p.isMini ? (8 * _miniS) : 0; | ||
| const playerOffset = (this.p.gravityFlipped ? (-30 * _miniS) : (10 * _miniS)) - _miniCubeOffset; | ||
| const cosRotation = Math.cos(playerRotation); | ||
| const sinRotation = Math.sin(playerRotation); | ||
| const mirrored = this.p.mirrored ? -1 : 1; | ||
|
|
@@ -1855,7 +1856,7 @@ if (this.p.isFlying || this.p.isUfo) { | |
| if (playerLayerItem) { | ||
| const _miniS = this.p.isMini ? 0.6 : 1; | ||
| playerLayerItem.sprite.x = _0x7f0705 + _0x562424; | ||
| playerLayerItem.sprite.y = (_0x1a433c + _0x3011c9) + (this.p.isMini ? (8 * _miniS) : 0) + (this.p.gravityFlipped ? (-20 * _miniS) : 0); | ||
| playerLayerItem.sprite.y = (_0x1a433c + _0x3011c9) + (this.p.gravityFlipped ? (-20 * _miniS) : 0); | ||
| playerLayerItem.sprite.rotation = this.p.mirrored ? -playerRotation : playerRotation; | ||
| const _shipCubeS = _miniS * 0.55; | ||
| playerLayerItem.sprite.scaleY = this.p.gravityFlipped ? -_shipCubeS : _shipCubeS; | ||
|
|
@@ -1874,7 +1875,7 @@ if (this.p.isFlying || this.p.isUfo) { | |
| const birdX = _0x7f0705 + _0x1b1d28; | ||
| const birdY = _0x1a433c + _0x185f91 + (this.p.gravityFlipped ? -15 : 5); | ||
| const cubeX = _0x7f0705 + _0x562424; | ||
| const cubeY = (_0x1a433c + _0x3011c9) + (this.p.isMini ? (8 * _miniS) : 0) + (this.p.gravityFlipped ? (-20 * _miniS) : 0); | ||
| const cubeY = (_0x1a433c + _0x3011c9) + (this.p.gravityFlipped ? (-20 * _miniS) : 0); | ||
| const offsetX = cubeX - birdX; | ||
| const offsetY = cubeY - birdY; | ||
| const rotationDelta = uforotation - currentRotation; | ||
|
|
@@ -3462,14 +3463,23 @@ if (this.p.isFlying || this.p.isUfo) { | |
| const miniRollScale = this.p.isMini ? 1 / 0.8 : 1; | ||
| this._rotation += _0x1dd8af / (g / 2) * rollDir * speedFactor * bidenblast* miniRollScale; | ||
| } | ||
| updateShipRotation(_0x217ad3) { | ||
| let _0x48f422 = -(this.p.y - this.p.lastY); | ||
| let _0x58cb3a = _0x217ad3 * 10.3860036; | ||
| if (_0x58cb3a * _0x58cb3a + _0x48f422 * _0x48f422 >= _0x217ad3 * 0.6) { | ||
| let _0x5e6a2b = Math.atan2(_0x48f422, _0x58cb3a); | ||
| let _0x2371ed = 0.15; | ||
| let _0x1857d4 = Math.min(_0x217ad3 * 1, _0x2371ed * _0x217ad3); | ||
| this._rotation = this.slerp2D(this._rotation, _0x5e6a2b, _0x1857d4); | ||
| updateShipRotation(delta) { | ||
|
Author
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. update readablity |
||
| const isMini = this.p.isMini; | ||
| const deltaY = -(this.p.y - this.p.lastY); | ||
| const deltaX = delta * (isMini ? 16.5 : 8); | ||
|
|
||
| const speedSquared = deltaX * deltaX + deltaY * deltaY; | ||
| const movementThreshold = delta * 0.4; | ||
|
|
||
| if (speedSquared >= movementThreshold) { | ||
| let targetRotation = Math.atan2(deltaY, deltaX); | ||
|
|
||
| const maxPitch = isMini ? 0.66 : 0.70; | ||
| targetRotation = Phaser.Math.Clamp(targetRotation, -maxPitch, maxPitch); | ||
|
|
||
| const turnRate = isMini ? 0.20 : 0.15; | ||
| const turnStep = Math.min(delta, turnRate * delta); | ||
| this._rotation = this.slerp2D(this._rotation, targetRotation, turnStep); | ||
| } | ||
| } | ||
| breakabletheblock(gameObj) { | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
moved and changed name for more acceciblity