This commit is contained in:
Benau 2022-09-15 01:11:14 +08:00
parent 787d157933
commit 9947c87fe1
2 changed files with 9 additions and 3 deletions

View File

@ -46,8 +46,14 @@ AbstractKart::AbstractKart(const std::string& ident,
: Moveable()
{
m_world_kart_id = world_kart_id;
const RemoteKartInfo& rki = RaceManager::get()->getKartInfo(m_world_kart_id);
loadKartProperties(ident, handicap, ri, rki.getKartData());
if (RaceManager::get()->getKartGlobalPlayerId(m_world_kart_id) > -1)
{
const RemoteKartInfo& rki = RaceManager::get()->getKartInfo(
m_world_kart_id);
loadKartProperties(ident, handicap, ri, rki.getKartData());
}
else
loadKartProperties(ident, handicap, ri);
} // AbstractKart
// ----------------------------------------------------------------------------

View File

@ -82,7 +82,7 @@ private:
void loadKartProperties(const std::string& new_ident,
HandicapLevel handicap,
std::shared_ptr<GE::GERenderInfo> ri,
const KartData& kart_data);
const KartData& kart_data = KartData());
protected:
btTransform m_starting_transform;