- Renamed FBot to DBot and made it inherit from DThinker.

- Fixed: Bots added by players other than the net arbitrator did not have their skill set.
This commit is contained in:
ChillyDoom 2014-10-14 19:57:11 +01:00
commit db323643f8
24 changed files with 356 additions and 327 deletions

View file

@ -1,7 +1,7 @@
// Cajun bot console commands.
// Cajun bot
//
// [RH] Moved out of d_netcmd.c (in Cajun source), because they don't really
// belong there.
// [RH] Moved console commands out of d_netcmd.c (in Cajun source), because
// they don't really belong there.
#include "c_cvars.h"
#include "c_dispatch.h"
@ -14,6 +14,71 @@
#include "d_net.h"
#include "farchive.h"
IMPLEMENT_POINTY_CLASS(DBot)
DECLARE_POINTER(dest)
DECLARE_POINTER(prev)
DECLARE_POINTER(enemy)
DECLARE_POINTER(missile)
DECLARE_POINTER(mate)
DECLARE_POINTER(last_mate)
END_POINTERS
DBot::DBot ()
{
savedyaw = 0;
savedpitch = 0;
angle = 0;
dest = NULL;
prev = NULL;
enemy = NULL;
missile = NULL;
mate = NULL;
last_mate = NULL;
memset(&skill, 0, sizeof(skill));
t_active = 0;
t_respawn = 0;
t_strafe = 0;
t_react = 0;
t_fight = 0;
t_roam = 0;
t_rocket = 0;
first_shot = true;
sleft = false;
allround = false;
increase = false;
oldx = 0;
oldy = 0;
}
void DBot::Serialize (FArchive &arc)
{
Super::Serialize (arc);
arc << savedyaw
<< savedpitch
<< angle
<< dest
<< prev
<< enemy
<< missile
<< mate
<< last_mate
<< skill
<< t_active
<< t_respawn
<< t_strafe
<< t_react
<< t_fight
<< t_roam
<< t_rocket
<< first_shot
<< sleft
<< allround
<< increase
<< oldx
<< oldy;
}
CVAR (Int, bot_next_color, 11, 0)
CVAR (Bool, bot_observer, false, 0)