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")) 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); int nScore = buff.getToken(3, RenX::DelimC).gotoToken(1, '=').asInt(10);
this->needsCList = true; this->needsCList = true;

2
RenX.Core/RenX_ServerProfile.cpp

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

1
RenX.Core/RenX_ServerProfile.h

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

Loading…
Cancel
Save