lampe-games/godot-open-rts

Selection of starting units doesn't work

Closed this issue · 2 comments

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

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

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