1
0

Mob bugfixes

* Mobs no longer require constant line-of-sight to a player to remain
aggravated
* Fixed an ASSERT
* Fixed mobs jumping
* Fixed Idle state not properly using AI
+ Added FILE_IO_PREFIX to favicon loading
+ Implemented #563
This commit is contained in:
Tiger Wang
2014-01-25 14:42:26 +00:00
parent fd7fc7e59e
commit 314fc3cdac
6 changed files with 54 additions and 26 deletions

View File

@@ -234,7 +234,11 @@ cWorld::cWorld(const AString & a_WorldName) :
m_WorldName(a_WorldName),
m_IniFileName(m_WorldName + "/world.ini"),
m_StorageSchema("Default"),
#ifdef _arm_
m_StorageCompressionFactor(3),
#else
m_StorageCompressionFactor(6),
#endif
m_IsSpawnExplicitlySet(false),
m_WorldAgeSecs(0),
m_TimeOfDaySecs(0),
@@ -2419,7 +2423,7 @@ bool cWorld::FindAndDoWithPlayer(const AString & a_PlayerNameHint, cPlayerListCa
// TODO: This interface is dangerous!
cPlayer * cWorld::FindClosestPlayer(const Vector3f & a_Pos, float a_SightLimit)
cPlayer * cWorld::FindClosestPlayer(const Vector3f & a_Pos, float a_SightLimit, bool a_CheckLineOfSight)
{
cTracer LineOfSight(this);
@@ -2434,7 +2438,12 @@ cPlayer * cWorld::FindClosestPlayer(const Vector3f & a_Pos, float a_SightLimit)
if (Distance < ClosestDistance)
{
if (!LineOfSight.Trace(a_Pos,(Pos - a_Pos),(int)(Pos - a_Pos).Length()))
if (a_CheckLineOfSight && !LineOfSight.Trace(a_Pos,(Pos - a_Pos),(int)(Pos - a_Pos).Length()))
{
ClosestDistance = Distance;
ClosestPlayer = *itr;
}
else
{
ClosestDistance = Distance;
ClosestPlayer = *itr;