diff -ruN a/src/cdogs/campaign_entry.c b/src/cdogs/campaign_entry.c --- a/src/cdogs/campaign_entry.c +++ b/src/cdogs/campaign_entry.c @@ -30,7 +30,6 @@ #include -#include #include #include #include @@ -48,20 +47,7 @@ { return ScanCampaignOld(path, title, numMissions) == 0; } - int spearMission = 1; - char buf[CDOGS_PATH_MAX]; - if (path[strlen(path)-2] == '?') - { - spearMission = atoi(&path[strlen(path) - 1]); - strcpy(buf, path); - buf[strlen(buf) - 2] = '\0'; - path = buf; - } - if (CWGetType(path, NULL, NULL, spearMission) != CWMAPTYPE_UNKNOWN) - { - return MapWolfScan(path, spearMission, title, numMissions) == 0; - } - + // The Wolfenstein 3D map importer is not part of this build (see map_wolf_stub.c). return false; } diff -ruN a/src/cdogs/map_new.c b/src/cdogs/map_new.c --- a/src/cdogs/map_new.c +++ b/src/cdogs/map_new.c @@ -31,7 +31,6 @@ #include #include -#include "cwolfmap/cwolfmap.h" #include "door.h" #include "files.h" #include "json_utils.h" @@ -101,19 +100,7 @@ return MapNewLoadArchive(filename, c); } - int spearMission = 1; - char buf[CDOGS_PATH_MAX]; - if (filename[strlen(filename) - 2] == '?') - { - spearMission = atoi(&filename[strlen(filename) - 1]); - strcpy(buf, filename); - buf[strlen(buf) - 2] = '\0'; - filename = buf; - } - if (CWGetType(filename, NULL, NULL, spearMission) != CWMAPTYPE_UNKNOWN) - { - return MapWolfLoad(filename, spearMission, c); - } + // The Wolfenstein 3D map importer is not part of this build (see map_wolf_stub.c). // try to load the new map format json_t *root = NULL; diff -ruN a/src/game_loop.c b/src/game_loop.c --- a/src/game_loop.c +++ b/src/game_loop.c @@ -100,7 +100,8 @@ if (emscripten_fs_ready) return true; - if (emscripten_run_script_int("Module.syncdone") == 1) + // EM_ASM_INT, not emscripten_run_script_int: the page forbids eval() (Content Security Policy). + if (EM_ASM_INT({ return Module.syncdone ? 1 : 0; }) == 1) { FILE *config_file = fopen(GetConfigFilePath(CONFIG_FILE), "r"); if (config_file == NULL)