i broke it some what sorry Anon

This commit is contained in:
Starystars67
2020-04-10 19:14:06 +01:00
parent 388cffbe01
commit 9bdec9e5f8
4 changed files with 41 additions and 28 deletions

View File

@@ -6,6 +6,7 @@
#include <string>
#include <fstream>
#include "logger.h"
#include "settings.h"
#include <chrono>
#include <thread>
@@ -17,28 +18,23 @@ void ServerMain(int Port, int MaxClients);
bool Debug = false;
void addToLog(basic_string<char> Data);
void HeartbeatInit();
static int Port = 30814;
static int MaxPlayers = 10;
static string MapName = "levels/gridmap/level.json";
static string ServerName = "BeamNG-MP FTW";
static string Resource = "/Resources";
static string ServerVersion = "0.1";
//Entry
int main() {
LogInit();
HeartbeatInit();
ParseConfig();
HeartbeatInit();
if(Debug){ //checks if debug is on
DebugData(); //Prints Debug Data
}
setLoggerLevel("ALL");
ServerMain(Port, MaxPlayers);
ServerMain(UDPPort, MaxPlayers);
}
void DebugData(){
cout << "Debug : true" << "\n";
cout << "Port : " << Port << "\n";
cout << "Port : " << UDPPort << "\n";
cout << "MaxPlayers : " << MaxPlayers << "\n";
cout << "MapName : " << MapName << "\n";
cout << "ServerName : " << ServerName << "\n";
@@ -46,12 +42,12 @@ void DebugData(){
}
void SetMainValues(bool D, int P,int MP,string Name,string serverName,string filename){
Debug = D;
Port = P;
MapName = Name;
ServerName = serverName;
MaxPlayers = MP;
Resource = filename;
bool Debug = D;
int UDPPort = P;
string MapName = Name;
string ServerName = serverName;
int MaxPlayers = MP;
string Resource = filename;
}
void LogInit(){