Phase 7: netfox + godot-jolt stack upgrade
Stack installed: - netfox v1.35.3 (core + extras + noray + internals) - godot-jolt v0.16.0-stable Architecture: - Server: ENet transport (works headless, no netfox deps) - Client/Editor: netfox rollback (RollbackSynchronizer, TickInterpolator) New/modified: - docs/migration-netfox-plan.md — migration architecture - scripts/network/network_manager.gd — netfox-aware ENet fallback - scripts/network/player.gd — clean base player - client/characters/player_netfox.gd — rollback player w/ WeaponManager - client/characters/input/player_net_input.gd — BaseNetInput subclass - client/characters/character/fps_character_controller.gd — netfox input feed - client/weapons/ — weapon data, registry, TacticalWeaponHitscan, WeaponManager - client/scripts/round_replicator.gd — client-side round state bridge - server/scripts/round_manager.gd — improved state machine - server/scripts/plugin_api/plugin_manager.gd — refined plugin system - config: enemy_tag, ally_tag for meatball targeting Removed: old C++ SimulationServer GDExtension (replaced by netfox rollback)
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
extends Object
|
||||
|
||||
class PhysicsDriverToggle:
|
||||
const INACTIVE_SUFFIX := ".off"
|
||||
|
||||
func get_name() -> String:
|
||||
return "???"
|
||||
|
||||
func get_files() -> Array[String]:
|
||||
return []
|
||||
|
||||
func get_error_messages() -> Array[String]:
|
||||
return []
|
||||
|
||||
func is_enabled() -> bool:
|
||||
return get_files().any(func(it): return FileAccess.file_exists(it))
|
||||
|
||||
func toggle() -> Array[String]:
|
||||
var errors := get_error_messages()
|
||||
if not errors.is_empty():
|
||||
return errors
|
||||
|
||||
var enable := not is_enabled()
|
||||
|
||||
var uid_files := get_files().map(func(it): return it + ".uid")
|
||||
var renames = (get_files() + uid_files).map(func(it):
|
||||
if enable: return [it + INACTIVE_SUFFIX, it]
|
||||
else: return [it, it + INACTIVE_SUFFIX]
|
||||
)
|
||||
|
||||
for rename in renames:
|
||||
var result := DirAccess.rename_absolute(rename[0], rename[1])
|
||||
if result != OK:
|
||||
errors.append(
|
||||
"Failed rename \"%s\" -> \"%s\"; reason: %s" %
|
||||
[rename[0], rename[1], error_string(result)]
|
||||
)
|
||||
return errors
|
||||
|
||||
class Rapier2DPhysicsDriverToggle extends PhysicsDriverToggle:
|
||||
func get_name() -> String:
|
||||
return "Rapier2D"
|
||||
|
||||
func get_files() -> Array[String]:
|
||||
return [
|
||||
"res://addons/netfox.extras/physics/rapier_driver_2d.gd",
|
||||
]
|
||||
|
||||
func get_error_messages() -> Array[String]:
|
||||
if not ClassDB.class_exists("RapierPhysicsServer2D"):
|
||||
return ["Rapier physics is not available! Is the extension installed?"]
|
||||
return []
|
||||
|
||||
class Rapier3DPhysicsDriverToggle extends PhysicsDriverToggle:
|
||||
func get_name() -> String:
|
||||
return "Rapier3D"
|
||||
|
||||
func get_files() -> Array[String]:
|
||||
return [
|
||||
"res://addons/netfox.extras/physics/rapier_driver_3d.gd",
|
||||
]
|
||||
|
||||
func get_error_messages() -> Array[String]:
|
||||
if not ClassDB.class_exists("RapierPhysicsServer3D"):
|
||||
return ["Rapier physics is not available! Is the extension installed?"]
|
||||
return []
|
||||
|
||||
class GodotPhysicsDriverToggle extends PhysicsDriverToggle:
|
||||
func get_name() -> String:
|
||||
return "Godot"
|
||||
|
||||
func get_files() -> Array[String]:
|
||||
return [
|
||||
"res://addons/netfox.extras/physics/godot_driver_3d.gd",
|
||||
"res://addons/netfox.extras/physics/godot_driver_2d.gd"
|
||||
]
|
||||
|
||||
func get_error_messages() -> Array[String]:
|
||||
if not PhysicsServer3D.has_method("space_step") or not PhysicsServer2D.has_method("space_step"):
|
||||
return ["Physics stepping is not available! Is this the right Godot build?"]
|
||||
return []
|
||||
|
||||
static func all() -> Array[PhysicsDriverToggle]:
|
||||
return [
|
||||
Rapier2DPhysicsDriverToggle.new(),
|
||||
Rapier3DPhysicsDriverToggle.new(),
|
||||
GodotPhysicsDriverToggle.new()
|
||||
]
|
||||
Reference in New Issue
Block a user