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:
@@ -10,6 +10,8 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "cube.h"
|
||||
#include "bot.h"
|
||||
|
||||
#ifdef AC_CUBE
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "cube.h"
|
||||
#include "bot.h"
|
||||
|
||||
// Function code by PMB - Begin
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
// Author: Rick <[email protected]>
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "cube.h"
|
||||
#include "bot.h"
|
||||
|
||||
vec v_debuggoal = g_vecZero;
|
||||
|
||||
@@ -10,8 +10,11 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include "pch.h"
|
||||
#include "cube.h"
|
||||
#include "bot.h"
|
||||
|
||||
|
||||
#ifndef VANILLA_CUBE // UNDONE
|
||||
bool dedserv = false;
|
||||
#define CS_DEDHOST 0xFF
|
||||
|
||||
Reference in New Issue
Block a user