Core/AI: use NullGameObjectAI for gameobjects with ScriptName

- use GameObjectAI with Transports too

--HG--
branch : trunk
This commit is contained in:
Rat
2010-10-25 18:11:52 +02:00
parent b282438198
commit 064b3fd2b3
4 changed files with 14 additions and 4 deletions
@@ -26,6 +26,7 @@
#include "DBCStores.h"
#include "ProgressBar.h"
#include "World.h"
#include "GameObjectAI.h"
void MapManager::LoadTransports()
{
@@ -544,6 +545,13 @@ bool Transport::RemovePassenger(Player* passenger)
void Transport::Update(uint32 p_diff)
{
if(!AI())
{
if (!AIM_Initialize())
sLog.outError("Could not initialize GameObjectAI for Transport");
} else
AI()->UpdateAI(p_diff);
if (m_WayPoints.size() <= 1)
return;