diff --git a/gui/main_menu/main_menu.tscn b/gui/main_menu/main_menu.tscn index d9e85d1..9586ba1 100644 --- a/gui/main_menu/main_menu.tscn +++ b/gui/main_menu/main_menu.tscn @@ -200,9 +200,10 @@ script = ExtResource("3_6wy0j") layout_mode = 2 text = "Статус публичного IP:" -[node name="PublicIP" type="Label" parent="Lobby/HBoxContainer/HostMenu"] +[node name="PublicIP" type="LineEdit" parent="Lobby/HBoxContainer/HostMenu"] unique_name_in_owner = true layout_mode = 2 +editable = false script = ExtResource("3_qy2xc") [connection signal="pressed" from="MainMenu/VBoxContainer/HostButton" to="." method="_on_host_button_pressed"] diff --git a/multiplayer/ip_display.gd b/multiplayer/ip_display.gd index dcad586..a2fb581 100644 --- a/multiplayer/ip_display.gd +++ b/multiplayer/ip_display.gd @@ -1,4 +1,4 @@ -extends Label +extends LineEdit func on_update_ip(to: StringName): text = to diff --git a/systems/weapon_system/weapon_system.gd b/systems/weapon_system/weapon_system.gd index 611764e..43cc5cf 100644 --- a/systems/weapon_system/weapon_system.gd +++ b/systems/weapon_system/weapon_system.gd @@ -92,7 +92,8 @@ func switch(to: StringName, exit: bool = true): if exit: current_state._exit() if current_state.can_be_previous: - last_slot = slots.find_key(current_state) + var found = slots.find_key(current_state) + last_slot = found if found else "" current_state = slots[to] current_state._enter() @@ -119,7 +120,7 @@ func drop(weapon: WeaponSubStateMachine) -> void: dropped_weapon.weapon.ammo = weapon.ammo dropped_weapon.weapon.remaining_ammo = weapon.remaining_ammo dropped_weapon.weapon.slot = weapon.slot - Session.dynamic_objects_parent.add_child(dropped_weapon) + Session.dynamic_objects_parent.add_child(dropped_weapon,true) dropped_weapon.global_position = camera.global_position dropped_weapon.apply_central_impulse(-camera.global_basis.z * 10 + player.velocity)