1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef RYAI_CONTROL_NPC_H
18 #define RYAI_CONTROL_NPC_H
25 //////////////////////////////////////////////////////////////////////////////
26 // CPlayerControlNpc //
27 //////////////////////////////////////////////////////////////////////////////
29 class CPlayerControlNpc
: public NLMISC::CRefCount
33 /// \param player : the player which controls the bot
34 /// \param bot : the npc which is controlled by the player
35 CPlayerControlNpc(CBotPlayer
* player
, CSpawnBotNpc
* bot
);
38 /// check if the object is valid
39 /// WARNING: you cannot call any other method if this returns false
42 /// update the control on the npc
43 void updateControl(uint ticks
);
44 CSpawnBotNpc
* getSpawnBot() const;
47 /// the player controlling the bot
48 NLMISC::CRefPtr
<CBotPlayer
> _Player
;
50 CProfilePtr _ControlProfileManager
;
51 uint32 _LastPathUpdate
;
52 NLMISC::CEntityId _CPlayerEntityId
;
53 NLMISC::CEntityId _CNpcEntityId
;