Skip to content

Commit

Permalink
[12901] Scripted creatures which are on transport shouldn't move to h…
Browse files Browse the repository at this point in the history
…ome position
  • Loading branch information
xfurry committed Aug 10, 2015
1 parent 3aabee3 commit a53a3f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/game/CreatureEventAI.cpp
Expand Up @@ -1087,7 +1087,8 @@ void CreatureEventAI::EnterEvadeMode()
m_creature->DeleteThreatList();
m_creature->CombatStop(true);

if (m_creature->isAlive())
// only alive creatures that are not on transport can return to home position
if (m_creature->isAlive() && !m_creature->IsBoarded())
m_creature->GetMotionMaster()->MoveTargetedHome();

m_creature->SetLootRecipient(NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12900"
#define REVISION_NR "12901"
#endif // __REVISION_NR_H__

3 comments on commit a53a3f6

@Schmoozerd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor glitch here: Boarded would also be True I think for an npc on a transporter - who could actually return home
(even if this is not yet supported)

However no need to change anything here right now i think. First things first.

@xfurry
Copy link
Member Author

@xfurry xfurry commented on a53a3f6 Aug 11, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am aware of this.
Anyway we need to change the behavior of the MoveTargetedHome() function to use the local coordinates for the npcs which are on transport.

But, as you said, let's do that first, then we can change this to something proper.

@Schmoozerd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough :)

Please sign in to comment.