Skip to content

Conversation

@TriMay
Copy link

@TriMay TriMay commented Oct 4, 2024

Fixes a bug in set_facing where newly spawned objects would not correctly set x scale of the $Flip node due to trying to use the flip variable, which is an onready var that is not ready at this point.

Otherwise, before this fix, what happens is when you try to spawn_object, the game is supposed to automatically call obj.set_facing(get_facing_int), which it correctly does mechanically, but the visuals do not match this behavior except in predictions on later turns

Demonstration of the issue this is trying to fix:

demonstration.mp4

Fixes a bug in set_facing where newly spawned objects would not correctly set x scale of the $Flip node due to trying to use the flip variable, which is an onready var that is not ready at this point.
@TriMay TriMay changed the title Update BaseObj.gd Fix set_facing bug BaseObj.gd Oct 4, 2024
@TriMay
Copy link
Author

TriMay commented Oct 6, 2024

I realized in hindsight you could get_node_or_null("Flip") on line 583 instead of $Flip directly, but considering BaseObj.tscn always has a Flip node, I didn't bother to figure out how to edit the commit

Fixes an editor bug where the collisionbox plugin constantly complains about ThrowBox not having editor_selected
@TriMay TriMay changed the title Fix set_facing bug BaseObj.gd Bug Fixes Oct 20, 2024
Copy link
Owner

@uzkbwza uzkbwza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i have tool disabled on this script because of a nasty bug in 3.5.1. i think if it is enabled and i add more fields to the hitbox class, it breaks all the fields for every single throw in all open scenes.

@TriMay
Copy link
Author

TriMay commented Nov 1, 2024

Did you want me to re-remove it from this PR?

@TriMay
Copy link
Author

TriMay commented Nov 1, 2024

I originally made this PR for the set_facing inside BaseObj.spawn_object fix, and didn't realize that editing another file would retroactively update this PR, anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants