diff --git a/src/dehacked.c b/src/dehacked.c index 858b0b67c..5db242a66 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1151,8 +1151,8 @@ static void readlevelheader(MYFILE *f, INT32 num) #endif else if (fastcmp(word, "MUSICTRACK")) mapheaderinfo[num-1]->mustrack = ((UINT16)i - 1); - else if (fastcmp(word, "MUSICPOSITION")) - mapheaderinfo[num-1]->musposition = (UINT32)get_number(word2); + else if (fastcmp(word, "MUSICPOS")) + mapheaderinfo[num-1]->muspos = (UINT32)get_number(word2); else if (fastcmp(word, "MUSICPOSTBOSS")) deh_strlcpy(mapheaderinfo[num-1]->muspostbossname, word2, sizeof(mapheaderinfo[num-1]->muspostbossname), va("Level header %d: post-boss music", num)); @@ -1456,7 +1456,7 @@ static void readcutscenescene(MYFILE *f, INT32 num, INT32 scenenum) { cutscenes[num]->scene[scenenum].musswitchflags = ((UINT16)i) & MUSIC_TRACKMASK; } - else if (fastcmp(word, "MUSICPOSITION")) + else if (fastcmp(word, "MUSICPOS")) { cutscenes[num]->scene[scenenum].musswitchposition = (UINT32)get_number(word2); } diff --git a/src/doomstat.h b/src/doomstat.h index cb6798884..f51baec23 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -225,7 +225,7 @@ typedef struct INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end. char musname[7]; ///< Music track to play. "" for no music. UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore. - UINT32 musposition; ///< Music position to jump to. + UINT32 muspos; ///< Music position to jump to. char forcecharacter[17]; ///< (SKINNAMESIZE+1) Skin to switch to or "" to disable. UINT8 weather; ///< 0 = sunny day, 1 = storm, 2 = snow, 3 = rain, 4 = blank, 5 = thunder w/o rain, 6 = rain w/o lightning, 7 = heat wave. INT16 skynum; ///< Sky number to use. diff --git a/src/lua_maplib.c b/src/lua_maplib.c index d90bc3a03..77b6120ba 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -1760,6 +1760,8 @@ static int mapheaderinfo_get(lua_State *L) lua_pushstring(L, header->musname); else if (fastcmp(field,"mustrack")) lua_pushinteger(L, header->mustrack); + else if (fastcmp(field,"muspos")) + lua_pushinteger(L, header->muspos); else if (fastcmp(field,"muspostbossname")) lua_pushstring(L, header->muspostbossname); else if (fastcmp(field,"muspostbosstrack")) diff --git a/src/p_setup.c b/src/p_setup.c index 28efb0c26..716d51d7b 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -208,7 +208,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i) snprintf(mapheaderinfo[num]->musname, 7, "%sM", G_BuildMapName(i)); mapheaderinfo[num]->musname[6] = 0; mapheaderinfo[num]->mustrack = 0; - mapheaderinfo[num]->musposition = 0; + mapheaderinfo[num]->muspos = 0; mapheaderinfo[num]->muspostbossname[6] = 0; mapheaderinfo[num]->muspostbosstrack = 0; mapheaderinfo[num]->muspostbosspos = 0; diff --git a/src/s_sound.c b/src/s_sound.c index 604b710ee..03e724a4d 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -1741,7 +1741,7 @@ void S_Start(void) strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7); mapmusname[6] = 0; mapmusflags = (mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK); - mapmusposition = mapheaderinfo[gamemap-1]->musposition; + mapmusposition = mapheaderinfo[gamemap-1]->muspos; } if (cv_resetmusic.value)