|
|
@ -1387,14 +1387,14 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) |
|
|
|
this->firstDeath = false; |
|
|
|
RenX::PlayerInfo *player; |
|
|
|
|
|
|
|
if (this->players.size() != 0) |
|
|
|
if (this->isSeamless() == false) |
|
|
|
RenX::Server::wipePlayers(); |
|
|
|
else if (this->players.size() != 0) |
|
|
|
{ |
|
|
|
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = this->players.getNode(0); n != nullptr; n = n->next) |
|
|
|
{ |
|
|
|
player = n->data; |
|
|
|
if (player != nullptr) |
|
|
|
{ |
|
|
|
if (this->isSeamless()) |
|
|
|
{ |
|
|
|
player->score = 0.0f; |
|
|
|
player->credits = 0.0f; |
|
|
@ -1413,9 +1413,6 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) |
|
|
|
player->steals = 0; |
|
|
|
player->stolen = 0; |
|
|
|
} |
|
|
|
else |
|
|
|
this->removePlayer(player); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
@ -3409,22 +3406,7 @@ bool RenX::Server::reconnect(RenX::DisconnectReason reason) |
|
|
|
|
|
|
|
void RenX::Server::wipeData() |
|
|
|
{ |
|
|
|
RenX::PlayerInfo *player; |
|
|
|
Jupiter::ArrayList<RenX::Plugin> &xPlugins = *RenX::getCore()->getPlugins(); |
|
|
|
while (RenX::Server::players.size() != 0) |
|
|
|
{ |
|
|
|
player = RenX::Server::players.remove(0U); |
|
|
|
for (size_t index = 0; index < xPlugins.size(); ++index) |
|
|
|
xPlugins.get(index)->RenX_OnPlayerDelete(this, player); |
|
|
|
|
|
|
|
if (player->rdns_thread.joinable()) // Close the RDNS thread, if one exists
|
|
|
|
{ |
|
|
|
--this->player_rdns_resolutions_pending; |
|
|
|
player->rdns_thread.join(); |
|
|
|
} |
|
|
|
|
|
|
|
delete player; |
|
|
|
} |
|
|
|
RenX::Server::wipePlayers(); |
|
|
|
RenX::Server::reliable = false; |
|
|
|
RenX::Server::m_team_mode = 3; |
|
|
|
RenX::Server::m_game_type = 1; |
|
|
@ -3443,6 +3425,27 @@ void RenX::Server::wipeData() |
|
|
|
RenX::Server::rconUser.truncate(RenX::Server::rconUser.size()); |
|
|
|
} |
|
|
|
|
|
|
|
void RenX::Server::wipePlayers() |
|
|
|
{ |
|
|
|
RenX::PlayerInfo *player; |
|
|
|
Jupiter::ArrayList<RenX::Plugin> &xPlugins = *RenX::getCore()->getPlugins(); |
|
|
|
|
|
|
|
while (RenX::Server::players.size() != 0) |
|
|
|
{ |
|
|
|
player = RenX::Server::players.remove(0U); |
|
|
|
for (size_t index = 0; index < xPlugins.size(); ++index) |
|
|
|
xPlugins.get(index)->RenX_OnPlayerDelete(this, player); |
|
|
|
|
|
|
|
if (player->rdns_thread.joinable()) // Close the RDNS thread, if one exists
|
|
|
|
{ |
|
|
|
--this->player_rdns_resolutions_pending; |
|
|
|
player->rdns_thread.join(); |
|
|
|
} |
|
|
|
|
|
|
|
delete player; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
unsigned int RenX::Server::getVersion() const |
|
|
|
{ |
|
|
|
return RenX::Server::rconVersion; |
|
|
|