Compare commits
No commits in common. "42c95820d7acf51565ad9bc12136259a614d306c" and "babae34458b55d8df95752a22952877c0d722434" have entirely different histories.
42c95820d7
...
babae34458
17 changed files with 34 additions and 164 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Theme" load_steps=35 format=3 uid="uid://dxnkvosdhpvwi"]
|
||||
[gd_resource type="Theme" load_steps=23 format=3 uid="uid://dxnkvosdhpvwi"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0f6i3"]
|
||||
bg_color = Color(0.15686275, 0.26666668, 0.41568628, 1)
|
||||
|
|
@ -116,52 +116,6 @@ corner_radius_top_right = 5
|
|||
bg_color = Color(0.17252281, 0.819067, 0.3901327, 1)
|
||||
corner_radius_top_right = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jqgtl"]
|
||||
bg_color = Color(0.027450977, 0.5142647, 0.84705883, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bjvl4"]
|
||||
bg_color = Color(0.19999999, 0.6981582, 0.9137255, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_600w1"]
|
||||
bg_color = Color(0.027450977, 0.5142647, 0.84705883, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_gaobj"]
|
||||
content_margin_left = 5.0
|
||||
content_margin_top = 5.0
|
||||
content_margin_right = 5.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.15686275, 0.26666668, 0.41568628, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nv6t3"]
|
||||
bg_color = Color(0.027450977, 0.37015864, 0.84705883, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_eff20"]
|
||||
bg_color = Color(0.19999999, 0.6981582, 0.9137255, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_axncs"]
|
||||
bg_color = Color(0.106433235, 0.18161754, 0.32349485, 1)
|
||||
border_width_bottom = 5
|
||||
|
|
@ -214,13 +168,6 @@ border_width_right = 4
|
|||
border_width_bottom = 4
|
||||
border_color = Color(0.15686275, 0.26666668, 0.41568628, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_67t17"]
|
||||
bg_color = Color(0.027450977, 0.5142647, 0.84705883, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wlpk7"]
|
||||
content_margin_left = 5.0
|
||||
content_margin_top = 5.0
|
||||
|
|
@ -251,45 +198,6 @@ border_color = Color(0.08210841, 0.3142104, 0.6561392, 1)
|
|||
corner_radius_top_left = 2
|
||||
corner_radius_top_right = 2
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cqecq"]
|
||||
bg_color = Color(0.027450977, 0.5142647, 0.84705883, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s00gw"]
|
||||
bg_color = Color(0.19999999, 0.6981582, 0.9137255, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w0lbt"]
|
||||
bg_color = Color(0.027450977, 0.37015864, 0.84705883, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hd7qi"]
|
||||
bg_color = Color(0.19999999, 0.6981582, 0.9137255, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cn8il"]
|
||||
content_margin_left = 5.0
|
||||
content_margin_top = 5.0
|
||||
content_margin_right = 5.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.15686275, 0.26666668, 0.41568628, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[resource]
|
||||
AcceptDialog/styles/panel = SubResource("StyleBoxFlat_0f6i3")
|
||||
Button/styles/disabled = SubResource("StyleBoxFlat_6ioqn")
|
||||
|
|
@ -305,13 +213,6 @@ FoldableContainer/styles/title_panel = SubResource("StyleBoxFlat_etupa")
|
|||
HPBar/base_type = &"ProgressBar"
|
||||
HPBar/styles/background = SubResource("StyleBoxFlat_7cwyu")
|
||||
HPBar/styles/fill = SubResource("StyleBoxFlat_1wn1r")
|
||||
HScrollBar/styles/grabber = SubResource("StyleBoxFlat_jqgtl")
|
||||
HScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_bjvl4")
|
||||
HScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_600w1")
|
||||
HScrollBar/styles/scroll = SubResource("StyleBoxFlat_gaobj")
|
||||
HSlider/styles/grabber_area = SubResource("StyleBoxFlat_nv6t3")
|
||||
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxFlat_eff20")
|
||||
HSlider/styles/slider = SubResource("StyleBoxFlat_gaobj")
|
||||
LineEdit/styles/normal = SubResource("StyleBoxFlat_axncs")
|
||||
LineEdit/styles/read_only = SubResource("StyleBoxFlat_jungl")
|
||||
MarginContainer/constants/margin_bottom = 4
|
||||
|
|
@ -323,8 +224,6 @@ PanelContainer/styles/panel = SubResource("StyleBoxFlat_4fp8c")
|
|||
PopupMenu/styles/hover = SubResource("StyleBoxFlat_jrpol")
|
||||
PopupMenu/styles/panel = SubResource("StyleBoxFlat_81epl")
|
||||
PopupPanel/styles/panel = SubResource("StyleBoxFlat_vxwtt")
|
||||
ProgressBar/styles/background = SubResource("StyleBoxFlat_gaobj")
|
||||
ProgressBar/styles/fill = SubResource("StyleBoxFlat_67t17")
|
||||
TabContainer/styles/panel = SubResource("StyleBoxFlat_4fp8c")
|
||||
TabContainer/styles/tab_disabled = SubResource("StyleBoxFlat_wlpk7")
|
||||
TabContainer/styles/tab_hovered = SubResource("StyleBoxFlat_doivh")
|
||||
|
|
@ -333,12 +232,5 @@ TabContainer/styles/tab_unselected = SubResource("StyleBoxFlat_078gm")
|
|||
TabContainer/styles/tabbar_background = SubResource("StyleBoxFlat_0f6i3")
|
||||
TextEdit/styles/normal = SubResource("StyleBoxFlat_axncs")
|
||||
TextEdit/styles/read_only = SubResource("StyleBoxFlat_jungl")
|
||||
VScrollBar/styles/grabber = SubResource("StyleBoxFlat_cqecq")
|
||||
VScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_s00gw")
|
||||
VScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_cqecq")
|
||||
VScrollBar/styles/scroll = SubResource("StyleBoxFlat_gaobj")
|
||||
VSlider/styles/grabber_area = SubResource("StyleBoxFlat_w0lbt")
|
||||
VSlider/styles/grabber_area_highlight = SubResource("StyleBoxFlat_hd7qi")
|
||||
VSlider/styles/slider = SubResource("StyleBoxFlat_cn8il")
|
||||
Window/styles/embedded_border = SubResource("StyleBoxFlat_0f6i3")
|
||||
Window/styles/embedded_unfocused_border = SubResource("StyleBoxFlat_0f6i3")
|
||||
|
|
|
|||
|
|
@ -12472,7 +12472,7 @@ properties/1/path = NodePath("PlayerInput:compressed_states")
|
|||
properties/1/spawn = true
|
||||
properties/1/replication_mode = 1
|
||||
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("weapon_models") groups=["Player"]]
|
||||
[node name="Player" type="CharacterBody3D" node_paths=PackedStringArray("weapon_models")]
|
||||
collision_layer = 2
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_l07l8")
|
||||
|
|
@ -13675,7 +13675,6 @@ offset_top = -0.2800293
|
|||
offset_right = -0.32000732
|
||||
grow_vertical = 0
|
||||
mouse_filter = 2
|
||||
theme_type_variation = &"HPBar"
|
||||
step = 1.0
|
||||
value = 100.0
|
||||
fill_mode = 3
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ const WALK: int = 0b100
|
|||
signal jumped
|
||||
signal drop
|
||||
signal switch_weapon(to_slot: StringName)
|
||||
signal fire_begin(timestamp: float)
|
||||
signal fire_end(timestamp: float)
|
||||
signal fire_begin
|
||||
signal fire_end
|
||||
signal alternate_state
|
||||
signal switch_firemode
|
||||
signal reload
|
||||
|
|
@ -53,9 +53,9 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||
switch_on_server.rpc_id(1,"knife")
|
||||
|
||||
if event.is_action_pressed("plr_fire"):
|
||||
fire_on_server.rpc_id(1,false,Rewind.timestamp)
|
||||
fire_on_server.rpc_id(1,false)
|
||||
if event.is_action_released("plr_fire"):
|
||||
fire_on_server.rpc_id(1,true,Rewind.timestamp)
|
||||
fire_on_server.rpc_id(1,true)
|
||||
if event.is_action_pressed("plr_scope"):
|
||||
alternate_state_on_server.rpc_id(1)
|
||||
if event.is_action_pressed("plr_firemode"):
|
||||
|
|
@ -126,12 +126,12 @@ func drop_on_server() -> void:
|
|||
drop.emit()
|
||||
|
||||
@rpc("authority","call_local","reliable")
|
||||
func fire_on_server(end: bool, timestamp: float) -> void:
|
||||
func fire_on_server(end: bool) -> void:
|
||||
if not multiplayer.is_server(): return
|
||||
if end:
|
||||
fire_end.emit(timestamp)
|
||||
fire_end.emit()
|
||||
else:
|
||||
fire_begin.emit(timestamp)
|
||||
fire_begin.emit()
|
||||
|
||||
@rpc("authority","call_local","reliable")
|
||||
func alternate_state_on_server() -> void:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ Registry="*res://systems/registry.gd"
|
|||
Shop="*res://gui/buy_menu/shop.gd"
|
||||
MouseConfiner="*res://gui/mouse_confiner.gd"
|
||||
AutoUpdate="*res://systems/auto_update.gd"
|
||||
Rewind="*res://systems/rewind.gd"
|
||||
|
||||
[debug]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
extends Node
|
||||
|
||||
const timestamp_range:float = 200.0 #MSEC
|
||||
const timestamps_amount: int = 200
|
||||
|
||||
var timestamp: float = 0
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if not is_multiplayer_authority():
|
||||
return
|
||||
if Session.session_started_flag:
|
||||
timestamp += delta
|
||||
sync_time.rpc(timestamp)
|
||||
|
||||
@rpc
|
||||
func sync_time(new_timestamp: float) -> void:
|
||||
timestamp = new_timestamp
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://bafcih3g8gi2q
|
||||
|
|
@ -8,23 +8,23 @@ signal return_to_previous
|
|||
|
||||
var machine: WeaponSubStateMachine
|
||||
|
||||
func _use_begin(timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
pass
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func use_begin(timestamp: float) -> void:
|
||||
_use_begin(timestamp)
|
||||
func use_begin() -> void:
|
||||
_use_begin()
|
||||
if is_multiplayer_authority():
|
||||
use_begin.rpc(timestamp)
|
||||
use_begin.rpc()
|
||||
|
||||
func _use_end(timestamp: float):
|
||||
func _use_end():
|
||||
pass
|
||||
|
||||
@rpc("authority","call_remote","reliable")
|
||||
func use_end(timestamp: float) -> void:
|
||||
_use_end(timestamp)
|
||||
func use_end() -> void:
|
||||
_use_end()
|
||||
if is_multiplayer_authority():
|
||||
use_end.rpc(timestamp)
|
||||
use_end.rpc()
|
||||
|
||||
func _alternate_state() -> void:
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -70,12 +70,12 @@ func _enter() -> void:
|
|||
func _exit() -> void:
|
||||
super()
|
||||
|
||||
func use_begin(timestamp: float) -> void:
|
||||
func use_begin() -> void:
|
||||
if current_state != null:
|
||||
current_state.use_begin(timestamp)
|
||||
func use_end(timestamp: float) -> void:
|
||||
current_state.use_begin()
|
||||
func use_end() -> void:
|
||||
if current_state != null:
|
||||
current_state.use_end(timestamp)
|
||||
current_state.use_end()
|
||||
func alternate_state() -> void:
|
||||
if current_state != null:
|
||||
current_state.alternate_state()
|
||||
|
|
|
|||
|
|
@ -218,17 +218,17 @@ func _physics_process(delta: float) -> void:
|
|||
return
|
||||
current_state.physics_update(delta)
|
||||
|
||||
func use_begin(timestamp: float) -> void:
|
||||
func use_begin() -> void:
|
||||
if not multiplayer.is_server() or Session.round_state == Session.ROUND_STATES.BUY or disabled:
|
||||
return
|
||||
if current_state != null:
|
||||
current_state.use_begin(timestamp)
|
||||
current_state.use_begin()
|
||||
|
||||
func use_end(timestamp: float) -> void:
|
||||
func use_end() -> void:
|
||||
if not multiplayer.is_server() or Session.round_state == Session.ROUND_STATES.BUY or disabled:
|
||||
return
|
||||
if current_state != null:
|
||||
current_state.use_end(timestamp)
|
||||
current_state.use_end()
|
||||
|
||||
func alternate_state() -> void:
|
||||
if not multiplayer.is_server() or Session.round_state == Session.ROUND_STATES.BUY or disabled:
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ func _enter() -> void:
|
|||
func _exit() -> void:
|
||||
pass
|
||||
|
||||
func _use_begin(_timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
if Session.is_on_site(machine.player.player_id):
|
||||
transition.emit("Plant")
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ func on_animation_finished(animation: StringName):
|
|||
machine.ammo -= 1
|
||||
return_to_previous.emit()
|
||||
|
||||
func use_end(_timestamp: float) -> void:
|
||||
func use_end() -> void:
|
||||
if is_multiplayer_authority() == false:
|
||||
return
|
||||
transition.emit("Idle")
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ func _exit() -> void:
|
|||
if is_multiplayer_authority():
|
||||
machine.player.get_node("PlayerInput").reload.disconnect(init_reload)
|
||||
|
||||
func _use_begin(timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
if machine.ammo > 0:
|
||||
transition.emit("Shoot")
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ extends WeaponState
|
|||
@export var fire_timer: Timer
|
||||
|
||||
var bullets_shot: int = 0
|
||||
var cached_timestamp: float = 0
|
||||
|
||||
func _enter() -> void:
|
||||
fire()
|
||||
|
|
@ -28,10 +27,9 @@ func on_animation_finished(animation):
|
|||
if animation == machine.animation_prefix + with_morphems("shoot"):
|
||||
transition.emit("Idle")
|
||||
|
||||
func _use_begin(timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
if fire_timer.time_left > 0:
|
||||
return
|
||||
cached_timestamp = timestamp
|
||||
fire()
|
||||
|
||||
func fire() -> void:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ func on_animation_finished(animation):
|
|||
if animation == machine.animation_prefix + with_morphems("shoot"):
|
||||
transition.emit("Idle")
|
||||
|
||||
func _use_begin(timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
if fire_timer.time_left > 0:
|
||||
return
|
||||
fire()
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ func on_animation_finished(animation):
|
|||
attack()
|
||||
machine.animation_player.play(machine.animation_prefix + "attack")
|
||||
|
||||
func _use_begin(_timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
end_it = false
|
||||
|
||||
func _use_end(_timestamp: float) -> void:
|
||||
func _use_end() -> void:
|
||||
end_it = true
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ func _enter() -> void:
|
|||
func _exit() -> void:
|
||||
pass
|
||||
|
||||
func _use_begin(_timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
transition.emit("Attack")
|
||||
|
||||
func _alternate_state() -> void:
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ func _enter() -> void:
|
|||
func _exit() -> void:
|
||||
pass
|
||||
|
||||
func _use_begin(timestamp: float) -> void:
|
||||
func _use_begin() -> void:
|
||||
if machine.ammo > 0:
|
||||
transition.emit("Throw")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue