forked from woofmeow/straywild
Add gathering, unified inventory, and real-time world
This commit is contained in:
parent
173371e6fc
commit
fa57edca83
113 changed files with 6700 additions and 1307 deletions
|
|
@ -45,20 +45,16 @@ func _on_session_state_changed(state: NetworkSession.State) -> void:
|
|||
_sequence = 0
|
||||
_last_received_sequence = -1
|
||||
_sync_elapsed = 0.0
|
||||
_world_time.set_persistence_tracking_enabled(true)
|
||||
_world_time.begin_session(
|
||||
_world_time.get_persistent_time_hours()
|
||||
)
|
||||
_world_time.begin_authoritative_session()
|
||||
return
|
||||
if state == NetworkSession.State.JOINED_CLIENT:
|
||||
_active_session_id = _session.get_session_id()
|
||||
_last_received_sequence = -1
|
||||
_sync_elapsed = 0.0
|
||||
_world_time.set_persistence_tracking_enabled(false)
|
||||
if _session.supports_server_capability(
|
||||
NetworkProtocol.WORLD_TIME_CAPABILITY
|
||||
):
|
||||
_world_time.begin_session()
|
||||
_world_time.begin_remote_session()
|
||||
else:
|
||||
_world_time.end_session()
|
||||
return
|
||||
|
|
@ -72,7 +68,6 @@ func _on_session_state_changed(state: NetworkSession.State) -> void:
|
|||
_sequence = 0
|
||||
_last_received_sequence = -1
|
||||
_sync_elapsed = 0.0
|
||||
_world_time.set_persistence_tracking_enabled(false)
|
||||
_world_time.end_session()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue