cleanup
- fix possible crash in conc (but it's still an ugly hack) - fix noob usage of strcmp - flag some memory leaks (it would be nice, if the author(s) would clean up the mess himself) - fix crash in substr - whitespace cleanup there are plenty more memory leaks in command.cpp - for example, every goto in cubescript does not clean up anything
This commit is contained in:
@@ -127,7 +127,7 @@ bool CBot::FindEnemy(void)
|
||||
{
|
||||
m_pMyEnt->enemy = player1;
|
||||
}
|
||||
|
||||
|
||||
return m_pMyEnt->enemy != NULL;
|
||||
}
|
||||
|
||||
@@ -2035,7 +2035,7 @@ bool CBot::IsInFOV(const vec &o)
|
||||
dir = forward;
|
||||
dir.z = 0; // Make 2D
|
||||
|
||||
// ideal direction
|
||||
// ideal direction
|
||||
target = o;
|
||||
target.sub(m_pMyEnt->o);
|
||||
target.z = 0.0f; // Make 2D
|
||||
@@ -2045,5 +2045,5 @@ bool CBot::IsInFOV(const vec &o)
|
||||
flAngle = acos(flDot/(target.magnitude() * dir.magnitude()));
|
||||
|
||||
return m_pBotSkill->iFov/2.0f >= flAngle/RAD;
|
||||
}
|
||||
}
|
||||
// Code of CBot - End
|
||||
|
||||
Reference in New Issue
Block a user