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
|
// Convierte una cadena a minusculas
|
||||||
std::string toLower(std::string str)
|
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);
|
char *lower = (char *)malloc(str.size() + 1);
|
||||||
for (int i = 0; i < str.size(); ++i)
|
for (int i = 0; i < str.size(); ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -401,7 +401,7 @@ void Director::initOptions()
|
|||||||
options->online.server = "jaildoctor.duckdns.org";
|
options->online.server = "jaildoctor.duckdns.org";
|
||||||
options->online.port = 9911;
|
options->online.port = 9911;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
options->online.gameID = "coffee_crisis_test";
|
options->online.gameID = "coffee_crisis_test2";
|
||||||
#else
|
#else
|
||||||
options->online.gameID = "coffee_crisis";
|
options->online.gameID = "coffee_crisis";
|
||||||
#endif
|
#endif
|
||||||
@@ -898,7 +898,7 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
|
|||||||
|
|
||||||
else if (var == "jailerID")
|
else if (var == "jailerID")
|
||||||
{
|
{
|
||||||
options->online.jailerID = value;
|
options->online.jailerID = toLower(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opciones de notificaciones
|
// Opciones de notificaciones
|
||||||
|
|||||||
@@ -1739,7 +1739,7 @@ void Game::renderScoreBoard()
|
|||||||
{
|
{
|
||||||
if (jscore::getNumUsers() > 0)
|
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);
|
textScoreBoard->writeCentered(PLAY_AREA_CENTER_X, offset4, txt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user