Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleyrs committed Jul 14, 2024
1 parent cf6e6d3 commit dc2ba21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/public/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -54119,6 +54119,7 @@ async function preloadClientAsync() {
];
for (let i = 0; i < allMaps.length; i++) {
const name = allMaps[i];
console.log(name);
const map = new Uint8Array(await (await fetch(`data/pack/client/maps/${name}`)).arrayBuffer());
const crc = Packet.getcrc(map, 0, map.length);
PRELOADED.set(name, map);
Expand Down Expand Up @@ -54310,6 +54311,7 @@ async function preloadClientAsync() {
];
for (let i = 0; i < allSongs.length; i++) {
const name = allSongs[i];
console.log(name);
const song = new Uint8Array(await (await fetch(`data/pack/client/songs/${name}`)).arrayBuffer());
const crc = Packet.getcrc(song, 0, song.length);
PRELOADED.set(name, song);
Expand Down Expand Up @@ -54367,6 +54369,7 @@ async function preloadClientAsync() {
];
for (let i = 0; i < allJingles.length; i++) {
const name = allJingles[i];
console.log(name);
const jingle = new Uint8Array(await (await fetch(`data/pack/client/jingles/${name}`)).arrayBuffer()).subarray(4);
const crc = Packet.getcrc(jingle, 0, jingle.length);
PRELOADED.set(name, jingle);
Expand Down Expand Up @@ -64182,6 +64185,7 @@ class GameMap {
'm53_53'
];
for (let index = 0; index < maps.length; index++) {
console.log('init ', maps[index]);
const [mx, mz] = maps[index].substring(1).split('_').map(Number);
const mapsquareX = mx << 6;
const mapsquareZ = mz << 6;
Expand Down

0 comments on commit dc2ba21

Please sign in to comment.