Bugfix: if items were switched when a game is restarted, they would
remain switched. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4749 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -202,7 +202,15 @@ void ItemManager::cleanup()
|
||||
*/
|
||||
void ItemManager::reset()
|
||||
{
|
||||
std::vector<AllItemTypes::iterator> to_delete;
|
||||
// If items are switched, switch them back first.
|
||||
if(m_switch_time>=0)
|
||||
{
|
||||
for(AllItemTypes::iterator i =m_all_items.begin();
|
||||
i!=m_all_items.end(); i++)
|
||||
(*i)->switchBack();
|
||||
m_switch_time = -1.0f;
|
||||
|
||||
}
|
||||
AllItemTypes::iterator i=m_all_items.begin();
|
||||
while(i!=m_all_items.end())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user