aboutsummaryrefslogtreecommitdiff
path: root/client/game.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/game.gd')
-rw-r--r--client/game.gd7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/game.gd b/client/game.gd
index 4e0bfe52..b6646407 100644
--- a/client/game.gd
+++ b/client/game.gd
@@ -33,6 +33,7 @@ var tile_collide: Array = []
var tile_interact: Array = []
var map_names: Array = []
var in_lobby := false
+var is_replay := false
var is_joined := false
var join_sent := false
@@ -53,6 +54,7 @@ func _ready():
if !Global.on_vulkan():
environment.environment.tonemap_exposure = 0.5
+ mp.replay_start.connect(func(): is_replay = true)
mp.connection_closed.connect(func(reason: String):
Global.error_message = reason;
get_parent().replace_menu("res://menu/error.tscn")
@@ -249,11 +251,12 @@ func _process(delta):
marker.position = Global.interpolate(marker.position, marker_target, delta * 30.)
update_center()
+ if is_replay: mp.send_replay_tick(delta)
+
if Global.get_setting("debug_info"):
debug_label.show()
debug_label.text = "%d FPS" % Engine.get_frames_per_second()
- else:
- debug_label.hide()
+ else: debug_label.hide()
func get_tile_collision(pos: Vector2i) -> bool:
var t = map.get_tile_name(pos)