Merge branch 'GameServer' of https://github.com/dean11/Danbias into GameServer
This commit is contained in:
commit
956c1a726c
|
@ -501,7 +501,7 @@ const GameClientState::NetEvent & GameState::DataRecieved( const GameClientState
|
|||
// set countdown
|
||||
case protocol_Gameplay_ObjectDisconnectPlayer:
|
||||
{
|
||||
//Removes
|
||||
//Remove the disconnected player
|
||||
Protocol_ObjectDisconnectPlayer decoded(data);
|
||||
auto object = this->privData->dynamicObjects->find( decoded.objectID );
|
||||
if( object != this->privData->dynamicObjects->end() )
|
||||
|
|
|
@ -22,16 +22,16 @@ namespace Oyster
|
|||
{
|
||||
struct BroadcastOptions
|
||||
{
|
||||
//bool broadcast;
|
||||
//float broadcastInterval;
|
||||
//std::wstring subnetToBroadcast;
|
||||
//CustomNetProtocol broadcastMessage;
|
||||
//BroadcastOptions()
|
||||
//{
|
||||
// broadcast = true;
|
||||
// broadcastInterval = 1.0f;
|
||||
// subnetToBroadcast = L"192.168.0.1";
|
||||
//}
|
||||
bool broadcast;
|
||||
float broadcastInterval;
|
||||
std::wstring subnetToBroadcast;
|
||||
CustomNetProtocol broadcastMessage;
|
||||
BroadcastOptions()
|
||||
{
|
||||
broadcast = true;
|
||||
broadcastInterval = 1.0f;
|
||||
subnetToBroadcast = L"192.168.0.1";
|
||||
}
|
||||
} broadcastOptions;
|
||||
|
||||
struct MainOptions
|
||||
|
@ -117,6 +117,23 @@ namespace Oyster
|
|||
*/
|
||||
int NetworkServer::GetPort();
|
||||
|
||||
|
||||
|
||||
/***************************************
|
||||
Broadcast functions
|
||||
***************************************/
|
||||
//Set broadcast settings.
|
||||
void SetBroadcast(CustomNetProtocol& broadcastMessage, float interval = 1.0f, bool enable = true);
|
||||
|
||||
//Set broadcast settings.
|
||||
void SetBroadcastMessage(CustomNetProtocol& broadcastMessage);
|
||||
|
||||
//Enable/disable broadcast.
|
||||
void SetBroadcast(bool enable);
|
||||
|
||||
//Set interval between each broadcast message in seconds.
|
||||
void SetBroadcastInterval(float interval);
|
||||
|
||||
private:
|
||||
struct PrivateData;
|
||||
PrivateData* privateData;
|
||||
|
|
Loading…
Reference in New Issue