Core: Some optimizations
- Declare some functions const - Fix some mem leak - Fix some resource leak - Remove unused variables and functions - Remove duplicate functions - Reduce the scope of some variables - Remove unused file --HG-- branch : trunk
This commit is contained in:
@@ -384,7 +384,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateCombatState() || !CheckInRoom())
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
@@ -377,7 +377,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateCombatState())
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!UpdateCombatState() || !CheckInRoom())
|
||||
if (!UpdateVictim() || !CheckInRoom())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if ((phase != PHASE_BIRTH && !UpdateCombatState()) || !CheckInRoom())
|
||||
if ((phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
|
||||
return;
|
||||
|
||||
if (CanTheHundredClub)
|
||||
|
||||
Reference in New Issue
Block a user