summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_core.cpp4
-rw-r--r--src/ai/ai_scanner.cpp9
-rw-r--r--src/ai/ai_scanner.hpp4
3 files changed, 12 insertions, 5 deletions
diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp
index ac2f00f65..de4034b6b 100644
--- a/src/ai/ai_core.cpp
+++ b/src/ai/ai_core.cpp
@@ -143,9 +143,9 @@
if (AI::scanner_info == NULL) {
TarScanner::DoScan(TarScanner::AI);
AI::scanner_info = new AIScannerInfo();
- AI::scanner_info->Initialize("AIScanner");
+ AI::scanner_info->Initialize();
AI::scanner_library = new AIScannerLibrary();
- AI::scanner_library->Initialize("AISCanner");
+ AI::scanner_library->Initialize();
}
}
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 6dfebc4ac..3ab0b431e 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -27,9 +27,9 @@ AIScannerInfo::AIScannerInfo() :
{
}
-void AIScannerInfo::Initialize(const char *name)
+void AIScannerInfo::Initialize()
{
- ScriptScanner::Initialize(name);
+ ScriptScanner::Initialize("AIScanner");
/* Create the dummy AI */
free(this->main_script);
@@ -140,6 +140,11 @@ AIInfo *AIScannerInfo::FindInfo(const char *nameParam, int versionParam, bool fo
}
+void AIScannerLibrary::Initialize()
+{
+ ScriptScanner::Initialize("AIScanner");
+}
+
void AIScannerLibrary::GetScriptName(ScriptInfo *info, char *name, int len)
{
AILibrary *library = static_cast<AILibrary *>(info);
diff --git a/src/ai/ai_scanner.hpp b/src/ai/ai_scanner.hpp
index 2f55c8594..97fdba04c 100644
--- a/src/ai/ai_scanner.hpp
+++ b/src/ai/ai_scanner.hpp
@@ -19,7 +19,7 @@ public:
AIScannerInfo();
~AIScannerInfo();
- /* virtual */ void Initialize(const char *name);
+ /* virtual */ void Initialize();
/**
* Select a random AI.
@@ -54,6 +54,8 @@ private:
class AIScannerLibrary : public ScriptScanner {
public:
+ /* virtual */ void Initialize();
+
/**
* Find a library in the pool.
* @param library The library name to find.