@@ -42,7 +42,7 @@ static var _logger: _NetfoxLogger = _NetfoxLogger.for_netfox("NetworkPerformance
4242## ( see [method OS.is_debug_build] ). [br]
4343## Can be forced on with the [code]netfox_perf[/code] feature tag. [br]
4444## Can be forced off with the [code]netfox_noperf[/code] feature tag.
45- func is_enabled ():
45+ func is_enabled () -> bool :
4646 if OS .has_feature ("netfox_noperf" ):
4747 return false
4848
@@ -103,19 +103,19 @@ func get_sent_state_props_count() -> int:
103103func get_sent_state_props_ratio () -> float :
104104 return _sent_state_props / maxf (1. , _full_state_props )
105105
106- func push_full_state (state : Dictionary ):
106+ func push_full_state (state : Dictionary ) -> void :
107107 _full_state_props_accum += state .size ()
108108
109- func push_full_state_broadcast (state : Dictionary ):
109+ func push_full_state_broadcast (state : Dictionary ) -> void :
110110 _full_state_props_accum += state .size () * (multiplayer .get_peers ().size () - 1 )
111111
112- func push_sent_state (state : Dictionary ):
112+ func push_sent_state (state : Dictionary ) -> void :
113113 _sent_state_props_accum += state .size ()
114114
115- func push_sent_state_broadcast (state : Dictionary ):
115+ func push_sent_state_broadcast (state : Dictionary ) -> void :
116116 _sent_state_props_accum += state .size () * (multiplayer .get_peers ().size () - 1 )
117117
118- func _ready ():
118+ func _ready () -> void :
119119 if not is_enabled ():
120120 _logger .debug ("Network performance disabled" )
121121 return
@@ -141,14 +141,14 @@ func _ready():
141141 NetworkRollback .on_process_tick .connect (_on_rollback_tick )
142142 NetworkRollback .after_loop .connect (_after_rollback_loop )
143143
144- func _before_tick_loop ():
144+ func _before_tick_loop () -> void :
145145 _network_loop_start = _time ()
146146 _network_ticks_accum = 0
147147
148- func _on_network_tick (_dt , _t ):
148+ func _on_network_tick (_dt , _t ) -> void :
149149 _network_ticks_accum += 1
150150
151- func _after_tick_loop ():
151+ func _after_tick_loop () -> void :
152152 _network_loop_duration = _time () - _network_loop_start
153153 _network_ticks = _network_ticks_accum
154154
@@ -158,15 +158,15 @@ func _after_tick_loop():
158158 _sent_state_props = _sent_state_props_accum
159159 _sent_state_props_accum = 0
160160
161- func _before_rollback_loop ():
161+ func _before_rollback_loop () -> void :
162162 _rollback_loop_start = _time ()
163163 _rollback_ticks_accum = 0
164164 _rollback_nodes_simulated_accum = 0
165165
166- func _on_rollback_tick (_t ) :
166+ func _on_rollback_tick (_t : int ) -> void :
167167 _rollback_ticks_accum += 1
168168
169- func _after_rollback_loop ():
169+ func _after_rollback_loop () -> void :
170170 _rollback_loop_duration = _time () - _rollback_loop_start
171171 _rollback_ticks = _rollback_ticks_accum
172172 _rollback_nodes_simulated = _rollback_nodes_simulated_accum
0 commit comments