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() : Moveable()
{ {
m_world_kart_id = world_kart_id; m_world_kart_id = world_kart_id;
const RemoteKartInfo& rki = RaceManager::get()->getKartInfo(m_world_kart_id); if (RaceManager::get()->getKartGlobalPlayerId(m_world_kart_id) > -1)
loadKartProperties(ident, handicap, ri, rki.getKartData()); {
const RemoteKartInfo& rki = RaceManager::get()->getKartInfo(
m_world_kart_id);
loadKartProperties(ident, handicap, ri, rki.getKartData());
}
else
loadKartProperties(ident, handicap, ri);
} // AbstractKart } // AbstractKart
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

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