From 54ea7e35c08fe859d9715d37bf95428fe742fad7 Mon Sep 17 00:00:00 2001 From: blackhc Date: Sun, 19 Jun 2005 16:19:47 +0000 Subject: [PATCH] -Added bot support back to the menu. git-svn-id: svn://svn.icculus.org/nexuiz/trunk@458 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- scmenu/creategame/basic.menu | 25 +++++++++++-------------- scmenu/data/server.menu | 18 ++++++++++-------- scmenu/source/custom/creategame.qm | 12 +----------- 3 files changed, 22 insertions(+), 33 deletions(-) diff --git a/scmenu/creategame/basic.menu b/scmenu/creategame/basic.menu index 213dd6614..8b4e749d4 100644 --- a/scmenu/creategame/basic.menu +++ b/scmenu/creategame/basic.menu @@ -113,21 +113,18 @@ Item Window Basic } Derive Nex_Line Seperator1 {} - Ignore + Derive Nex_Option_EditBox NumBots { - Derive Nex_Option_EditBox NumBots - { - text "Bot Count" - target "Data::Server::NumBots::Text" - } - Derive Nex_Option_Switch BotSkill - { - text "Skill Level" - target "Data::Server::BotSkill::Switch" - } - Derive Nex_Void Seperator2 - {} + text "Bot Count" + target "Data::Server::NumBots::Text" + } + Derive Nex_Option_Switch BotSkill + { + text "Skill Level" + target "Data::Server::BotSkill::Switch" } + Derive Nex_Line Seperator2 + {} Derive Nex_Option_EditBox ServerFrameTime { text "Server Frame Time" @@ -138,7 +135,7 @@ Item Window Basic text "Server Max Rate" target "Data::Server::ServerMaxRate::Text" } - Derive Nex_Line Seperator3 + Derive Nex_Void Seperator3 {} Derive PictureButton Start { diff --git a/scmenu/data/server.menu b/scmenu/data/server.menu index 7bd3d17ab..eea172956 100644 --- a/scmenu/data/server.menu +++ b/scmenu/data/server.menu @@ -100,13 +100,15 @@ Item DataContainer Server } Item Data_CvarCreateSave NumBots { - // ?? TODO: add support for this in Game QC? - cvarName "nex_numbots" + cvarName "bot_number" defValue 0 Item DataLink_Value Value { - maxValue 16 + minValue 0 + stepValue 1 + maxValue 64 + link "##up" } Item DataLink_Text Text @@ -123,16 +125,16 @@ Item DataContainer Server Item Data_CvarCreateSave BotSkill { // TODO: add support for this in FrikQcc - cvarName "nex_botskill" - // from 0 to 3 - defValue 0 + cvarName "skill" + // from 0 to 10 + defValue 5 Item DataLink_ValueSwitch Switch { minValue 0 stepValue 1 - maxValue 3 - descList "'Beginner''Easy''Medium''Hard'" + maxValue 10 + descList "'Dumb, very''You will win''You can win''You might win''Beginner''Intermediate''Advanced''Expert''Assassin''Godlike'" link "##up" } diff --git a/scmenu/source/custom/creategame.qm b/scmenu/source/custom/creategame.qm index 5dc9a8902..805f0ba8d 100644 --- a/scmenu/source/custom/creategame.qm +++ b/scmenu/source/custom/creategame.qm @@ -85,17 +85,7 @@ void() Nex_Action_MapSelector_Prev = void() Nex_Action_Map_Start = { local entity lItem; - local float lNumBots, lSkill; - // we need to set the following var - lItem = Menu_GetItem( "::Data::Server::NumBots" ); - lNumBots = stof( lItem.value ); - lItem = Menu_GetItem( "::Data::Server::BotSkill" ); - lSkill = stof( lItem.value ); - - cvar_set( "saved1", "1" ); - cvar_set( "scratch1", ftos( pow( 2, lNumBots ) - 1 ) ); - cvar_set( "scratch2", ftos( lSkill * (pow(4, min(lNumBots, 8)) - 1) / 3) ); - cvar_set( "scratch3", ftos( lSkill * (pow(4, min(lNumBots - 8, 8)) - 1) / 3) ); + // Set maxplayers lItem = Menu_GetItem( "::Data::Server::MaxPlayers" ); cmd( "maxplayers \"" ); -- 2.39.2