Fixes against upstream Nuclide. Added zpak001.pk3dir/def/bot.def and make use of it.
This commit is contained in:
parent
bc4bd883b4
commit
a8250fd244
4 changed files with 11 additions and 16 deletions
|
@ -23,7 +23,7 @@ vector getEntityCenterPos(entity e) {
|
|||
return newVec;
|
||||
}
|
||||
|
||||
class csbot:bot
|
||||
class csbot:NSBot
|
||||
{
|
||||
void(void) csbot;
|
||||
|
||||
|
@ -372,6 +372,10 @@ void csbot::AimLerp(vector aimpos, float flLerp) {
|
|||
void
|
||||
csbot::PostFrame(void)
|
||||
{
|
||||
if (team == 0) {
|
||||
CSEv_JoinAuto();
|
||||
}
|
||||
|
||||
team = infokeyf(this, "*team");
|
||||
m_gflagsBackup = gflags;
|
||||
};
|
||||
|
@ -439,7 +443,6 @@ csbot::GetVIPSafetyZoneByIndex(int index)
|
|||
void
|
||||
csbot::csbot(void)
|
||||
{
|
||||
bot::bot();
|
||||
targetname = "_csbot_";
|
||||
team = infokeyf(this, "*team");
|
||||
m_actionIsPlanting = FALSE;
|
||||
|
|
|
@ -252,6 +252,7 @@ CSDeathmatchRules::ConsoleCommand(NSClientPlayer pp, string cmd)
|
|||
tokenize(cmd);
|
||||
|
||||
switch (argv(0)) {
|
||||
#if 0
|
||||
case "bot_add":
|
||||
bot pete = (bot)Bot_AddQuick();
|
||||
Bot_RandomColormap(pete);
|
||||
|
@ -262,6 +263,7 @@ CSDeathmatchRules::ConsoleCommand(NSClientPlayer pp, string cmd)
|
|||
pete.SetInfoKey("model", argv(2));
|
||||
search_end(pm);
|
||||
break;
|
||||
#endif
|
||||
case "jumptest":
|
||||
makevectors(pp.v_angle);
|
||||
traceline(pp.origin + pp.view_ofs, pp.origin + pp.view_ofs + v_forward * 1024, FALSE, pp);
|
||||
|
|
|
@ -1082,26 +1082,12 @@ CSMultiplayerRules::PlayerSpawn(NSClientPlayer pl)
|
|||
forceinfokey(pl, "*team", "0");
|
||||
}
|
||||
|
||||
void
|
||||
CSMultiplayerRules_BotJoin(void)
|
||||
{
|
||||
spawnfunc_csbot();
|
||||
CSEv_JoinAuto();
|
||||
}
|
||||
|
||||
bool
|
||||
CSMultiplayerRules::ConsoleCommand(NSClientPlayer pp, string cmd)
|
||||
{
|
||||
tokenize(cmd);
|
||||
|
||||
switch (argv(0)) {
|
||||
case "bot_add":
|
||||
entity bot_ent = Bot_AddQuick();
|
||||
if (bot_ent) {
|
||||
bot_ent.think = CSMultiplayerRules_BotJoin;
|
||||
bot_ent.nextthink = time;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return (false);
|
||||
}
|
||||
|
|
4
zpak001.pk3dir/def/bot.def
Normal file
4
zpak001.pk3dir/def/bot.def
Normal file
|
@ -0,0 +1,4 @@
|
|||
entityDef bot
|
||||
{
|
||||
spawnclass csbot
|
||||
}
|
Loading…
Reference in a new issue