Skip to content

Commit

Permalink
Update chat.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Jun 29, 2024
1 parent 4070235 commit 06a271d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/controllers/subsystem/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ SUBSYSTEM_DEF(chat)
/// Assosciates a ckey with their next sequence number.
var/list/client_to_sequence_number = list()

/// Keeps track of resends to see how often chat bugs out
var/resends = 0

/datum/controller/subsystem/chat/stat_entry(msg)
msg = "Messages resent: [resends]"
return ..()

/datum/controller/subsystem/chat/proc/generate_payload(client/target, message_data)
var/sequence = client_to_sequence_number[target.ckey]
client_to_sequence_number[target.ckey] += 1
Expand Down Expand Up @@ -85,4 +92,5 @@ SUBSYSTEM_DEF(chat)
return

payload.resends += 1
resends += 1
send_payload_to_client(client, client_history[sequence])

0 comments on commit 06a271d

Please sign in to comment.