Skip to content

Commit

Permalink
updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
briancullinan2 committed Jul 10, 2024
1 parent 8790143 commit e0d7d20
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
Binary file modified docs/quake3e.wasm
Binary file not shown.
13 changes: 12 additions & 1 deletion docs/sys_net.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,7 @@ function CL_Download(cmd, name, auto) {
let dlURL = addressToString(Cvar_VariableString(stringToAddress('cl_dlURL')))
let gamedir = addressToString(FS_GetCurrentGameDir())
let nameStr = addressToString(name)
let basegame = addressToString(Cvar_VariableString(stringToAddress('fs_basegame')))
let localName = nameStr
if (localName[0] == '/')
localName = localName.substring(1)
Expand Down Expand Up @@ -689,7 +690,17 @@ function CL_Download(cmd, name, auto) {
nameStr = 'maps/' + nameStr + '.bsp'
}
return responseData
})])).filter(f => f)[0]
}),
await Com_DL_Begin(localName + '.bsp', basegame + '/pak0.pk3dir/maps/' + localName + '.bsp')
.then(responseData => {
if(responseData && !nameStr.match(/\.bsp$/)) {
mapname = nameStr
nameStr = 'maps/' + nameStr + '.bsp'
}
return responseData
}),

])).filter(f => f)[0]
} else {
// valid from disk
responseData = result.contents
Expand Down
8 changes: 8 additions & 0 deletions docs/sys_snd.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ function S_CodecLoad (name, info) {
if(filenameStr.length == 0) {
return 0
}
if(typeof REMOTE_SOUNDS[filenameStr] != 'undefined'
&& !REMOTE_SOUNDS[filenameStr]
) {
return 0
}
if(!filenameStr.endsWith('.ogg')) {
filenameStr = filenameStr.replace(/\..*?$/, '.ogg')
}
Expand Down Expand Up @@ -58,6 +63,9 @@ function S_CodecLoad (name, info) {
Promise.resolve(Com_DL_Begin(gamedir + '/' + remoteFile, '/' + gamedir + '/' + remoteFile + '?alt')
.then(function (responseData) {
Com_DL_Perform(gamedir + '/' + remoteFile, remoteFile, responseData)
if(!responseData) {
REMOTE_SOUNDS[filenameStr] = false
}
}))
}

Expand Down
3 changes: 1 addition & 2 deletions docs/sys_web.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function Sys_Return() {

function Sys_Exit(code) {
SYS.exited = true
GLimp_Shutdown()
GLimp_Shutdown(true)
NET_Shutdown()
if(SYS.frameInterval) {
clearInterval(SYS.frameInterval)
Expand All @@ -244,7 +244,6 @@ function Sys_Exit(code) {
if(code == 0) {
Sys_Return()
}
SDL_ShowCursor()
if( GL.canvas ) {
GL.canvas.remove()
}
Expand Down

0 comments on commit e0d7d20

Please sign in to comment.