X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=a77368151db64753f26314cf7b7fffbbfd53117d;hb=605599b6f150b89ba6539c4d088231b326adcb48;hp=3a36addc75e57265f4a761bfb7552f21bacac3a2;hpb=0a020dbcc848ae2debec664846e08bd097d70320;p=dragonfireclient.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index 3a36addc7..a77368151 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 @@ -18,28 +18,36 @@ 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 -#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" -#define PP2(x) "("<<(x).X<<","<<(x).Y<<")" - 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(""), - texture(""), 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), + backface_culling(true), + nametag(""), + nametag_color(255, 255, 255, 255), + automatic_face_movement_max_rotation_per_sec(-1) { textures.push_back("unknown_object.png"); + colors.push_back(video::SColor(255,255,255,255)); } std::string ObjectProperties::dump() @@ -47,22 +55,31 @@ std::string ObjectProperties::dump() std::ostringstream os(std::ios::binary); os<<"hp_max="<