fixing bots

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6023 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
flowtron
2011-01-18 06:00:21 +00:00
parent 63e847ac75
commit b967a54ed7
6 changed files with 532 additions and 552 deletions
+15 -15
View File
@@ -1,7 +1,7 @@
//
// C++ Implementation: bot
//
// Description: Main bot code for Action Cube
// Description: Main bot code for AssaultCube
//
// Main bot file
//
@@ -23,14 +23,14 @@ extern void spawnstate(playerent *d);
void CACBot::Spawn()
{
// Init all bot variabeles
m_pMyEnt->nextprimary = 2 + rnd(4);
m_pMyEnt->targetyaw = m_pMyEnt->targetpitch = 0.0f;
m_pMyEnt->pBot = this;
// Init all bot variabeles
m_pMyEnt->nextprimary = 2 + rnd(5); // 2011jan18:ft: 2 == GUN_RIFLE, GUN_SHOTGUN, GUN_SUBGUN, GUN_SNIPER, GUN_ASSAULT - if CPISTOL is activated this needs a FIXME to rnd(6)
m_pMyEnt->targetyaw = m_pMyEnt->targetpitch = 0.0f;
m_pMyEnt->pBot = this;
spawnplayer(m_pMyEnt);
m_eCurrentBotState = STATE_NORMAL;
spawnplayer(m_pMyEnt);
m_eCurrentBotState = STATE_NORMAL;
m_iShootDelay = m_iChangeWeaponDelay = 0;
m_iCheckEnvDelay = 0;
m_vPrevOrigin = g_vecZero;
@@ -39,7 +39,7 @@ void CACBot::Spawn()
m_iStuckTime = 0;
m_iStrafeTime = m_iStrafeCheckDelay = 0;
m_iMoveDir = DIR_NONE;
m_pPrevEnemy = NULL;
m_iCombatNavTime = 0;
m_iSPMoveTime = 0;
@@ -52,27 +52,27 @@ void CACBot::Spawn()
m_pHuntTarget = NULL;
m_fPrevHuntDist = 0.0f;
m_iHuntLastTurnLessTime = m_iHuntPlayerUpdateTime = m_iHuntPauseTime = 0;
m_iLastJumpPad = 0;
m_pTargetEnt = NULL;
m_iCheckTeleporterDelay = m_iCheckJumppadsDelay = 0;
m_iCheckEntsDelay = 0;
m_iCheckTriggersDelay = 0;
m_iLookForWaypointTime = 0;
m_iAimDelay = 0;
m_fYawToTurn = m_fPitchToTurn = 0.0f;
m_vGoal = m_vWaterGoal = g_vecZero;
ResetWaypointVars();
}
void CACBot::CheckItemPickup()
{
checkitems(m_pMyEnt);
checkitems(m_pMyEnt);
}
// AC Bot class end
#endif