Menu: Strip .bsp extension from maps when launching
Menu: Internet-Create-Game now applies hostname, maxplayers and password to the server
This commit is contained in:
parent
d635fbc0c7
commit
817cf43930
3 changed files with 13 additions and 6 deletions
|
@ -33,12 +33,14 @@ void create_btnok_start(void)
|
|||
localcmd(sprintf("map %s\n", startmap));
|
||||
g_menupage = PAGE_LANGAMES;
|
||||
}
|
||||
|
||||
startmap = create_lbMaps.GetSelectedItem();
|
||||
|
||||
|
||||
/* Strip .bsp extension before submitting */
|
||||
startmap = substring(create_lbMaps.GetSelectedItem(), 0, -4);
|
||||
|
||||
if (startmap == __NULL__) {
|
||||
return;
|
||||
}
|
||||
|
||||
localsound("../media/launch_dnmenu1.wav");
|
||||
header.SetStartEndPos(45,45,30,172);
|
||||
header.SetStartEndSize(460,80,156,26);
|
||||
|
|
|
@ -15,15 +15,20 @@ void createinet_btnok_start(void)
|
|||
{
|
||||
static string startmap;
|
||||
static void createinet_btnok_end(void) {
|
||||
localcmd(sprintf("hostname %s\n", create_tbHostname.m_text));
|
||||
localcmd(sprintf("sv_playerslots %s\n", create_tbMaxplayers.m_text));
|
||||
localcmd(sprintf("password %s\n", create_tbPassword.m_text));
|
||||
localcmd(sprintf("map %s\n", startmap));
|
||||
g_menupage = PAGE_INTERNETGAMES;
|
||||
}
|
||||
|
||||
startmap = create_lbMaps.GetSelectedItem();
|
||||
|
||||
|
||||
/* Strip .bsp extension before submitting */
|
||||
startmap = substring(create_lbMaps.GetSelectedItem(), 0, -5);
|
||||
|
||||
if (startmap == __NULL__) {
|
||||
return;
|
||||
}
|
||||
|
||||
localsound("../media/launch_dnmenu1.wav");
|
||||
header.SetStartEndPos(45,45,30,172);
|
||||
header.SetStartEndSize(460,80,156,26);
|
||||
|
|
BIN
fn/menu.dat
BIN
fn/menu.dat
Binary file not shown.
Loading…
Reference in a new issue