Browse Source

Removed "server" parameter from uuid_func.

pull/3/head
JustinAJ 10 years ago
parent
commit
96913fce67
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 4
      RenX.Core/RenX_Functions.cpp
  3. 2
      RenX.Core/RenX_Functions.h
  4. 10
      RenX.Core/RenX_Server.cpp
  5. 2
      RenX.Core/RenX_Server.h

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

4
RenX.Core/RenX_Functions.cpp

@ -791,9 +791,9 @@ time_t RenX::getGameTime(const RenX::PlayerInfo *player)
return currentTime - player->joinTime; return currentTime - player->joinTime;
} }
Jupiter::StringS RenX::default_uuid_func(RenX::Server *server, RenX::PlayerInfo *player) Jupiter::StringS RenX::default_uuid_func(RenX::PlayerInfo *player)
{ {
return server->formatSteamID(player); return Jupiter::StringS::Format("0x%.16llX", player->steamid);
} }
double RenX::getKillDeathRatio(const RenX::PlayerInfo *player, bool includeSuicides) double RenX::getKillDeathRatio(const RenX::PlayerInfo *player, bool includeSuicides)

2
RenX.Core/RenX_Functions.h

@ -159,7 +159,7 @@ namespace RenX
* @param player Player to calculate UUID of * @param player Player to calculate UUID of
* @return UUID of the player based on their steam ID. * @return UUID of the player based on their steam ID.
*/ */
RENX_API Jupiter::StringS default_uuid_func(RenX::Server *server, RenX::PlayerInfo *player); RENX_API Jupiter::StringS default_uuid_func(RenX::PlayerInfo *player);
/** /**
* @brief Calculates a player's Kill-Death ratio, based on their data. * @brief Calculates a player's Kill-Death ratio, based on their data.

10
RenX.Core/RenX_Server.cpp

@ -622,7 +622,7 @@ void RenX::Server::setUUIDFunction(RenX::Server::uuid_func func)
Jupiter::DLList<PlayerInfo>::Node *node = RenX::Server::players.getNode(0); Jupiter::DLList<PlayerInfo>::Node *node = RenX::Server::players.getNode(0);
do do
{ {
RenX::Server::setUUIDIfDifferent(node->data, RenX::Server::calc_uuid(this, node->data)); RenX::Server::setUUIDIfDifferent(node->data, RenX::Server::calc_uuid(node->data));
node = node->next; node = node->next;
} }
while (node != nullptr); while (node != nullptr);
@ -916,7 +916,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
if (id != 0) if (id != 0)
this->players.add(r); this->players.add(r);
r->uuid = calc_uuid(this, r); r->uuid = calc_uuid(r);
for (size_t i = 0; i < xPlugins.size(); i++) for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnPlayerCreate(this, r); xPlugins.get(i)->RenX_OnPlayerCreate(this, r);
@ -943,7 +943,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
} }
if (recalcUUID) if (recalcUUID)
{ {
this->setUUIDIfDifferent(r, calc_uuid(this, r)); this->setUUIDIfDifferent(r, calc_uuid(r));
if (banCheck(r)) if (banCheck(r))
this->kickPlayer(r); this->kickPlayer(r);
} }
@ -1078,7 +1078,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
if (calc_uuid == RenX::default_uuid_func) if (calc_uuid == RenX::default_uuid_func)
setUUID(player, this->formatSteamID(steamid)); setUUID(player, this->formatSteamID(steamid));
else else
this->setUUIDIfDifferent(player, calc_uuid(this, player)); this->setUUIDIfDifferent(player, calc_uuid(player));
} }
} }
@ -1113,7 +1113,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
if (calc_uuid == RenX::default_uuid_func) if (calc_uuid == RenX::default_uuid_func)
setUUID(player, this->formatSteamID(steamid)); setUUID(player, this->formatSteamID(steamid));
else else
this->setUUIDIfDifferent(player, calc_uuid(this, player)); this->setUUIDIfDifferent(player, calc_uuid(player));
} }
} }

2
RenX.Core/RenX_Server.h

@ -623,7 +623,7 @@ namespace RenX
* @param player Player to calculate UUID of * @param player Player to calculate UUID of
* @return UUID calculated from player. * @return UUID calculated from player.
*/ */
typedef Jupiter::StringS(*uuid_func)(RenX::Server *server, RenX::PlayerInfo *player); typedef Jupiter::StringS(*uuid_func)(RenX::PlayerInfo *player);
/** /**
* @brief Sets the player UUID calculation function. * @brief Sets the player UUID calculation function.

Loading…
Cancel
Save