3 Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #ifndef ACTIVEOBJECT_HEADER
21 #define ACTIVEOBJECT_HEADER
23 #include "irr_aabb3d.h"
26 enum ActiveObjectType {
27 ACTIVEOBJECT_TYPE_INVALID = 0,
28 ACTIVEOBJECT_TYPE_TEST = 1,
30 ACTIVEOBJECT_TYPE_ITEM = 2,
31 ACTIVEOBJECT_TYPE_RAT = 3,
32 ACTIVEOBJECT_TYPE_OERKKI1 = 4,
33 ACTIVEOBJECT_TYPE_FIREFLY = 5,
34 ACTIVEOBJECT_TYPE_MOBV2 = 6,
35 // End deprecated stuff
36 ACTIVEOBJECT_TYPE_LUAENTITY = 7,
37 // Special type, not stored as a static object
38 ACTIVEOBJECT_TYPE_PLAYER = 100,
39 // Special type, only exists as CAO
40 ACTIVEOBJECT_TYPE_GENERIC = 101,
42 // Other types are defined in content_object.h
44 struct ActiveObjectMessage
46 ActiveObjectMessage(u16 id_, bool reliable_=true, std::string data_=""):
54 std::string datastring;
58 Parent class for ServerActiveObject and ClientActiveObject
78 virtual ActiveObjectType getType() const = 0;
79 virtual bool getCollisionBox(aabb3f *toset) = 0;
80 virtual bool collideWithObjects() = 0;
82 u16 m_id; // 0 is invalid, "no id"