Skip to content

Commit

Permalink
Make sure on_snap is called for all snap types
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Aug 24, 2024
1 parent 7742030 commit 081facf
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/on_system.asm
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,39 @@ on_system_msg_snap:
; on_system_msg_snap [rax]
; rax = message payload

; game tick
call get_int
mov dword [ack_game_tick], eax

; delta tick
call get_int

; num parts
call get_int

; part
call get_int

; crc
call get_int

; part size
call get_int
mov rdi, rax

; data
call get_int

; there is no snapshot storage yet
; so we just claim there was no payload (SNAPEMPTY)
; when we get a partial snap

; data = nulltpr
mov rax, 0
; data size = 0
mov rdi, 0
call on_snap

jmp on_system_message_end

on_system_msg_snapempty:
Expand All @@ -79,6 +109,12 @@ on_system_msg_snapempty:
call get_int
mov dword [ack_game_tick], eax

; data = nulltpr
mov rax, 0
; data size = 0
mov rdi, 0
call on_snap

jmp on_system_message_end

on_system_msg_snapsingle:
Expand Down

0 comments on commit 081facf

Please sign in to comment.