X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fobject_properties.h;fp=src%2Fobject_properties.h;h=772807fd994dae7f7f3773a1a40e97e105edc20d;hb=4faaadc8d50d6ab7a19d22bd5a760c4b8321a51f;hp=908757a644752d8fa0f29df058cd7ac35128df6d;hpb=8f7785771b9e02b1a1daf7a252550d78ea93053d;p=minetest.git diff --git a/src/object_properties.h b/src/object_properties.h index 908757a64..772807fd9 100644 --- a/src/object_properties.h +++ b/src/object_properties.h @@ -29,28 +29,28 @@ with this program; if not, write to the Free Software Foundation, Inc., struct ObjectProperties { // Values are BS=1 - s16 hp_max; - bool physical; - bool collideWithObjects; - float weight; - aabb3f collisionbox; - std::string visual; - std::string mesh; - v2f visual_size; + s16 hp_max = 1; + bool physical = false; + bool collideWithObjects = true; + float weight = 5.0f; + aabb3f collisionbox = aabb3f(-0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f); + std::string visual = "sprite"; + std::string mesh = ""; + v2f visual_size = v2f(1, 1); std::vector textures; std::vector colors; - v2s16 spritediv; + v2s16 spritediv = v2s16(1, 1); v2s16 initial_sprite_basepos; - bool is_visible; - bool makes_footstep_sound; - float automatic_rotate; - f32 stepheight; - bool automatic_face_movement_dir; - f32 automatic_face_movement_dir_offset; - bool backface_culling; - std::string nametag; - video::SColor nametag_color; - f32 automatic_face_movement_max_rotation_per_sec; + bool is_visible = true; + bool makes_footstep_sound = false; + float automatic_rotate = 0.0f; + f32 stepheight = 0.0f; + bool automatic_face_movement_dir = false; + f32 automatic_face_movement_dir_offset = 0.0f; + bool backface_culling = true; + std::string nametag = ""; + video::SColor nametag_color = video::SColor(255, 255, 255, 255); + f32 automatic_face_movement_max_rotation_per_sec = -1.0f; std::string infotext; //! For dropped items, this contains item information. std::string wield_item;