diff --git a/src/config/stk_config.cpp b/src/config/stk_config.cpp index 2f257ebc1..fbf29e86d 100644 --- a/src/config/stk_config.cpp +++ b/src/config/stk_config.cpp @@ -133,7 +133,7 @@ void STKConfig::load(const std::string &filename) Log::fatal("StkConfig", "Invalid default port values."); } CHECK_NEG(m_max_karts, "getNode("startup")) { - startup_node->get("penalty", &m_penalty_time ); + float f; + startup_node->get("penalty", &f); + m_penalty_ticks = time2Ticks(f); } if (const XMLNode *news_node= root->getNode("news")) @@ -356,7 +359,9 @@ void STKConfig::getAllData(const XMLNode * root) if(const XMLNode *switch_node= root->getNode("switch")) { switch_node->get("items", &m_switch_items ); - switch_node->get("time", &m_item_switch_time); + float f; + if( switch_node->get("time", &f) ) + m_item_switch_ticks = stk_config->time2Ticks(f); } if(const XMLNode *bubblegum_node= root->getNode("bubblegum")) diff --git a/src/config/stk_config.hpp b/src/config/stk_config.hpp index 7aa593696..107e4fb4b 100644 --- a/src/config/stk_config.hpp +++ b/src/config/stk_config.hpp @@ -59,22 +59,24 @@ public: * - SAME: give it one more item of the type it currently has. * - ONLY_IF_SAME: only give it one more item if the randomly chosen item * has the same type as the currently held item. */ - enum {POWERUP_MODE_NEW, - POWERUP_MODE_SAME, - POWERUP_MODE_ONLY_IF_SAME} - m_same_powerup_mode; + enum { + POWERUP_MODE_NEW, + POWERUP_MODE_SAME, + POWERUP_MODE_ONLY_IF_SAME + } + m_same_powerup_mode; static float UNDEFINED; float m_bomb_time; /**