- Moved bot thinking logic into DBot.

This commit is contained in:
ChillyDoom 2014-11-14 16:54:56 +00:00
commit ee977f94d7
12 changed files with 153 additions and 135 deletions

View file

@ -3066,7 +3066,6 @@ void player_t::Serialize (FArchive &arc)
if (SaveVersion < 4514 && IsBot)
{
Bot = new DBot;
GC::WriteBarrier (Bot);
arc << Bot->angle
<< Bot->dest
@ -3089,6 +3088,12 @@ void player_t::Serialize (FArchive &arc)
<< Bot->oldx
<< Bot->oldy;
}
if (SaveVersion < 4516 && Bot != NULL)
{
Bot->player = this;
}
if (arc.IsLoading ())
{
// If the player reloaded because they pressed +use after dying, we