Skip to content
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

Selection of starting units doesn't work #94

Closed
berndrakell opened this issue Dec 28, 2023 · 2 comments
Closed

Selection of starting units doesn't work #94

berndrakell opened this issue Dec 28, 2023 · 2 comments

Comments

@berndrakell
Copy link
Contributor

When I run the game and select one of my starting units they appear to be selected but the unit menu doesn't open and they are not moveable.

grafik

@berndrakell
Copy link
Contributor Author

The problem for this lays in Match.gd function

func _setup_and_spawn_unit()

where _setup_unit_groups(unit) is called before player.add_child(unit). In _setup_unit_groups(unit) the player of the unit must be evaluated to assign it to the correct group. As the unit node does not have a parent yet, the player is returned as null and the unit is not identified as belonging to the human player

@Scony
Copy link
Contributor

Scony commented Dec 28, 2023

Right, this is a regression introduced in recent refactoring - it was tested using the manual test with predefined units only... Thanks for reporting!

@Scony Scony closed this as completed in fe0a0df Dec 28, 2023
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

No branches or pull requests

2 participants