e7299b17e9
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)
29 lines
818 B
GDScript
29 lines
818 B
GDScript
extends _HistoryBuffer
|
|
class_name _PropertyHistoryBuffer
|
|
|
|
func get_snapshot(tick: int) -> _PropertySnapshot:
|
|
if _buffer.has(tick):
|
|
return _buffer[tick]
|
|
else:
|
|
return _PropertySnapshot.new()
|
|
|
|
func set_snapshot(tick: int, data) -> void:
|
|
if data is Dictionary:
|
|
var snapshot := _PropertySnapshot.from_dictionary(data)
|
|
super(tick, snapshot)
|
|
elif data is _PropertySnapshot:
|
|
super(tick, data)
|
|
else:
|
|
push_error("Data not a PropertSnapshot! %s" % [data])
|
|
|
|
func get_history(tick: int) -> _PropertySnapshot:
|
|
var snapshot = super(tick)
|
|
|
|
return snapshot if snapshot else _PropertySnapshot.new()
|
|
|
|
func trim(earliest_tick_to_keep: int = NetworkRollback.history_start) -> void:
|
|
super(earliest_tick_to_keep)
|
|
|
|
func merge(data: _PropertySnapshot, tick:int) -> void:
|
|
set_snapshot(tick, get_snapshot(tick).merge(data))
|