X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects%2FObject.cpp;fp=Source%2FObjects%2FObject.cpp;h=db6249f7cd61c15057ce92f2c7cc7c008ecf2d5f;hb=fa4037412902fd926281cd9b06d0f00db680138f;hp=1189f365243c75a0fdb33193a35f599313c5213b;hpb=bdf3ebaf05ce8dc8d59e321a07c66598db181eb7;p=lugaru.git diff --git a/Source/Objects/Object.cpp b/Source/Objects/Object.cpp index 1189f36..db6249f 100644 --- a/Source/Objects/Object.cpp +++ b/Source/Objects/Object.cpp @@ -49,7 +49,7 @@ Texture Object::rocktextureptr; Object::Object() : position(), - type(0), + type(boxtype), yaw(0), pitch(0), rotx(0), @@ -70,7 +70,7 @@ Object::Object() : { } -Object::Object(int _type, XYZ _position, float _yaw, float _pitch, float _scale) : Object() +Object::Object(object_type _type, XYZ _position, float _yaw, float _pitch, float _scale) : Object() { scale = _scale; type = _type; @@ -714,7 +714,7 @@ void Object::LoadObjectsFromFile(FILE* tfile, bool skip) if (type == treeleavestype) { scale = lastscale; } - objects.emplace_back(new Object(type, position, yaw, pitch, scale)); + objects.emplace_back(new Object(object_type(type), position, yaw, pitch, scale)); lastscale = scale; } } @@ -788,7 +788,7 @@ void Object::MakeObject(int atype, XYZ where, float ayaw, float apitch, float as { if ((atype != treeleavestype && atype != bushtype) || foliage == 1) { unsigned nextid = objects.size(); - objects.emplace_back(new Object(atype, where, ayaw, apitch, ascale)); + objects.emplace_back(new Object(object_type(atype), where, ayaw, apitch, ascale)); objects.back()->addToTerrain(nextid); } }