Allow showing online addon kart as tux when live join is on

This commit is contained in:
Benau 2020-08-23 16:38:59 +08:00
parent 40c3f1a290
commit bdbf961e76
2 changed files with 6 additions and 1 deletions

View File

@ -480,6 +480,9 @@ namespace UserConfigParams
PARAM_PREFIX BoolUserConfigParam m_soccer_player_list
PARAM_DEFAULT( BoolUserConfigParam(false, "soccer-player-list",
&m_race_setup_group, "Show player list icon in soccer mode.") );
PARAM_PREFIX BoolUserConfigParam m_addon_tux_online
PARAM_DEFAULT( BoolUserConfigParam(false, "addon-tux-online",
&m_race_setup_group, "Always show online addon karts as tux when live join is on.") );
// ---- Wiimote data
PARAM_PREFIX GroupUserConfigParam m_wiimote_group

View File

@ -19,6 +19,7 @@
#include "karts/abstract_kart.hpp"
#include "config/user_config.hpp"
#include "items/attachment.hpp"
#include "items/powerup.hpp"
#include "karts/abstract_kart_animation.hpp"
@ -85,6 +86,7 @@ void AbstractKart::loadKartProperties(const std::string& new_ident,
{
// For addon kart in network we use the same hitbox (tux) so anyone
// can use any addon karts with different graphical kart model
if (!UserConfigParams::m_addon_tux_online)
kp_addon = kp;
kp = kart_properties_manager->getKart(std::string("tux"));
}