X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fobject_properties.cpp;h=89ca26274a805b239e20431e0b45442dd92f7572;hb=2607b97b4f2b41767d7a010e9376d3e7f578cb71;hp=eb26db8d3f5a01fafc067dbbabc29ef05d706a74;hpb=fb0c43186422ad985e70f73bc70eeb07cc194909;p=dragonfireclient.git diff --git a/src/object_properties.cpp b/src/object_properties.cpp index eb26db8d3..89ca26274 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,9 +18,10 @@ 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 -#include #define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")" #define PP2(x) "("<<(x).X<<","<<(x).Y<<")" @@ -28,23 +29,27 @@ 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(""), - animation_frames(1,1), - animation_speed(15), - animation_blend(0), 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) { - animation_bone_position[""] = v3f(0,0,0); - animation_bone_rotation[""] = v3f(0,0,0); textures.push_back("unknown_object.png"); + colors.push_back(video::SColor(255,255,255,255)); } std::string ObjectProperties::dump() @@ -52,40 +57,31 @@ std::string ObjectProperties::dump() std::ostringstream os(std::ios::binary); os<<"hp_max="<::const_iterator ii = animation_bone_position.begin(); ii != animation_bone_position.end(); ++ii){ - std::string bone_name = (*ii).first; - v3f bone_pos = (*ii).second; - os<::const_iterator ii = animation_bone_rotation.begin(); ii != animation_bone_rotation.end(); ++ii){ - std::string bone_name = (*ii).first; - v3f bone_rot = (*ii).second; - os<::const_iterator ii = animation_bone_position.begin(); ii != animation_bone_position.end(); ++ii){ - os<::const_iterator ii = animation_bone_rotation.begin(); ii != animation_bone_rotation.end(); ++ii){ - os<