51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+// This file contains the DEPRECATED MapBlockObject system
+
#include "mapblockobject.h"
#include "mapblock.h"
-// Only for ::getNodeBox, TODO: Get rid of this
+// For object wrapping
#include "map.h"
#include "inventory.h"
-#include "irrlichtwrapper.h"
+#include "utility.h"
/*
MapBlockObject
void MovingObject::move(float dtime, v3f acceleration)
{
- DSTACK("%s: typeid=%i, pos=(%f,%f,%f), speed=(%f,%f,%f)"
+ DSTACKF("%s: typeid=%i, pos=(%f,%f,%f), speed=(%f,%f,%f)"
", dtime=%f, acc=(%f,%f,%f)",
__FUNCTION_NAME,
getTypeId(),
// walking over map borders
}
- core::aabbox3d<f32> nodebox = Map::getNodeBox(
- v3s16(x,y,z));
+ core::aabbox3d<f32> nodebox = getNodeBox(v3s16(x,y,z), BS);
// See if the object is touching ground
if(
InventoryItem *item = createInventoryItem();
if(item)
texture = item->getImage();
- /*else
- texture = g_irrlicht->getTexture(porting::getDataPath("cloud.png").c_str());*/
if(item)
delete item;
return texture;
core::map<s16, bool> ids_to_delete;
{
- DSTACK("%s: stepping objects", __FUNCTION_NAME);
+ DSTACKF("%s: stepping objects", __FUNCTION_NAME);
for(core::map<s16, MapBlockObject*>::Iterator
i = m_objects.getIterator();
{
MapBlockObject *obj = i.getNode()->getValue();
- DSTACK("%s: stepping object type %i", __FUNCTION_NAME,
+ DSTACKF("%s: stepping object type %i", __FUNCTION_NAME,
obj->getTypeId());
if(server)
}
{
- DSTACK("%s: deleting objects", __FUNCTION_NAME);
+ DSTACKF("%s: deleting objects", __FUNCTION_NAME);
// Delete objects in delete queue
for(core::map<s16, bool>::Iterator
return;
{
- DSTACK("%s: object wrap loop", __FUNCTION_NAME);
+ DSTACKF("%s: object wrap loop", __FUNCTION_NAME);
for(core::map<s16, MapBlockObject*>::Iterator
i = m_objects.getIterator();