Browse Source

Added tieFormat to ServerProfile; GDI's score is now correctly parsed during a tie.

pull/3/head
JustinAJ 10 years ago
parent
commit
5e63a045fa
  1. 12
      RenX.Core/RenX_Server.cpp
  2. 2
      RenX.Core/RenX_ServerProfile.cpp
  3. 1
      RenX.Core/RenX_ServerProfile.h

12
RenX.Core/RenX_Server.cpp

@ -851,7 +851,17 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
}
else if (playerData.equals("Tie"))
{
int gScore = action.gotoToken(1, '=').asInt(10);
int gScore;
switch (RenX::Server::profile->tieFormat)
{
default:
case 1:
gScore = buff.getToken(2, RenX::DelimC).gotoToken(1, '=').asInt(10);
break;
case 0:
gScore = action.gotoToken(1, '=').asInt(10);
break;
}
int nScore = buff.getToken(3, RenX::DelimC).gotoToken(1, '=').asInt(10);
this->needsCList = true;

2
RenX.Core/RenX_ServerProfile.cpp

@ -26,6 +26,7 @@ struct BaseProfile : RenX::ServerProfile
disconnectOnGameOver = false;
pidbug = false;
mustSanitize = true;
tieFormat = 1;
}
} _baseProfile;
const RenX::ServerProfile *RenX::defaultProfile = &_baseProfile;
@ -46,6 +47,7 @@ struct OpenBeta2Profile : BaseProfile
{
privateMessages = false;
pidbug = true;
tieFormat = 0;
}
} _openBeta2Profile;
const RenX::ServerProfile *RenX::openBeta2Profile = &_openBeta2Profile;

1
RenX.Core/RenX_ServerProfile.h

@ -37,6 +37,7 @@ namespace RenX
bool disconnectOnGameOver;
bool pidbug;
bool mustSanitize;
int tieFormat;
};
RENX_API extern const ServerProfile *defaultProfile; /** Default server profile */

Loading…
Cancel
Save