chore(style): changed brackets to match style
This commit is contained in:
parent
7cf5b128ff
commit
65b0f76991
|
@ -35,9 +35,8 @@ bool UnitWorldState::get_can_see_target() const {
|
||||||
};
|
};
|
||||||
// construct list for ignored objects including target node and parent unit
|
// construct list for ignored objects including target node and parent unit
|
||||||
gd::TypedArray<gd::RID> ignore_list{this->parent_unit->get_rid()};
|
gd::TypedArray<gd::RID> ignore_list{this->parent_unit->get_rid()};
|
||||||
if(gd::CollisionObject3D *target_collider{gd::Object::cast_to<gd::CollisionObject3D>(this->target_node)}) {
|
if(gd::CollisionObject3D *target_collider{gd::Object::cast_to<gd::CollisionObject3D>(this->target_node)})
|
||||||
ignore_list.push_back(target_collider->get_rid());
|
ignore_list.push_back(target_collider->get_rid());
|
||||||
}
|
|
||||||
// construct raycast query from unit's eye node to vision target. Ignoring parent unit and target if applicable
|
// construct raycast query from unit's eye node to vision target. Ignoring parent unit and target if applicable
|
||||||
gd::Ref<gd::PhysicsRayQueryParameters3D> const query{gd::PhysicsRayQueryParameters3D::create(
|
gd::Ref<gd::PhysicsRayQueryParameters3D> const query{gd::PhysicsRayQueryParameters3D::create(
|
||||||
eyes.origin,
|
eyes.origin,
|
||||||
|
@ -64,9 +63,8 @@ bool UnitWorldState::get_is_target_dead() const {
|
||||||
void UnitWorldState::set_target_node(gd::Node3D *node) {
|
void UnitWorldState::set_target_node(gd::Node3D *node) {
|
||||||
if(node == this->target_node)
|
if(node == this->target_node)
|
||||||
return;
|
return;
|
||||||
if(this->target_node != nullptr) {
|
if(this->target_node != nullptr)
|
||||||
this->target_node->disconnect("tree_exited", this->target_node_exited_tree.bind(this->target_node));
|
this->target_node->disconnect("tree_exited", this->target_node_exited_tree.bind(this->target_node));
|
||||||
}
|
|
||||||
this->target_node = node;
|
this->target_node = node;
|
||||||
if(node != nullptr)
|
if(node != nullptr)
|
||||||
node->connect("tree_exited", this->target_node_exited_tree.bind(node));
|
node->connect("tree_exited", this->target_node_exited_tree.bind(node));
|
||||||
|
|
Loading…
Reference in a new issue