X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects%2FObject.cpp;h=84cc17353b84b487274acd4a478ac33f60029f70;hb=00a07ffc6abc6e36cf790448e694155f021c7b9d;hp=081f23de9686df7fea95b21a5c034f41948c0b2c;hpb=b9a46d8e2b7e7e22c706e7dd3734f31015db4408;p=lugaru.git diff --git a/Source/Objects/Object.cpp b/Source/Objects/Object.cpp index 081f23d..84cc173 100644 --- a/Source/Objects/Object.cpp +++ b/Source/Objects/Object.cpp @@ -1,6 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games -Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) +Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -556,7 +556,8 @@ void Object::LoadObjectsFromFile(FILE* tfile, bool skip) int numobjects; int type; XYZ position; - float yaw, pitch, scale, lastscale; + float yaw, pitch, scale; + float lastscale = 1.0f; funpackf(tfile, "Bi", &numobjects); if (!skip) { objects.clear(); @@ -635,6 +636,7 @@ void Object::Draw() void Object::DeleteObject(int which) { objects.erase(objects.begin() + which); + terrain.DeleteObject(which); } void Object::MakeObject(int atype, XYZ where, float ayaw, float apitch, float ascale)