////////////////////////////////////////////////////////////////////// // fe_MultiplayerSetup::OnUpdate() // \author Logan Jones //////////////////////////////////// \date 9/5/2002 // //==================================================================== // void fe_MultiplayerSetup::OnUpdate() { bool bQueried; UINT32 Msg; gadget_ListBox* pBox = (gadget_ListBox*)GetGadget("Output"); net.SendRecv( &bQueried ); if( bQueried ) pBox->AddListBoxItem( "Something pinged at me" ); while( net.Read().BytesToRead() ) if( net.Read().Marker()==net_SystemMarker ) OnSystemMessage(); else { net.Read() >> Msg; theApp.Console.Comment( CT_LOAD, "fe_MultiplayerSetup::OnUpdate(): Handling message, %d", Msg );switch(Msg){ case fems_ClientLogin: OnClientLogin(); break; case fems_Resync: OnResync(); break; case fems_NewPlayer: OnNewPlayer(); break; case fems_RemovePlayer: DestroyPlayer(net.Read().GetUInt32()); break; case fems_Go: sound.PlaySound( guiResources.Sounds.BigButton ); SaveSettings(); theApp.SetStartMenu( "SelectGame" ); theApp.StartGame(); break; default:theApp.Console.Comment( CT_LOAD, "fe_MultiplayerSetup::OnUpdate(): Unknown message, %d", Msg ); }} }
bool CModules::OnClientLogin() { MODUNLOADCHK(OnClientLogin()); return false; }
void Execute(const CString& sCommand) { OnClientLogin(); PutModule("disperform commands sent"); }