Browse Source

Changed several "players.size() != 0" checks to "players.size() != getBotCount()"

pull/3/head
Jessica James 9 years ago
parent
commit
e0d156f97f
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 2
      RenX.Announcements/RenX_Announcements.cpp
  3. 4
      RenX.Commands/RenX_Commands.cpp
  4. 2
      RenX.Core/RenX_LadderDatabase.cpp
  5. 4
      RenX.IRCJoin/RenX_IRCJoin.cpp
  6. 2
      RenX.Ladder/RenX_Ladder.cpp
  7. 4
      RenX.Medals/RenX_Medals.cpp
  8. 4
      RenX.ModSystem/RenX_ModSystem.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

2
RenX.Announcements/RenX_Announcements.cpp

@ -53,7 +53,7 @@ void RenX_AnnouncementsPlugin::announce(unsigned int)
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
server = core->getServer(i);
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
{
msg = announcement;
RenX::processTags(msg, server);

4
RenX.Commands/RenX_Commands.cpp

@ -332,7 +332,7 @@ void PlayersIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
if (server->isLogChanType(type))
{
noServers = false;
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
{
// End string containers
Jupiter::DLList<Jupiter::String> gStrings;
@ -488,7 +488,7 @@ void PlayerTableIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStri
if (server->isLogChanType(type))
{
noServers = false;
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
{
Jupiter::SLList<RenX::PlayerInfo> gPlayers;
Jupiter::SLList<RenX::PlayerInfo> nPlayers;

2
RenX.Core/RenX_LadderDatabase.cpp

@ -369,7 +369,7 @@ void RenX::LadderDatabase::sort_entries()
void RenX::LadderDatabase::updateLadder(RenX::Server *server, const RenX::TeamType &team, bool output_times)
{
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
{
// update player stats in memory
RenX::PlayerInfo *player;

4
RenX.IRCJoin/RenX_IRCJoin.cpp

@ -58,7 +58,7 @@ void RenX_IRCJoinPlugin::OnJoin(Jupiter::IRC::Client *source, const Jupiter::Rea
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
server = RenX::getCore()->getServer(i);
if (checkType() && (RenX_IRCJoinPlugin::joinMsgAlways || server->players.size() != 0))
if (checkType() && (RenX_IRCJoinPlugin::joinMsgAlways || server->players.size() != server->getBotCount()))
server->sendMessage(msg);
}
}
@ -94,7 +94,7 @@ void RenX_IRCJoinPlugin::OnPart(Jupiter::IRC::Client *source, const Jupiter::Rea
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
server = RenX::getCore()->getServer(i);
if (checkType() && (RenX_IRCJoinPlugin::partMsgAlways || server->players.size() != 0))
if (checkType() && (RenX_IRCJoinPlugin::partMsgAlways || server->players.size() != server->getBotCount()))
server->sendMessage(msg);
}
}

2
RenX.Ladder/RenX_Ladder.cpp

@ -45,7 +45,7 @@ RenX_LadderPlugin::RenX_LadderPlugin()
void RenX_LadderPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore)
{
if (server->hasSeenStart() && server->players.size() != 0) // the first game doesn't count!
if (server->hasSeenStart() && server->players.size() != server->getBotCount()) // the first game doesn't count!
{
char chr = static_cast<char>(team);
server->varData.set(this->name, "t"_jrs, Jupiter::ReferenceString(chr));

4
RenX.Medals/RenX_Medals.cpp

@ -168,7 +168,7 @@ void RenX_MedalsPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo
void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore)
{
if (server->hasSeenStart() && server->players.size() != 0) // No unfair medals for the first game! :D
if (server->hasSeenStart() && server->players.size() != server->getBotCount()) // No unfair medals for the first game! :D
{
Jupiter::DLList<RenX::PlayerInfo>::Node *n = server->players.getNode(0);
RenX::PlayerInfo *pInfo = n->data;
@ -290,7 +290,7 @@ void RenX_MedalsPlugin::init()
for (unsigned int i = 0; i < sCount; i++)
{
server = core->getServer(i);
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
{
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = server->players.getNode(0); n != nullptr; n = n->next)
{

4
RenX.ModSystem/RenX_ModSystem.cpp

@ -106,7 +106,7 @@ void RenX_ModSystemPlugin::init()
while (total != 0)
{
server = core->getServer(--total);
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = server->players.getNode(0); n != nullptr; n = n->next)
RenX_ModSystemPlugin::auth(server, n->data, true);
}
@ -314,7 +314,7 @@ RenX_ModSystemPlugin::~RenX_ModSystemPlugin()
while (total != 0)
{
server = core->getServer(--total);
if (server->players.size() != 0)
if (server->players.size() != server->getBotCount())
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = server->players.getNode(0); n != nullptr; n = n->next)
{
player = n->data;

Loading…
Cancel
Save