Setup all the sample players in SP games [bug #52]
This was SVN commit r2100.
This commit is contained in:
parent
5e742f5615
commit
528b2bc9e7
@ -277,6 +277,8 @@
|
||||
GUIObjectHide("pregame_subwindow_bkg");
|
||||
GUIObjectHide("pregame_sp_mapsel");
|
||||
g_GameAttributes.mapFile = mapName;
|
||||
// Set up a bunch of players so we can see them pretty colors :P
|
||||
setupSPPlayers();
|
||||
startLoadingScreen();
|
||||
]]></action>
|
||||
</object>
|
||||
|
@ -1,8 +1,18 @@
|
||||
// HACK: This replaces the old numPlayers hack to set up a bunch of sample
|
||||
// players in SP games to show off some player colours and fights
|
||||
function setupSPPlayers()
|
||||
{
|
||||
// The first player is by default allocated to the local player in SP, so
|
||||
// adding 7 players means that we'll have 8 players in total
|
||||
for (i=0;i<7;i++)
|
||||
{
|
||||
g_GameAttributes.slots[i+1].assignLocal();
|
||||
console.write("Slot "+(i+1)+" is assigned: "+g_GameAttributes.slots[i+1].assignment);
|
||||
}
|
||||
}
|
||||
|
||||
function startLoadingScreen()
|
||||
{
|
||||
// HACK: Added to increase number of players from its default 2, until we have a session creation screen.
|
||||
// g_GameAttributes.numPlayers = 9;
|
||||
|
||||
// Switch screens from main menu to loading screen.
|
||||
GUIObjectHide("PREGAME_GUI");
|
||||
GUIObjectUnhide("loading_screen");
|
||||
|
Loading…
Reference in New Issue
Block a user