physent-volume resize with collision detection for better crouching

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2838 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-10-05 12:50:44 +00:00
parent 7e5728a5ab
commit 1a8ad9e4d1
11 changed files with 78 additions and 63 deletions
+2 -2
View File
@@ -982,7 +982,7 @@ void CBot::DoCombatNav()
{
// Bot has already found an entity, still valid?
vec v(m_pTargetEnt->x, m_pTargetEnt->y,
S(m_pTargetEnt->x, m_pTargetEnt->y)->floor+m_pMyEnt->dyneyeheight());
S(m_pTargetEnt->x, m_pTargetEnt->y)->floor+m_pMyEnt->eyeheight);
if ((GetDistance(v) > 25.0f) || !IsVisible(m_pTargetEnt))
m_pTargetEnt = NULL;
}
@@ -1003,7 +1003,7 @@ void CBot::DoCombatNav()
{
condebug("Combat ent");
vec v(m_pTargetEnt->x, m_pTargetEnt->y,
S(m_pTargetEnt->x, m_pTargetEnt->y)->floor+m_pMyEnt->dyneyeheight());
S(m_pTargetEnt->x, m_pTargetEnt->y)->floor+m_pMyEnt->eyeheight);
debugbeam(m_pMyEnt->o, v);