1
0

Large reworking of mob code [SEE DESC]

+ Implemented better pathfinding
- Removed lots of unused variables, functions, etc.
* Changed some variable types
* Other miscellaneous fixes, and also completes the previous PRs
This commit is contained in:
Tiger Wang
2014-01-24 19:57:32 +00:00
parent 161a1c7274
commit 9c0e3615ce
7 changed files with 336 additions and 244 deletions

View File

@@ -108,7 +108,7 @@ void cWolf::Tick(float a_Dt, cChunk & a_Chunk)
m_bMovingToDestination = false;
}
cPlayer * a_Closest_Player = FindClosestPlayer();
cPlayer * a_Closest_Player = m_World->FindClosestPlayer(GetPosition(), m_SightDistance);
if (a_Closest_Player != NULL)
{
switch (a_Closest_Player->GetEquippedItem().m_ItemType)