huge weapon-code cleanup (buggy!), pch, demo fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1475 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-24 21:38:53 +00:00
parent 8ace59243e
commit 9c3e74cbdf
47 changed files with 795 additions and 627 deletions
+2
View File
@@ -10,6 +10,8 @@
//
//
#include "pch.h"
#include "cube.h"
#include "bot.h"
#ifdef AC_CUBE
+4 -3
View File
@@ -8,7 +8,8 @@
//
#include "pch.h"
#include "cube.h"
#include "bot.h"
#ifdef AC_CUBE
@@ -83,8 +84,8 @@ bool CACBot::ChoosePreferredWeapon()
SelectGun(bestWeapon);
if(!m_pMyEnt->mag[bestWeapon])
{
reload(m_pMyEnt);
m_iShootDelay = lastmillis + reloadtime(bestWeapon) + 10;
tryreload(m_pMyEnt);
m_iShootDelay = lastmillis + reloadtime(bestWeapon) + 10;
}
return true;
}
+3 -1
View File
@@ -10,6 +10,8 @@
//
//
#include "pch.h"
#include "cube.h"
#include "bot.h"
vector<botent *> bots;
@@ -302,7 +304,7 @@ float CBot::GetDistance(entity *e)
bool CBot::SelectGun(int Gun)
{
if(m_pMyEnt->reloading) return false;
if(m_pMyEnt->weaponsel->reloading) return false;
if (m_pMyEnt->gunselect != Gun) playsound(S_GUNCHANGE, m_pMyEnt);
m_pMyEnt->gunselect = Gun;
return true;
+3 -1
View File
@@ -10,6 +10,8 @@
// Code of CBot - Start
#include "pch.h"
#include "cube.h"
#include "bot.h"
extern weaponinfo_s WeaponInfoTable[MAX_WEAPONS];
@@ -771,7 +773,7 @@ void CBot::CheckReload() // reload gun if no enemies are around
{
if(m_pMyEnt->enemy) return;
SelectGun(m_pMyEnt->primary);
reload(m_pMyEnt);
tryreload(m_pMyEnt);
return;
}
+2
View File
@@ -10,6 +10,8 @@
//
//
#include "pch.h"
#include "cube.h"
#include "bot.h"
// Function code by PMB - Begin
+2
View File
@@ -7,6 +7,8 @@
// Author: Rick <[email protected]>
//
#include "pch.h"
#include "cube.h"
#include "bot.h"
vec v_debuggoal = g_vecZero;
+3
View File
@@ -10,8 +10,11 @@
//
//
#include "pch.h"
#include "cube.h"
#include "bot.h"
#ifndef VANILLA_CUBE // UNDONE
bool dedserv = false;
#define CS_DEDHOST 0xFF