update to 1.5.1-RC1

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2015-05-10 22:35:04 +03:00
parent df183bf405
commit 0a0d7d9546
50 changed files with 2044 additions and 1818 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: ai_changelog.hpp 27195 2015-03-18 19:33:34Z frosch $ */
/* $Id: ai_changelog.hpp 27275 2015-05-08 18:06:44Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -15,6 +15,10 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
* \b 1.5.1
*
* No changes
*
* \b 1.5.0
*
* API additions:

View File

@@ -1,4 +1,4 @@
/* $Id: game_changelog.hpp 27195 2015-03-18 19:33:34Z frosch $ */
/* $Id: game_changelog.hpp 27275 2015-05-08 18:06:44Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -15,6 +15,10 @@
* functions may still be available if you return an older API version
* in GetAPIVersion() in info.nut.
*
* \b 1.5.1
*
* No changes
*
* \b 1.5.0
*
* API additions:

View File

@@ -1,4 +1,4 @@
/* $Id: script_list.cpp 27166 2015-02-22 23:04:02Z frosch $ */
/* $Id: script_list.cpp 27272 2015-05-08 17:32:57Z frosch $ */
/*
* This file is part of OpenTTD.
@@ -556,6 +556,8 @@ void ScriptList::Sort(SorterType sorter, bool ascending)
void ScriptList::AddList(ScriptList *list)
{
if (list == this) return;
ScriptListMap *list_items = &list->items;
for (ScriptListMap::iterator iter = list_items->begin(); iter != list_items->end(); iter++) {
this->AddItem((*iter).first);
@@ -565,6 +567,8 @@ void ScriptList::AddList(ScriptList *list)
void ScriptList::SwapList(ScriptList *list)
{
if (list == this) return;
this->items.swap(list->items);
this->buckets.swap(list->buckets);
Swap(this->sorter, list->sorter);
@@ -694,9 +698,13 @@ void ScriptList::RemoveList(ScriptList *list)
{
this->modifications++;
ScriptListMap *list_items = &list->items;
for (ScriptListMap::iterator iter = list_items->begin(); iter != list_items->end(); iter++) {
this->RemoveItem((*iter).first);
if (list == this) {
Clear();
} else {
ScriptListMap *list_items = &list->items;
for (ScriptListMap::iterator iter = list_items->begin(); iter != list_items->end(); iter++) {
this->RemoveItem((*iter).first);
}
}
}
@@ -756,14 +764,12 @@ void ScriptList::KeepBottom(int32 count)
void ScriptList::KeepList(ScriptList *list)
{
if (list == this) return;
this->modifications++;
ScriptList tmp;
for (ScriptListMap::iterator iter = this->items.begin(); iter != this->items.end(); iter++) {
tmp.AddItem((*iter).first);
tmp.SetValue((*iter).first, (*iter).second);
}
tmp.AddList(this);
tmp.RemoveList(list);
this->RemoveList(&tmp);
}