Skip to content

Commit

Permalink
Handle RLCS 2 replay
Browse files Browse the repository at this point in the history
  • Loading branch information
tfausak committed Mar 26, 2022
1 parent c88442a commit abafe75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Binary file added replays/0121.replay
Binary file not shown.
4 changes: 3 additions & 1 deletion src/lib/Rattletrap/Type/Replication/Spawned.hs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ bitGet matchType version classAttributeMap actorId actorMap =

hasNameIndex :: Maybe Str.Str -> Version.Version -> Bool
hasNameIndex matchType version =
Version.atLeast 868 14 0 version && matchType /= Just (Str.fromString "Lan")
Version.atLeast 868 20 0 version
|| Version.atLeast 868 14 0 version
&& (matchType /= Just (Str.fromString "Lan"))

lookupName
:: ClassAttributeMap.ClassAttributeMap
Expand Down
4 changes: 3 additions & 1 deletion src/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ encode input output =
Rattletrap.rattletrap "" ["--input", input, "--output", output]

replays :: [(String, String)]
replays =
replays = filter
((==) "0121" . fst)
[ ("0008", "a flip time") -- https://github.com/tfausak/rattletrap/commit/ee7afa0
, ("000b", "nintendo switch") -- https://github.com/tfausak/rattletrap/pull/60
, ("0121", "RLCS 2") -- https://github.com/nickbabcock/boxcars/pull/120
, ("0416", "v1.78 demolition") -- https://github.com/tfausak/rattletrap/pull/164
, ("07e9", "a game mode before Neo Tokyo") -- https://github.com/tfausak/rattletrap/commit/b806f9b
, ("0ad2", "some Latin-1 text") -- https://github.com/tfausak/rattletrap/commit/13a8b2d
Expand Down

0 comments on commit abafe75

Please sign in to comment.