Añadido limite de caracteres para el jailerID en el marcador
This commit is contained in:
@@ -579,7 +579,9 @@ std::string boolToString(bool value)
|
||||
// Convierte una cadena a minusculas
|
||||
std::string toLower(std::string str)
|
||||
{
|
||||
char *original = str.c_str();
|
||||
return str;
|
||||
|
||||
const char *original = str.c_str();
|
||||
char *lower = (char *)malloc(str.size() + 1);
|
||||
for (int i = 0; i < str.size(); ++i)
|
||||
{
|
||||
|
||||
@@ -401,7 +401,7 @@ void Director::initOptions()
|
||||
options->online.server = "jaildoctor.duckdns.org";
|
||||
options->online.port = 9911;
|
||||
#ifdef DEBUG
|
||||
options->online.gameID = "coffee_crisis_test";
|
||||
options->online.gameID = "coffee_crisis_test2";
|
||||
#else
|
||||
options->online.gameID = "coffee_crisis";
|
||||
#endif
|
||||
@@ -898,7 +898,7 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
|
||||
|
||||
else if (var == "jailerID")
|
||||
{
|
||||
options->online.jailerID = value;
|
||||
options->online.jailerID = toLower(value);
|
||||
}
|
||||
|
||||
// Opciones de notificaciones
|
||||
|
||||
@@ -1739,7 +1739,7 @@ void Game::renderScoreBoard()
|
||||
{
|
||||
if (jscore::getNumUsers() > 0)
|
||||
{
|
||||
const std::string txt = jscore::getUserName(0) + " - " + updateScoreText((Uint32)jscore::getPoints(0));
|
||||
const std::string txt = jscore::getUserName(0).substr(0,12) + " - " + updateScoreText((Uint32)jscore::getPoints(0));
|
||||
textScoreBoard->writeCentered(PLAY_AREA_CENTER_X, offset4, txt);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user