Skip to content

Commit c5f0b98

Browse files
author
Liam Sherwin
committed
Temp UDP fix
1 parent 8bda518 commit c5f0b98

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

core/components/functions/CueList.gd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ var current_cue: Cue = null
3434
var last_cue: Cue = null
3535
var next_cue: Cue = null
3636

37+
38+
## Allowed parameters to changed when setting function intencity
39+
const _allowed_intensity_parameters: Array[String] = ["Dimmer"]
40+
3741
## The current mode of this cuelist. When in loop mode the cuelist will not reset fixtures to 0-value when looping back to the start
3842
enum MODE {NORMAL, LOOP}
3943
var _mode: int = MODE.NORMAL
@@ -71,6 +75,7 @@ var last_triggered_keyframe: int = -1
7175
## Used to determin if a force reload from the start should happen, used when a cue is added, removed, moved, or edited
7276
var force_reload: bool = false
7377

78+
## Autoplay state
7479
var _autoplay: bool = false
7580

7681

@@ -320,7 +325,7 @@ func _reset_animated_fixtures(animator: Animator, accumulated_animated_data: Dic
320325
animating_fixture.fixture.set_parameter(
321326
animating_fixture.parameter,
322327
animating_fixture.function,
323-
new_value * _intensity,
328+
new_value * (_intensity if animating_fixture.parameter in _allowed_intensity_parameters else 1.0),
324329
uuid,
325330
animating_fixture.zone
326331
),
@@ -360,27 +365,22 @@ func _accumulate_state(cue: Cue, accumulated_animated_data: Dictionary, animator
360365
var value_config: Dictionary = fixture_data[fixture][zone][parameter]
361366
var from_value: float = fixture.get_current_value(zone, parameter, uuid, value_config.function)
362367
var to_value: Variant = value_config.value
363-
if parameter == "Zoom":
364-
print(from_value)
365-
print(to_value)
366-
print()
367368

368369
var animation_id: String = fixture.uuid + zone + parameter
369370
accumulated_animated_data[animation_id] = {
370371
"method": func (new_value: Variant) -> void:
371372
_current_animated_fixtures[animation_id].current_value = new_value
372-
if parameter == "Zoom":
373-
print(new_value * _intensity)
373+
374374
fixture.set_parameter(
375375
parameter,
376376
value_config.function,
377-
new_value * _intensity,
377+
new_value * (_intensity if parameter in _allowed_intensity_parameters else 1.0),
378378
uuid,
379379
zone
380380
),
381-
"from": from_value * (2 - _intensity),
381+
"from": from_value * (2 - (_intensity if parameter in _allowed_intensity_parameters else 1.0)),
382382
"to": to_value,
383-
"current": from_value * (2 - _intensity),
383+
"current": from_value * (2 - (_intensity if parameter in _allowed_intensity_parameters else 1.0)),
384384
"can_fade": value_config.can_fade,
385385
"start": value_config.start,
386386
"stop": value_config.stop,
@@ -551,7 +551,7 @@ func set_intensity(p_intensity: float) -> void:
551551

552552
if _index != -1:
553553
for animated_fixture: Dictionary in _current_animated_fixtures.values():
554-
if not is_instance_valid(animated_fixture.animator) and animated_fixture.has("current_value"):
554+
if not is_instance_valid(animated_fixture.animator) and animated_fixture.has("current_value") and animated_fixture.parameter in _allowed_intensity_parameters:
555555
var fixture: Fixture = animated_fixture.fixture
556556

557557
if fixture.function_can_fade(animated_fixture.zone, animated_fixture.parameter, animated_fixture.function):

core/engine/Server.gd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ var udp_frequency: float = 1.0 / 45.0 # 1 second divided by 45
1717
## Disables signal emissions to clients
1818
var disable_signals: bool = false
1919

20+
## Dissables the use of the high frequency UDP socket
21+
var dissable_high_frequency: bool = true
22+
2023

2124
## Used as an internal refernce for timing call_interval correctly
2225
var _accumulated_time: float = 0.0
@@ -140,7 +143,7 @@ func add_networked_object(object_name: String, object: Object, delete_signal: Si
140143

141144
var object_signal: Signal = object.get(object_signal_dict.name)
142145

143-
if object_signal in object_network_config.high_frequency_signals:
146+
if object_signal in object_network_config.high_frequency_signals and not dissable_high_frequency:
144147
_networked_object_callbacks[object_name].signals[object_signal] = func (arg1: Variant = null, arg2: Variant = null, arg3: Variant = null, arg4: Variant = null, arg5: Variant = null, arg6: Variant = null, arg7: Variant = null, arg8: Variant = null):
145148
if disable_signals:
146149
return

0 commit comments

Comments
 (0)