this can be done with GameState --player, --mode now
This commit is contained in:
@@ -315,65 +315,6 @@ void NetworkSyncManager::SendSongs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ArgSetMode (CString cmdLineMode)
|
|
||||||
{
|
|
||||||
CString PlayerModeStr;
|
|
||||||
int loc=0;
|
|
||||||
int loc2=1;
|
|
||||||
|
|
||||||
while (loc2>=0) {
|
|
||||||
loc2=cmdLineMode.Find(",",loc);
|
|
||||||
if (loc2<0)
|
|
||||||
PlayerModeStr = cmdLineMode.substr(loc,loc2-loc);
|
|
||||||
else
|
|
||||||
PlayerModeStr = cmdLineMode.substr(loc,loc2-loc);
|
|
||||||
|
|
||||||
if (PlayerModeStr.CompareNoCase("1")==0) {
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
|
||||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("2")==0) {
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
|
||||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_2;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("VERSUS")==0) {
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("VERSUS")==0) {
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("DOUBLE")==0) {
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_DOUBLE;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("COUPLE")==0) {
|
|
||||||
GAMESTATE->m_CurStyle = STYLE_DANCE_COUPLE;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
|
|
||||||
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("FAILOFF")==0) {
|
|
||||||
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("FAILENDOFSONG")==0) {
|
|
||||||
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_END_OF_SONG;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("FAILARCADE")==0) {
|
|
||||||
GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_ARCADE;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("ARCADE")==0) {
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("NONSTOP")==0) {
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_NONSTOP;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("ONI")==0) {
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_ONI;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("BATTLE")==0) {
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_BATTLE;
|
|
||||||
} else if (PlayerModeStr.CompareNoCase("RAVE")==0) {
|
|
||||||
GAMESTATE->m_PlayMode = PLAY_MODE_RAVE;
|
|
||||||
}
|
|
||||||
loc = loc2+1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//I am adding this for Network support
|
//I am adding this for Network support
|
||||||
//Feel free to change the way --course is used
|
//Feel free to change the way --course is used
|
||||||
//I am not building any part of SMOnline specific to this yet.
|
//I am not building any part of SMOnline specific to this yet.
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
void NSSendSongs();
|
void NSSendSongs();
|
||||||
void ArgStartCourse(CString CourseName);
|
void ArgStartCourse(CString CourseName);
|
||||||
void ArgSetMode (CString cmdLineMode);
|
|
||||||
|
|
||||||
class EzSockets;
|
class EzSockets;
|
||||||
|
|
||||||
|
|||||||
@@ -925,8 +925,6 @@ static void ProcessArgsSecond()
|
|||||||
//"ArgStartCourse", is in the NSManager
|
//"ArgStartCourse", is in the NSManager
|
||||||
//bacause Networked StepMania will
|
//bacause Networked StepMania will
|
||||||
//use it a lot.
|
//use it a lot.
|
||||||
if( GetCommandlineArgument( "mode",& Argument ) )
|
|
||||||
ArgSetMode(Argument);
|
|
||||||
|
|
||||||
if( GetCommandlineArgument( "netip" ) )
|
if( GetCommandlineArgument( "netip" ) )
|
||||||
NSMAN->DisplayStartupStatus(); //If we're using networking show what happend
|
NSMAN->DisplayStartupStatus(); //If we're using networking show what happend
|
||||||
|
|||||||
Reference in New Issue
Block a user