- removed the bot related properties from AWeapon.

This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
This commit is contained in:
Christoph Oelckers 2018-11-24 23:48:23 +01:00
commit 8eb4697fbd
10 changed files with 131 additions and 89 deletions

View file

@ -13,6 +13,7 @@
#include "d_protocol.h"
#include "r_defs.h"
#include "a_pickups.h"
#include "a_weapons.h"
#include "stats.h"
#define FORWARDWALK 0x1900
@ -49,6 +50,7 @@
#define MMAXSELECT 100 //Maximum number of monsters that can be selected at a time.
struct FCheckPosition;
class AWeapon;
struct botskill_t
{
@ -78,6 +80,34 @@ struct botinfo_t
int lastteam;
};
struct BotInfoData
{
int MoveCombatDist = 0;
int flags = 0;
PClassActor *projectileType = nullptr;
};
enum
{
BIF_BOT_REACTION_SKILL_THING = 1,
BIF_BOT_EXPLOSIVE = 2,
BIF_BOT_BFG = 4,
};
using BotInfoMap = TMap<FName, BotInfoData>;
extern BotInfoMap BotInfo;
inline BotInfoData GetBotInfo(AWeapon *weap)
{
if (weap == nullptr) return BotInfoData();
auto k = BotInfo.CheckKey(weap->GetClass()->TypeName);
if (k) return *k;
return BotInfoData();
}
//Used to keep all the globally needed variables in nice order.
class FCajunMaster
{