mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- made Blood's 'map' CCMD more useful by properly handling internal maps the same as 'levelwarp'.
This commit is contained in:
parent
be0242e919
commit
51d5236216
1 changed files with 16 additions and 0 deletions
|
@ -41,6 +41,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "sound.h"
|
||||
#include "sfx.h"
|
||||
#include "view.h"
|
||||
#include "mapinfo.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -48,6 +49,9 @@ void LevelWarp(int nEpisode, int nLevel);
|
|||
|
||||
static int osdcmd_map(osdcmdptr_t parm)
|
||||
{
|
||||
if (parm->numparms != 1)
|
||||
return OSDCMD_SHOWHELP;
|
||||
|
||||
char filename[BMAX_PATH];
|
||||
|
||||
strcpy(filename, parm->parms[0]);
|
||||
|
@ -59,6 +63,18 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 512; i++)
|
||||
{
|
||||
if (mapList[i].labelName.CompareNoCase(filename) == 0)
|
||||
{
|
||||
int e = i / kMaxLevels;
|
||||
int m = i % kMaxLevels;
|
||||
LevelWarp(e, m);
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
}
|
||||
// Map has not been defined. Treat as user map.
|
||||
|
||||
if (gDemo.at1)
|
||||
gDemo.StopPlayback();
|
||||
|
||||
|
|
Loading…
Reference in a new issue