1 /************************************************************************
3 * Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
6 * voxelands - 3d voxel world sandbox game
7 * Copyright (C) Lisa 'darkrose' Milne 2013-2014 <lisa@ltmnet.com>
9 * This program is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 * See the GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>
22 * License updated from GPLv2 or later to GPLv3 or later by Lisa Milne
24 ************************************************************************/
27 #ifndef ACTIVEOBJECT_HEADER
28 #define ACTIVEOBJECT_HEADER
30 #include "common_irrlicht.h"
33 #define ACTIVEOBJECT_TYPE_INVALID 0
34 // Other types are defined in content_object.h
36 struct ActiveObjectMessage
38 ActiveObjectMessage(u16 id_
, bool reliable_
=true, std::string data_
=""):
46 std::string datastring
;
50 Parent class for ServerActiveObject and ClientActiveObject
70 virtual u8
getType() const = 0;
73 u16 m_id
; // 0 is invalid, "no id"
76 struct DistanceSortedActiveObject
81 DistanceSortedActiveObject(ActiveObject
*a_obj
, f32 a_d
)
87 bool operator < (DistanceSortedActiveObject
&other
)