mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-04-11 22:36:00 +00:00
v0.43
This commit is contained in:
@@ -8,6 +8,5 @@ std::set<Client*> Clients;
|
||||
void NetMain() {
|
||||
std::thread TCP(TCPServerMain);
|
||||
TCP.detach();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
UDPServerMain();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
std::string StatReport = "-";
|
||||
int PPS = 0;
|
||||
[[noreturn]] void Monitor(){
|
||||
int R,C,V=0;
|
||||
int R,C,V;
|
||||
while(true){
|
||||
if(Clients.empty()){
|
||||
StatReport = "-";
|
||||
@@ -24,7 +24,6 @@ int PPS = 0;
|
||||
StatReport = "-";
|
||||
}else{
|
||||
R = (PPS/C)/V;
|
||||
std::cout << PPS << std::endl;
|
||||
StatReport = std::to_string(R);
|
||||
}
|
||||
PPS = 0;
|
||||
|
||||
@@ -58,11 +58,11 @@ void Check(Sequence* S){
|
||||
}
|
||||
}
|
||||
int Max(){
|
||||
int T = MaxPlayers;
|
||||
int M = MaxPlayers;
|
||||
for(Client*c : Clients){
|
||||
if(c->GetRole() == "MDEV")T--;
|
||||
if(c->GetRole() == "MDEV")M--;
|
||||
}
|
||||
return T;
|
||||
return M;
|
||||
}
|
||||
void Identification(SOCKET TCPSock){
|
||||
auto* S = new Sequence;
|
||||
@@ -73,7 +73,7 @@ void Identification(SOCKET TCPSock){
|
||||
S->Done = true;
|
||||
if(Ver.size() > 3 && Ver.substr(0,2) == "VC"){
|
||||
Ver = Ver.substr(2);
|
||||
if(Ver.length() > 4 || Ver < ClientVersion){
|
||||
if(Ver.length() > 4 || Ver != ClientVersion){
|
||||
closesocket(TCPSock);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user