Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lesleyrs committed Aug 1, 2024
1 parent cdd1c45 commit b9c14ec
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/js/mapview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ class MapView extends GameShell {

try {
console.log(`${Client.httpAddress}/worldmap.jag`);
if (+Client.getParameter('world') >= 998) {
Client.httpAddress = 'data/pack/mapview';
}
data = await downloadUrl(`${Client.httpAddress}/worldmap.jag`);
} catch (e) {
data = undefined;
Expand Down
3 changes: 3 additions & 0 deletions src/js/mesanim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ class Mesanim extends Client {
// this.packfiles[2] = await this.loadPack(`${Viewer.REPO}/data/src/pack/mesanim.pack`);
// this.packfiles[3] = await this.loadPack(`${Viewer.REPO}/data/src/pack/seq.pack`);

if (+Client.getParameter('world') >= 998) {
Client.httpAddress = `${Client.httpAddress}/..`;
}
const mesanim: Packet = new Packet(new Uint8Array(await downloadUrl(`${Client.httpAddress}/server/mesanim.dat`)));

await this.showProgress(75, 'Unpacking media');
Expand Down
13 changes: 10 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const isProduction = process.env.NODE_ENV === 'production';
const stylesHandler = isProduction ? MiniCssExtractPlugin.loader : 'style-loader';

const pages = [
'index',
'index', 'mapview',
// 'playground', 'viewer', 'mesanim', 'items', 'sounds',
// 'interface-editor', 'JagEd', 'mapview'
// 'interface-editor', 'JagEd'
];
const htmlPlugins = pages.map(name => {
return new HtmlWebpackPlugin({
Expand All @@ -25,14 +25,14 @@ const htmlPlugins = pages.map(name => {
const config = {
entry: {
index: './src/js/game.ts',
mapview: './src/js/mapview.ts'
// playground: './src/js/playground.js',
// viewer: './src/js/viewer.ts',
// mesanim: './src/js/mesanim.ts',
// items: './src/js/items.ts',
// sounds: './src/js/sounds.ts',
// ['interface-editor']: './src/js/interface-editor.ts',
// JagEd: './src/js/JagEd.ts',
// mapview: './src/js/mapview.ts'
},

plugins: [
Expand Down Expand Up @@ -391,6 +391,13 @@ module.exports = () => {
'grow',
'iceServers',
'urls',
'malloc_u8',
'free_u8',
'gzip_decompress',
'gzip_compress',
'error_message',
'error_message_len',
'deallocate_buffer',
]
}
},
Expand Down

0 comments on commit b9c14ec

Please sign in to comment.