diff --git a/source/build/src/osd.cpp b/source/build/src/osd.cpp index ae4d24ada..7e82fab56 100644 --- a/source/build/src/osd.cpp +++ b/source/build/src/osd.cpp @@ -562,7 +562,7 @@ void OSD_Init(void) OSD_RegisterFunction("unbindall", "unbindall: unbinds all keys", osdcmd_unbindall); OSD_RegisterFunction("quit", "quit: exits the game immediately", osdcmd_quit); OSD_RegisterFunction("exit", "exit: exits the game immediately", osdcmd_quit); - OSD_RegisterFunction("changelevel", "changelevel : warps to the given level", osdcmd_changelevel); + //OSD_RegisterFunction("changelevel", "changelevel : warps to the given level", osdcmd_changelevel); // atexit(OSD_Cleanup); } diff --git a/source/duke3d/src/osdcmds.cpp b/source/duke3d/src/osdcmds.cpp index e9a75f5fe..10a4a6978 100644 --- a/source/duke3d/src/osdcmds.cpp +++ b/source/duke3d/src/osdcmds.cpp @@ -44,7 +44,7 @@ static int osdcmd_changelevel(osdcmdptr_t parm) int32_t volume=0,level; char *p; - if ((g_gameType & GAMEFLAG_DUKE) && (g_gameType & GAMEFLAG_SHAREWARE)) + if (!VOLUMEONE) { if (parm->numparms != 2) return OSDCMD_SHOWHELP; @@ -1135,9 +1135,11 @@ int32_t registerosdcommands(void) OSD_RegisterFunction("playerinfo", "Prints information about the current player", osdcmd_playerinfo); #endif - if (!VOLUMEONE) + if (VOLUMEONE) + OSD_RegisterFunction("changelevel","changelevel : warps to the given level", osdcmd_changelevel); else { + OSD_RegisterFunction("changelevel","changelevel : warps to the given level", osdcmd_changelevel); OSD_RegisterFunction("map","map : loads the given user map", osdcmd_map); OSD_RegisterFunction("demo","demo : starts the given demo", osdcmd_demo); } diff --git a/source/platform/win32/winbits.cpp b/source/platform/win32/winbits.cpp index 440e4051a..1633391a3 100644 --- a/source/platform/win32/winbits.cpp +++ b/source/platform/win32/winbits.cpp @@ -130,7 +130,10 @@ int32_t win_buildargs(char **argvbuf) } // Figure out what directory the program resides in. - progdir = argvbuf[0]; + + wchar_t buffer[256]; + GetModuleFileNameW(0, buffer, 256); + progdir = buffer; progdir.Substitute("\\", "/"); auto lastsep = progdir.LastIndexOf('/'); if (lastsep != -1) diff --git a/source/rr/src/osdcmds.cpp b/source/rr/src/osdcmds.cpp index 6401ca4a5..8f368f21b 100644 --- a/source/rr/src/osdcmds.cpp +++ b/source/rr/src/osdcmds.cpp @@ -916,7 +916,6 @@ int32_t registerosdcommands(void) { if (!VOLUMEONE) - else { OSD_RegisterFunction("map","map : loads the given user map", osdcmd_map); OSD_RegisterFunction("demo","demo : starts the given demo", osdcmd_demo);