From 51f0c70b7ea7eca2b0fcc05a38fa155b7378741f Mon Sep 17 00:00:00 2001 From: "shadowu@mail.bg" Date: Fri, 19 Dec 2008 00:37:40 +0200 Subject: *Movement Generators standardization. - bool GetDestination(&x,&y,&z) added to all movement generators.(it is used by update of players view distance) - Fixed when creature entering in combat not count this as StoppedByPlayer. - Random Movement Generator - added support for creating custom spawndist during the game. - Random Movement Generator - Db spawndist is checked only at initialize(NOT in each sellect of random location). - Added Random Movement to motion master - it can be called now by MoveRandom(spawndist) e.g. for use in SD2. - Home and Random movements no more using RespawnCoords(Home Position has implemented) - Fixed bug when creature is moving on path and enter combat, after that returns to spawn position. -Typo fix in Confused Movement Generator --HG-- branch : trunk --- src/game/Object.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/Object.cpp') diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 858f141aa6c..efd041f34c2 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1542,7 +1542,8 @@ Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, floa return NULL; } - pCreature->Summon(spwtype, despwtime); + pCreature->SetHomePosition(x, y, z, ang); + pCreature->Summon(spwtype, despwtime); if(GetTypeId()==TYPEID_UNIT && ((Creature*)this)->AI()) ((Creature*)this)->AI()->JustSummoned(pCreature); -- cgit v1.2.3