Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 13, 2011, 5:49:41 PM (13 years ago)
Author:
dafrick
Message:

Extending startGame and similar console commands, now also the level to be started (or in case of startClient, the destination) can be specified (but doesn't have to).
Additionally startMainMenu is now in GSLevel and can only be executed in a Level, as opposed to only in the MainMenu as it was before.
Added changeGame console command which works in a level in standalone mode to change to a different level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/gui/scripts/MultiplayerMenu.lua

    r7801 r7876  
    7575
    7676function P.MultiplayerJoinButton_clicked(e)
    77     local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()   
     77    local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()
     78    local destination = nil
    7879    if choice then
    79         local client = orxonox.Client:getInstance()
    8080        local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
    81         client:setDestination( P.serverList[index][2], 55556 )
     81        destination = P.serverList[index][2]
    8282    else
    8383        return
    8484    end
    85     orxonox.execute("startClient")
     85    orxonox.execute("startClient " .. destination)
    8686    hideAllMenuSheets()
    8787end
Note: See TracChangeset for help on using the changeset viewer.