Skip to content

Commit

Permalink
Merge pull request #20 from w3champions/1.33
Browse files Browse the repository at this point in the history
1.33 support
  • Loading branch information
fluxxu authored Aug 16, 2022
2 parents 6e8c49d + f11b9f3 commit 03032a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/lan/src/mdns/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const REG_TYPE: &str = "_blizzard._udp,_w3xp2730";
const REG_TYPE: &str = "_blizzard._udp,_w3xp2731";

pub mod publisher;
pub mod search;
17 changes: 10 additions & 7 deletions crates/w3map/src/checksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ impl MapChecksum {
let mut xoro = XoroHasher::new();

let files: &[&[&str]] = &[
&["war3map.j", "scripts\\war3map.j", "war3map.lua"],
&[
"war3map.j",
"scripts\\war3map.j",
"war3map.lua",
"scripts\\war3map.lua",
],
&["war3map.w3e"],
&["war3map.wpm"],
&["war3map.doo"],
Expand All @@ -64,12 +69,10 @@ impl MapChecksum {
if i == 0 {
xoro.update(&bytes);
} else {
for chunk in bytes.chunks(0x400) {
if chunk.len() == 0x400 {
xoro.update(chunk);
xoro.0 = XoroHasher::rol3(xoro.0);
}
}
let mut h = XoroHasher::new();
h.update(&bytes);
let v = h.finalize();
xoro.update(&v.to_le_bytes());
}
found = true;
break;
Expand Down

0 comments on commit 03032a2

Please sign in to comment.