X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=a037c5f65c62ac11494cc96b93d0b19312f0c86f;hb=9a5d43a4f517e4f2e1810fe7c08b10e650552c52;hp=6086bf09f7e29d6fbccf01abfcf5a25330ff981d;hpb=6d0ea26c2d62c3774ff384cf1bfc2a3372b49a3b;p=minetest.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index 6086bf09f..a037c5f65 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -19,84 +19,103 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "object_properties.h" #include "irrlichttypes_bloated.h" +#include "exceptions.h" #include "util/serialize.h" +#include "util/basic_macros.h" #include -#include -#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" -#define PP2(x) "("<<(x).X<<","<<(x).Y<<")" - -ObjectProperties::ObjectProperties(): - hp_max(1), - physical(false), - 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) +ObjectProperties::ObjectProperties() { - textures.push_back("unknown_object.png"); - colors.push_back(video::SColor(255,255,255,255)); + textures.emplace_back("unknown_object.png"); + colors.emplace_back(255,255,255,255); } std::string ObjectProperties::dump() { std::ostringstream os(std::ios::binary); - os<<"hp_max="<