- 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:
parent
83d84eaae9
commit
db323643f8
24 changed files with 356 additions and 327 deletions
|
|
@ -3116,7 +3116,7 @@ void AActor::Tick ()
|
|||
special2++;
|
||||
}
|
||||
//Added by MC: Freeze mode.
|
||||
if (bglobal.freeze && !(player && !player->Bot.isbot))
|
||||
if (bglobal.freeze && !(player && player->Bot == NULL))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -3237,18 +3237,18 @@ void AActor::Tick ()
|
|||
bglobal.m_Thinking = true;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || !players[i].Bot.isbot)
|
||||
if (!playeringame[i] || players[i].Bot == NULL)
|
||||
continue;
|
||||
|
||||
if (flags3 & MF3_ISMONSTER)
|
||||
{
|
||||
if (health > 0
|
||||
&& !players[i].Bot.enemy
|
||||
&& !players[i].Bot->enemy
|
||||
&& player ? !IsTeammate (players[i].mo) : true
|
||||
&& P_AproxDistance (players[i].mo->x-x, players[i].mo->y-y) < MAX_MONSTER_TARGET_DIST
|
||||
&& P_CheckSight (players[i].mo, this, SF_SEEPASTBLOCKEVERYTHING))
|
||||
{ //Probably a monster, so go kill it.
|
||||
players[i].Bot.enemy = this;
|
||||
players[i].Bot->enemy = this;
|
||||
}
|
||||
}
|
||||
else if (flags & MF_SPECIAL)
|
||||
|
|
@ -3260,10 +3260,10 @@ void AActor::Tick ()
|
|||
}
|
||||
else if (flags & MF_MISSILE)
|
||||
{
|
||||
if (!players[i].Bot.missile && (flags3 & MF3_WARNBOT))
|
||||
if (!players[i].Bot->missile && (flags3 & MF3_WARNBOT))
|
||||
{ //warn for incoming missiles.
|
||||
if (target != players[i].mo && bglobal.Check_LOS (players[i].mo, this, ANGLE_90))
|
||||
players[i].Bot.missile = this;
|
||||
players[i].Bot->missile = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue