X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=e330bc24a0dffb8ac75a7614a8c063aef2c8d32b;hb=12d1e4ff0486f86ae20051daa1135dc7db366023;hp=ec988a37d2a511422ed67a90c9a89828c6bdbb5e;hpb=bb454b184656735b51fea17a0cb6276514b1c8c1;p=minetest.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index ec988a37d..e330bc24a 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -1,6 +1,6 @@ /* -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 Lesser General Public License as published by @@ -19,72 +19,74 @@ 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="<