From bb96f252eabf7f0aa1a6a73a4390682579172df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20G=C3=A1lffy?= Date: Wed, 2 Sep 2026 18:33:22 +0200 Subject: [PATCH 1/2] fix(game): Don't update brawler material if not available --- .../scripts/brawler-controller.gd | 19 +++-- export_presets.cfg | 83 ++++++++----------- 2 files changed, 47 insertions(+), 55 deletions(-) diff --git a/examples/forest-brawl/scripts/brawler-controller.gd b/examples/forest-brawl/scripts/brawler-controller.gd index 16ea158c9..7facc3422 100644 --- a/examples/forest-brawl/scripts/brawler-controller.gd +++ b/examples/forest-brawl/scripts/brawler-controller.gd @@ -35,6 +35,9 @@ var gravity = ProjectSettings.get_setting(&"physics/3d/default_gravity") var respawn_tick: int = -1 var respawn_count: int = 0 +static func get_color_of(player_id: int) -> Color: + return Color.from_hsv((hash(player_id) % 256) / 256.0, 1.0, 1.0) + func register_hit(from: BrawlerController): if from == self: push_error("Player %s (#%s) trying to register hit on themselves!" % [player_name, player_id]) @@ -46,6 +49,16 @@ func register_hit(from: BrawlerController): func shove(motion: Vector3): move_and_collide(motion / mass) +func set_color(color: Color) -> void: + if not is_instance_valid(mesh): return + + var material: StandardMaterial3D = mesh.get_active_material(0) + if not is_instance_valid(material): return + + material = material.duplicate() + material.albedo_color = color + mesh.set_surface_override_material(0, material) + func _exit_tree(): GameEvents.on_brawler_despawn.emit(self) @@ -62,11 +75,7 @@ func _ready(): player_name = "Nameless Brawler #%s" % [player_id] # Set player color - var color = Color.from_hsv((hash(player_id) % 256) / 256.0, 1.0, 1.0) - var material: StandardMaterial3D = mesh.get_active_material(0) - material = material.duplicate() - material.albedo_color = color - mesh.set_surface_override_material(0, material) + set_color(get_color_of(player_id)) # Specify schema rollback_synchronizer.set_schema({ diff --git a/export_presets.cfg b/export_presets.cfg index f46f6b760..57bbdd033 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -1,7 +1,7 @@ [preset.0] name="Linux/X11" -platform="Linux" +platform="Linux/X11" runnable=true dedicated_server=false custom_features="" @@ -9,18 +9,10 @@ export_filter="all_resources" include_filter="" exclude_filter="" export_path="build/linux/netfox.x86_64" -patches=PackedStringArray() -patch_delta_encoding=false -patch_delta_compression_level_zstd=19 -patch_delta_min_reduction=0.1 -patch_delta_include_filters="*" -patch_delta_exclude_filters="" encryption_include_filters="" encryption_exclude_filters="" -seed=0 encrypt_pck=false encrypt_directory=false -script_export_mode=2 [preset.0.options] @@ -28,9 +20,10 @@ custom_template/debug="" custom_template/release="" debug/export_console_wrapper=2 binary_format/embed_pck=false -texture_format/s3tc_bptc=true -texture_format/etc2_astc=false -shader_baker/enabled=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false binary_format/architecture="x86_64" ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" @@ -44,13 +37,12 @@ unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +shader_baker/enabled=false dotnet/include_scripts_content=false dotnet/include_debug_symbols=true dotnet/embed_build_outputs=false -texture_format/bptc=true -texture_format/s3tc=true -texture_format/etc=false -texture_format/etc2=false [preset.1] @@ -63,18 +55,10 @@ export_filter="all_resources" include_filter="" exclude_filter="" export_path="build/windows/netfox.exe" -patches=PackedStringArray() -patch_delta_encoding=false -patch_delta_compression_level_zstd=19 -patch_delta_min_reduction=0.1 -patch_delta_include_filters="*" -patch_delta_exclude_filters="" encryption_include_filters="" encryption_exclude_filters="" -seed=0 encrypt_pck=false encrypt_directory=false -script_export_mode=2 [preset.1.options] @@ -82,9 +66,10 @@ custom_template/debug="" custom_template/release="" debug/export_console_wrapper=2 binary_format/embed_pck=false -texture_format/s3tc_bptc=true -texture_format/etc2_astc=false -shader_baker/enabled=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false binary_format/architecture="x86_64" codesign/enable=false codesign/timestamp=true @@ -103,9 +88,6 @@ application/product_name="" application/file_description="" application/copyright="" application/trademarks="" -application/export_angle=0 -application/export_d3d12=0 -application/d3d12_agility_sdk_multiarch=true ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" @@ -123,18 +105,20 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue Remove-Item -Recurse -Force '{temp_dir}'" +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +shader_baker/enabled=false +application/export_angle=0 +application/export_d3d12=0 +application/d3d12_agility_sdk_multiarch=true dotnet/include_scripts_content=false dotnet/include_debug_symbols=true dotnet/embed_build_outputs=false -texture_format/bptc=true -texture_format/s3tc=true -texture_format/etc=false -texture_format/etc2=false [preset.2] name="Edgegap Linux Server" -platform="Linux" +platform="Linux/X11" runnable=false dedicated_server=true custom_features="" @@ -145,18 +129,10 @@ customized_files={ include_filter="" exclude_filter="" export_path="build/edgegap-linux-server.x86_64" -patches=PackedStringArray() -patch_delta_encoding=false -patch_delta_compression_level_zstd=19 -patch_delta_min_reduction=0.1 -patch_delta_include_filters="*" -patch_delta_exclude_filters="" encryption_include_filters="" encryption_exclude_filters="" -seed=0 encrypt_pck=false encrypt_directory=false -script_export_mode=2 [preset.2.options] @@ -164,19 +140,26 @@ custom_template/debug="" custom_template/release="" debug/export_console_wrapper=2 binary_format/embed_pck=false -texture_format/s3tc_bptc=true -texture_format/etc2_astc=false -shader_baker/enabled=false +texture_format/bptc=true +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false binary_format/architecture="x86_64" ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" ssh_remote_deploy/port="22" ssh_remote_deploy/extra_args_ssh="" ssh_remote_deploy/extra_args_scp="" +ssh_remote_deploy/run_script="#!/usr/bin/env bash +export DISPLAY=:0 +unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\" +\"{temp_dir}/{exe_name}\" {cmd_args}" +ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash +kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\") +rm -rf \"{temp_dir}\"" +texture_format/s3tc_bptc=true +texture_format/etc2_astc=false +shader_baker/enabled=false dotnet/include_scripts_content=false dotnet/include_debug_symbols=true dotnet/embed_build_outputs=false -texture_format/bptc=true -texture_format/s3tc=true -texture_format/etc=false -texture_format/etc2=false From 3037327a240e7a428bbed419016e64cb577dd9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tam=C3=A1s=20G=C3=A1lffy?= Date: Wed, 2 Sep 2026 18:35:45 +0200 Subject: [PATCH 2/2] lint --- examples/forest-brawl/scripts/brawler-controller.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/forest-brawl/scripts/brawler-controller.gd b/examples/forest-brawl/scripts/brawler-controller.gd index 7facc3422..d07955b91 100644 --- a/examples/forest-brawl/scripts/brawler-controller.gd +++ b/examples/forest-brawl/scripts/brawler-controller.gd @@ -51,10 +51,10 @@ func shove(motion: Vector3): func set_color(color: Color) -> void: if not is_instance_valid(mesh): return - + var material: StandardMaterial3D = mesh.get_active_material(0) if not is_instance_valid(material): return - + material = material.duplicate() material.albedo_color = color mesh.set_surface_override_material(0, material)