Some improvements to some things.

This commit is contained in:
BenDol
2014-06-02 10:04:56 +12:00
parent a7d7667491
commit 2df51622ba
7 changed files with 34 additions and 15 deletions

View File

@@ -1597,10 +1597,12 @@ void Game::setClientVersion(int version)
void Game::setAttackingCreature(const CreaturePtr& creature)
{
CreaturePtr oldCreature = m_attackingCreature;
m_attackingCreature = creature;
if(creature != m_attackingCreature) {
CreaturePtr oldCreature = m_attackingCreature;
m_attackingCreature = creature;
g_lua.callGlobalField("g_game", "onAttackingCreatureChange", creature, oldCreature);
g_lua.callGlobalField("g_game", "onAttackingCreatureChange", creature, oldCreature);
}
}
void Game::setFollowingCreature(const CreaturePtr& creature)