Changed around player info stuff so it actually makes sense now.
Also... Made it so it reports who'se playing.
This commit is contained in:
@@ -12,6 +12,7 @@ bool NetworkSyncManager::Connect(const CString& addy, unsigned short port) { ret
|
||||
void NetworkSyncManager::ReportTiming(float offset, int PlayerNumber) { }
|
||||
void NetworkSyncManager::ReportScore(int playerID, int step, int score, int combo) { }
|
||||
void NetworkSyncManager::ReportSongOver() { }
|
||||
void NetworkSyncManager::ReportStyle() {}
|
||||
void NetworkSyncManager::StartRequest(short position) { }
|
||||
void NetworkSyncManager::DisplayStartupStatus() { }
|
||||
void NetworkSyncManager::Update( float fDeltaTime ) { }
|
||||
@@ -28,6 +29,7 @@ bool NetworkSyncManager::ChangedScoreboard() {}
|
||||
#include "StageStats.h"
|
||||
#include "Steps.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ProductInfo.h"
|
||||
|
||||
NetworkSyncManager::NetworkSyncManager()
|
||||
{
|
||||
@@ -92,23 +94,8 @@ void NetworkSyncManager::PostStartUp(CString ServerIP)
|
||||
Write1(m_packet, 2); //Hello Packet
|
||||
|
||||
Write1(m_packet, NETPROTOCOLVERSION);
|
||||
int ctr = 2 * 16 + 0;
|
||||
Write1(m_packet, (uint8_t) ctr);
|
||||
|
||||
vector<CString> profileNames;
|
||||
profileNames.push_back("[No Prof]"); //Make a no profile option
|
||||
PROFILEMAN->GetLocalProfileNames(profileNames);
|
||||
|
||||
FOREACH_PlayerNumber(pn)
|
||||
{
|
||||
int localID = atoi(PREFSMAN->m_sDefaultLocalProfileID[pn]);
|
||||
/* If the length of the m_sDefaultLocalProfileID[pn] is greater than 0
|
||||
there must be a profile there. */
|
||||
if (PREFSMAN->m_sDefaultLocalProfileID[pn].length() > 0)
|
||||
WriteNT(m_packet, profileNames[localID+1]);
|
||||
else
|
||||
WriteNT(m_packet, profileNames[localID]);
|
||||
}
|
||||
WriteNT(m_packet, CString(PRODUCT_NAME_VER));
|
||||
|
||||
NetPlayerClient->SendPack((char*)m_packet.Data,m_packet.Position);
|
||||
|
||||
@@ -261,6 +248,22 @@ void NetworkSyncManager::ReportSongOver()
|
||||
return;
|
||||
}
|
||||
|
||||
void NetworkSyncManager::ReportStyle()
|
||||
{
|
||||
ClearPacket(m_packet);
|
||||
Write1(m_packet, 6);
|
||||
Write1(m_packet, GAMESTATE->GetNumPlayersEnabled());
|
||||
|
||||
FOREACH_EnabledPlayer( pn )
|
||||
{
|
||||
Write1(m_packet,pn);
|
||||
WriteNT(m_packet, GAMESTATE->GetPlayerDisplayName(pn));
|
||||
}
|
||||
|
||||
NetPlayerClient->SendPack((char*)&m_packet.Data, m_packet.Position);
|
||||
return;
|
||||
}
|
||||
|
||||
void NetworkSyncManager::StartRequest(short position)
|
||||
{
|
||||
if (!useSMserver)
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
void ReportTiming(float offset, int PlayerNumber);
|
||||
void ReportScore(int playerID, int step, int score, int combo);
|
||||
void ReportSongOver(); //Report to server that song is over
|
||||
void ReportStyle(); //Report to server the style, players, and names
|
||||
void StartRequest(short position); //Request a start. Block until granted.
|
||||
bool Connect(const CString& addy, unsigned short port); // Connect to SM Server
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ScreenSelectStyle.h"
|
||||
#include "GameManager.h"
|
||||
#include "GameSoundManager.h"
|
||||
#include "NetworkSyncManager.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ScreenManager.h"
|
||||
@@ -182,6 +183,10 @@ void ScreenSelectStyle::MenuStart( PlayerNumber pn )
|
||||
for( unsigned i=0; i<m_SubActors.size(); i++ )
|
||||
m_SubActors[i]->StopTweening();
|
||||
|
||||
//Report All Stlye-dependant info
|
||||
NSMAN->ReportStyle();
|
||||
|
||||
|
||||
SCREENMAN->PlayStartSound();
|
||||
SCREENMAN->SendMessageToTopScreen( SM_AllDoneChoosing );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user