X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=f560f59343a6d6507e6993d8b2aaacb43c84b2af;hb=58e6d25e033c76dc91aaac18fdeda92ac23fe0e1;hp=08e9f63cf71c47c2636b047890681a0e9a5f5878;hpb=b22168d3da597d61c40cc93dd690ba143fd5e4cc;p=oweals%2Fminetest.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index 08e9f63cf..f560f5934 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -1,24 +1,27 @@ /* -Minetest-c55 -Copyright (C) 2012 celeron55, Perttu Ahola +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +GNU Lesser General Public License for more details. -You should have received a copy of the GNU General Public License along +You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "object_properties.h" -#include "utility.h" +#include "irrlichttypes_bloated.h" +#include "exceptions.h" +#include "util/serialize.h" +#include #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" #define PP2(x) "("<<(x).X<<","<<(x).Y<<")" @@ -26,17 +29,23 @@ with this program; if not, write to the Free Software Foundation, Inc., ObjectProperties::ObjectProperties(): hp_max(1), physical(false), + collideWithObjects(true), weight(5), collisionbox(-0.5,-0.5,-0.5, 0.5,0.5,0.5), visual("sprite"), + mesh(""), visual_size(1,1), spritediv(1,1), initial_sprite_basepos(0,0), is_visible(true), makes_footstep_sound(false), - automatic_rotate(0) + automatic_rotate(0), + stepheight(0), + automatic_face_movement_dir(false), + automatic_face_movement_dir_offset(0.0) { textures.push_back("unknown_object.png"); + colors.push_back(video::SColor(255,255,255,255)); } std::string ObjectProperties::dump() @@ -44,15 +53,22 @@ std::string ObjectProperties::dump() std::ostringstream os(std::ios::binary); os<<"hp_max="<