Arreglado el color del marcador al cambiar de paleta

This commit is contained in:
2022-11-02 17:25:42 +01:00
parent c3a82b938f
commit 5302e16064
10 changed files with 130 additions and 81 deletions

View File

@@ -21,7 +21,6 @@ Player::Player(player_t player)
color = stringToColor(options->palette, "white");
onBorder = false;
border = BORDER_TOP;
invincible = false;
autoMovement = false;
alive = true;
maxFallHeight = BLOCK * 4;
@@ -433,6 +432,13 @@ void Player::move()
autoMovement = false;
}
// Si ha salido de una superficie automatica, detiene el movimiento automatico
if (state == s_standing && isOnFloor() && !isOnAutoSurface())
{
// Deja de estar enganchado a la superficie automatica
autoMovement = false;
}
// Se mueve hacia arriba
if (vy < 0.0f)
{
@@ -688,7 +694,7 @@ playerSpawn_t Player::getSpawnParams()
void Player::reLoadTexture()
{
sprite->getTexture()->reLoad();
//texture->reLoad();
// texture->reLoad();
}
// Recarga la paleta
@@ -729,18 +735,6 @@ void Player::updateFeet()
feet[1] = {p.x + 7, p.y + h - 1};
}
// Obtiene el valor de la variable
bool Player::getInvincible()
{
return invincible;
}
// Establece el valor de la variable
void Player::setInvincible(bool value)
{
invincible = value;
}
// Cambia el estado del jugador
void Player::setState(state_e value)
{