From bdbf961e76b09e761ecfcf868e45106d8d4ef3b6 Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 23 Aug 2020 16:38:59 +0800 Subject: [PATCH] Allow showing online addon kart as tux when live join is on --- src/config/user_config.hpp | 3 +++ src/karts/abstract_kart.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index fa42398e5..c397350db 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -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 diff --git a/src/karts/abstract_kart.cpp b/src/karts/abstract_kart.cpp index de61c0df8..bee9c6474 100644 --- a/src/karts/abstract_kart.cpp +++ b/src/karts/abstract_kart.cpp @@ -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,7 +86,8 @@ 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 - kp_addon = kp; + if (!UserConfigParams::m_addon_tux_online) + kp_addon = kp; kp = kart_properties_manager->getKart(std::string("tux")); } if (kp == NULL)