feat: clicking units no longer results in floating goal markers
This commit is contained in:
parent
6d844b89b8
commit
a20f642691
|
@ -108,6 +108,7 @@ void RTSPlayer::order_activate_object_under_cursor() {
|
|||
marker->set_global_position(dict["position"]);
|
||||
this->selected_unit->begin_marker_temporary(marker);
|
||||
}
|
||||
|
||||
bool RTSPlayer::order_activate_object(gd::Node3D *node) {
|
||||
// get the hit object as a marker
|
||||
if(GoalMarker *marker = gd::Object::cast_to<GoalMarker>(node)) {
|
||||
|
@ -119,7 +120,7 @@ bool RTSPlayer::order_activate_object(gd::Node3D *node) {
|
|||
this->selected_unit->set_target_goal(unit, goap::Goal::create("is_target_dead", true));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return unit != nullptr;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue