Skip to content

Commit

Permalink
Handle new PsyNet IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
tfausak committed May 25, 2019
1 parent 1b70f2c commit abc1aba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Rattletrap/Decode/RemoteId.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ decodeRemoteIdBits version systemId = case word8leValue systemId of
2 -> RemoteIdPlayStation <$> decodePsName <*> decodePsBytes version
4 -> RemoteIdXbox <$> decodeWord64leBits
6 -> RemoteIdSwitch <$> decodeBitstreamBits 256
7 -> RemoteIdPsyNet <$> decodeBitstreamBits 256
7 -> RemoteIdPsyNet
<$> decodeBitstreamBits (if version >= (868, 24, 10) then 64 else 256)
_ -> fail ("unknown system id " <> show systemId)

decodePsName :: DecodeBits Text.Text
Expand Down
Binary file added replays/c23b.replay
Binary file not shown.
1 change: 1 addition & 0 deletions tests/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ replays =
, ("afb1", "patch 1.37")
, ("b9f9", "a party leader")
, ("c14f", "some mutators")
, ("c23b", "new psynet id")
, ("c837", "a spectator")
, ("cc4c", "after Starbase ARC")
, ("d044", "hoops mutators")
Expand Down

0 comments on commit abc1aba

Please sign in to comment.