From 553f8ea77adb8c281aef6767066513ed7a8c987b Mon Sep 17 00:00:00 2001 From: Rendo Date: Wed, 10 Dec 2025 12:31:22 +0500 Subject: [PATCH] idk --- environments/prototype_environment.tres | 2 +- project.godot | 1 - systems/weapon_system/weapon_system.gd | 11 +++-- textures/icons/icons.svg.import | 43 +++++++++++++++++++ weapons/molikman/molik/molikman_molik.tscn | 1 + .../molikman/molik/molikman_molotov_fire.tscn | 2 +- weapons/molikman/molik/throw.gd | 2 +- 7 files changed, 55 insertions(+), 7 deletions(-) create mode 100644 textures/icons/icons.svg.import diff --git a/environments/prototype_environment.tres b/environments/prototype_environment.tres index 30a9da2..3f305ad 100644 --- a/environments/prototype_environment.tres +++ b/environments/prototype_environment.tres @@ -14,6 +14,6 @@ background_mode = 2 sky = SubResource("Sky_hb4cm") ambient_light_color = Color(1, 1, 1, 1) tonemap_mode = 3 +ssr_enabled = true ssao_enabled = true -volumetric_fog_enabled = true volumetric_fog_density = 0.0 diff --git a/project.godot b/project.godot index dd05719..50b02ba 100644 --- a/project.godot +++ b/project.godot @@ -24,7 +24,6 @@ PlayerGlobal="*res://players/player/player_global.gd" Lobby="*res://multiplayer/lobby.gd" Session="*res://multiplayer/session.gd" ClientSettings="*res://gui/client_settings/client_settings.gd" -ClientSettingsMenu="res://gui/client_settings/client_settings.tscn" Registry="*res://systems/registry.gd" Shop="*res://gui/buy_menu/shop.gd" diff --git a/systems/weapon_system/weapon_system.gd b/systems/weapon_system/weapon_system.gd index 52743e3..011e89e 100644 --- a/systems/weapon_system/weapon_system.gd +++ b/systems/weapon_system/weapon_system.gd @@ -81,7 +81,6 @@ func get_empty_ability_slot() -> StringName: return "ability_third" return "ability_first" -@rpc("authority","call_remote","reliable") func switch(to: StringName, exit: bool = true): if slots.has(to) == false or slots[to] == null or slots[to] == current_state or (multiplayer.get_remote_sender_id() != 1 and is_multiplayer_authority() == false): return @@ -96,8 +95,6 @@ func switch(to: StringName, exit: bool = true): ammo_updated.emit(current_state.ammo,current_state.remaining_ammo) switched_to.emit(current_state) - if is_multiplayer_authority(): - switch.rpc(to,exit) func return_to_previous(exit: bool = true): if last_slot != "": @@ -143,9 +140,17 @@ func check_for_empty() -> void: return_to_previous(false) child.queue_free() + func on_ammo_updated() -> void: + if is_multiplayer_authority() == false: + return if current_state != null: ammo_updated.emit(current_state.ammo,current_state.remaining_ammo) + remote_ammo_update.rpc(current_state.ammo,current_state.remaining_ammo) + +@rpc +func remote_ammo_update(ammo: int, remaining_ammo: int): + ammo_updated.emit(ammo,remaining_ammo) func disable() -> void: disabled = true diff --git a/textures/icons/icons.svg.import b/textures/icons/icons.svg.import new file mode 100644 index 0000000..96b210a --- /dev/null +++ b/textures/icons/icons.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddplpvk2pofd" +path="res://.godot/imported/icons.svg-47acad6a566121ffe50321daf77bf9e3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/icons/icons.svg" +dest_files=["res://.godot/imported/icons.svg-47acad6a566121ffe50321daf77bf9e3.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/weapons/molikman/molik/molikman_molik.tscn b/weapons/molikman/molik/molikman_molik.tscn index 23ef48f..4549b31 100644 --- a/weapons/molikman/molik/molikman_molik.tscn +++ b/weapons/molikman/molik/molikman_molik.tscn @@ -20,6 +20,7 @@ registry_entry = &"mm_molik" visibility_target = &"sp" max_ammo = 3 ammo_mags = 0 +speed_modifier = 0.9 can_be_previous = false destroy_when_empty = true enter_state = NodePath("Intro") diff --git a/weapons/molikman/molik/molikman_molotov_fire.tscn b/weapons/molikman/molik/molikman_molotov_fire.tscn index 882f17d..404e7b5 100644 --- a/weapons/molikman/molik/molikman_molotov_fire.tscn +++ b/weapons/molikman/molik/molikman_molotov_fire.tscn @@ -42,7 +42,7 @@ properties/0/replication_mode = 1 collision_layer = 8 collision_mask = 2 script = ExtResource("1_qokq0") -dps = 25.0 +dps = 33.333 damage_timer = NodePath("DamageTimer") [node name="Decal" type="Decal" parent="."] diff --git a/weapons/molikman/molik/throw.gd b/weapons/molikman/molik/throw.gd index 414d2e8..9a2e53a 100644 --- a/weapons/molikman/molik/throw.gd +++ b/weapons/molikman/molik/throw.gd @@ -26,4 +26,4 @@ func fire() -> void: var molotov: CharacterBody3D = molik.instantiate() Session.dynamic_objects_parent.add_child(molotov,true) molotov.global_transform = machine.player_camera.global_transform - molotov.velocity = -molotov.global_basis.z * 25 + molotov.velocity = -molotov.global_basis.z * 25 + machine.player.velocity