- Made DBot inherit from DObject.
This commit is contained in:
parent
db323643f8
commit
c400dcf736
6 changed files with 41 additions and 21 deletions
|
|
@ -24,6 +24,11 @@ IMPLEMENT_POINTY_CLASS(DBot)
|
|||
END_POINTERS
|
||||
|
||||
DBot::DBot ()
|
||||
{
|
||||
Clear ();
|
||||
}
|
||||
|
||||
void DBot::Clear ()
|
||||
{
|
||||
savedyaw = 0;
|
||||
savedpitch = 0;
|
||||
|
|
@ -123,6 +128,11 @@ void FCajunMaster::ClearPlayer (int i, bool keepTeam)
|
|||
bot->inuse = false;
|
||||
bot->lastteam = keepTeam ? players[i].userinfo.GetTeam() : TEAM_NONE;
|
||||
}
|
||||
if (players[i].Bot != NULL)
|
||||
{
|
||||
players[i].Bot->Destroy ();
|
||||
players[i].Bot = NULL;
|
||||
}
|
||||
players[i].~player_t();
|
||||
::new(&players[i]) player_t;
|
||||
players[i].userinfo.Reset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue