summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--projects/openttd_vs100.vcxproj6
-rw-r--r--src/company_cmd.cpp2
-rw-r--r--src/music/dmusic.cpp2
-rw-r--r--src/script/api/script_list.cpp6
4 files changed, 6 insertions, 10 deletions
diff --git a/projects/openttd_vs100.vcxproj b/projects/openttd_vs100.vcxproj
index 04e35c228..40fb5a69d 100644
--- a/projects/openttd_vs100.vcxproj
+++ b/projects/openttd_vs100.vcxproj
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@@ -144,7 +144,6 @@
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <Profile>true</Profile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -244,7 +243,6 @@
<OptimizeReferences>true</OptimizeReferences>
<TargetMachine>MachineX64</TargetMachine>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
- <Profile>true</Profile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -1223,4 +1221,4 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index db0200a34..d4627078f 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -695,7 +695,7 @@ void OnTick_Companies()
}
if (_next_competitor_start == 0) {
- _next_competitor_start = 1; //AI::GetStartNextTime() * DAY_TICKS;
+ _next_competitor_start = AI::GetStartNextTime() * DAY_TICKS;
}
if (AI::CanStartNew() && _game_mode != GM_MENU && --_next_competitor_start == 0) {
diff --git a/src/music/dmusic.cpp b/src/music/dmusic.cpp
index d44f210cb..cb255e7c0 100644
--- a/src/music/dmusic.cpp
+++ b/src/music/dmusic.cpp
@@ -9,7 +9,7 @@
/** @file dmusic.cpp Playing music via DirectMusic. */
-#ifdef WIN32_ENABLE_DIRECTMUSIC_SUPPORT_2
+#ifdef WIN32_ENABLE_DIRECTMUSIC_SUPPORT
#define INITGUID
#include "../stdafx.h"
diff --git a/src/script/api/script_list.cpp b/src/script/api/script_list.cpp
index f6f2f4596..14d400bcb 100644
--- a/src/script/api/script_list.cpp
+++ b/src/script/api/script_list.cpp
@@ -818,15 +818,13 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm)
sq_push(vm, 2);
for (ScriptListMap::iterator iter = this->items.begin(); iter != this->items.end(); iter++) {
- int key = (*iter).first;
-
/* Check for changing of items. */
int previous_modification_count = this->modifications;
/* Push the root table as instance object, this is what squirrel does for meta-functions. */
sq_pushroottable(vm);
/* Push all arguments for the valuator function. */
- sq_pushinteger(vm, key);
+ sq_pushinteger(vm, (*iter).first);
for (int i = 0; i < nparam - 1; i++) {
sq_push(vm, i + 3);
}
@@ -870,7 +868,7 @@ SQInteger ScriptList::Valuate(HSQUIRRELVM vm)
return sq_throwerror(vm, _SC("modifying valuated list outside of valuator function"));
}
- this->SetValue(key, value);
+ this->SetValue((*iter).first, value);
/* Pop the return value. */
sq_poptop(vm);