From b898b81e85c14cc779cbc97a2cfe82ff75bd7b3d Mon Sep 17 00:00:00 2001 From: danij Date: Sun, 6 Oct 2013 03:07:01 +0100 Subject: [PATCH] Refactor|World|Client: Objlink blockmap refactoring continues... In the absence of better alternative I've opted to rename these as "ContactBlockmaps" for now. --- doomsday/client/include/world/p_objlink.h | 36 +-- doomsday/client/src/dd_main.cpp | 2 +- doomsday/client/src/render/rend_main.cpp | 2 +- doomsday/client/src/world/map.cpp | 16 +- doomsday/client/src/world/p_objlink.cpp | 355 +++++++++++----------- doomsday/client/src/world/world.cpp | 4 +- 6 files changed, 206 insertions(+), 209 deletions(-) diff --git a/doomsday/client/include/world/p_objlink.h b/doomsday/client/include/world/p_objlink.h index 611202aedb..1db4588a32 100644 --- a/doomsday/client/include/world/p_objlink.h +++ b/doomsday/client/include/world/p_objlink.h @@ -33,55 +33,43 @@ class Lumobj; * the Zone with a >= PU_MAP purge level and access to them is handled * with global pointers. * - * @todo Encapsulate allocation of and access to the objlink blockmaps - * within de::Map + * @todo Encapsulate allocation of and access to the blockmaps in de::Map */ -void R_DestroyObjlinkBlockmap(); +void R_DestroyContactBlockmaps(); /** * Construct the objlink blockmap for the current map. */ -void R_InitObjlinkBlockmapForMap(de::Map &map); +void R_InitContactBlockmaps(de::Map &map); /** * Initialize the object => BspLeaf contact lists, ready for linking to * objects. To be called at the beginning of a new world frame. */ -void R_InitForNewFrame(de::Map &map); - -/** - * To be called at the begining of a render frame to clear the objlink - * blockmap prior to linking objects for the new viewer. - */ -void R_ClearObjlinksForFrame(); +void R_ClearContacts(de::Map &map); /** * Create a new object link of the specified @a type in the objlink blockmap. */ -void R_ObjlinkCreate(struct mobj_s &mobj); +void R_AddContact(struct mobj_s &mobj); /// @copydoc R_ObjlinkCreate() -void R_ObjlinkCreate(Lumobj &lumobj); +void R_AddContact(Lumobj &lumobj); /** - * To be called at the beginning of a render frame to link all objects - * into the objlink blockmap. + * To be called at the beginning of a render frame to link all objects into the + * objlink blockmap. + * + * @todo Why don't we link contacts immediately? -ds */ -void R_LinkObjs(); +void R_LinkContacts(); /** * Spread object => BspLeaf links for the given @a BspLeaf. Note that all object * types will be spread at this time. It is assumed that the BSP leaf is @em not * degenerate. */ -void R_InitForBspLeaf(BspLeaf &bspLeaf); - -/** - * Create a new object => BspLeaf contact. - */ -void R_LinkObjToBspLeaf(BspLeaf &bspLeaf, struct mobj_s &mobj); -/// @copydoc R_LinkObjToBspLeaf() -void R_LinkObjToBspLeaf(BspLeaf &bspLeaf, Lumobj &lumobj); +void R_SpreadContacts(BspLeaf &bspLeaf); /** * Traverse the list of mobj contacts which have been linked with @a bspLeaf for diff --git a/doomsday/client/src/dd_main.cpp b/doomsday/client/src/dd_main.cpp index 9541680634..84fd8f7b6e 100644 --- a/doomsday/client/src/dd_main.cpp +++ b/doomsday/client/src/dd_main.cpp @@ -1500,7 +1500,7 @@ bool App_ChangeGame(Game &game, bool allowReload) #ifdef __CLIENT__ R_ClearViewData(); - R_DestroyObjlinkBlockmap(); + R_DestroyContactBlockmaps(); P_ControlShutdown(); Con_Execute(CMDS_DDAY, "clearbindings", true, false); diff --git a/doomsday/client/src/render/rend_main.cpp b/doomsday/client/src/render/rend_main.cpp index c0dbe18bcf..35e7b5f22f 100644 --- a/doomsday/client/src/render/rend_main.cpp +++ b/doomsday/client/src/render/rend_main.cpp @@ -2499,7 +2499,7 @@ static void drawCurrentLeaf() leaf->markVisible(); markLeafFrontFacingWalls(); - R_InitForBspLeaf(*leaf); + R_SpreadContacts(*leaf); Rend_RadioBspLeafEdges(*leaf); /* diff --git a/doomsday/client/src/world/map.cpp b/doomsday/client/src/world/map.cpp index f0fa43b0ae..0f680c1204 100644 --- a/doomsday/client/src/world/map.cpp +++ b/doomsday/client/src/world/map.cpp @@ -1144,12 +1144,12 @@ DENG2_OBSERVES(bsp::Partitioner, UnclosedSectorFound) /** * Create new objlinks for mobj => BSP leaf contact spreading. */ - void createMobjLinks() + void createMobjContacts() { foreach(Sector *sector, sectors) for(mobj_t *iter = sector->firstMobj(); iter; iter = iter->sNext) { - R_ObjlinkCreate(*iter); + R_AddContact(*iter); } } @@ -2694,7 +2694,7 @@ Lumobj &Map::addLumobj(Lumobj const &lumobj) lum.setIndexInMap(d->lumobjs.count() - 1); lum.bspLeafAtOrigin().link(lum); - R_ObjlinkCreate(lum); // For spreading purposes. + R_AddContact(lum); // For spreading purposes. return lum; } @@ -2902,10 +2902,8 @@ void Map::worldFrameBegins(World &world, bool resetNextViewer) removeAllLumobjs(); - R_ClearObjlinksForFrame(); // Zeroes the links. - - // Clear the objlinks. - R_InitForNewFrame(*this); + // Clear the "contact" blockmaps (BSP leaf => object). + R_ClearContacts(*this); // Generate surface decorations for the frame. if(useLightDecorations) @@ -2942,13 +2940,13 @@ void Map::worldFrameBegins(World &world, bool resetNextViewer) } // Create objlinks for mobjs. - d->createMobjLinks(); + d->createMobjContacts(); // Link all active particle generators into the world. P_CreatePtcGenLinks(); // Link objs to all contacted surfaces. - R_LinkObjs(); + R_LinkContacts(); } } diff --git a/doomsday/client/src/world/p_objlink.cpp b/doomsday/client/src/world/p_objlink.cpp index f33168ff70..baecf5e09d 100644 --- a/doomsday/client/src/world/p_objlink.cpp +++ b/doomsday/client/src/world/p_objlink.cpp @@ -40,25 +40,24 @@ using namespace de; #define BLOCK_SIZE 128 -enum objtype_t +enum ContactType { - OT_MOBJ = 0, - OT_LUMOBJ = 1, - NUM_OBJ_TYPES -}; + ContactMobj = 0, + ContactLumobj, -#define VALID_OBJTYPE(val) ((val) >= OT_MOBJ && (val) < NUM_OBJ_TYPES) + ContactTypeCount +}; /// @todo Obviously, polymorphism is a better solution. -struct objlink_t +struct Contact { - objlink_t *nextInBlock; /// Next in the same obj block, or NULL. - objlink_t *nextUsed; - objlink_t *next; /// Next in list of ALL objlinks. - objtype_t _type; + Contact *nextInBlock; /// Next in the same obj block, or NULL. + Contact *nextUsed; + Contact *next; /// Next in list of ALL objlinks. + ContactType _type; void *_object; - objtype_t type() const + ContactType type() const { return _type; } @@ -81,8 +80,8 @@ struct objlink_t { switch(_type) { - case OT_LUMOBJ: return objectAs().origin(); - case OT_MOBJ: return Mobj_Origin(objectAs()); + case ContactLumobj: return objectAs().origin(); + case ContactMobj: return Mobj_Origin(objectAs()); default: DENG2_ASSERT(false); @@ -97,8 +96,8 @@ struct objlink_t { switch(_type) { - case OT_LUMOBJ: return objectAs().radius(); - case OT_MOBJ: return Mobj_VisualRadius(&objectAs()); + case ContactLumobj: return objectAs().radius(); + case ContactMobj: return Mobj_VisualRadius(&objectAs()); default: DENG2_ASSERT(false); @@ -124,8 +123,8 @@ struct objlink_t { switch(_type) { - case OT_LUMOBJ: return objectAs().bspLeafAtOrigin(); - case OT_MOBJ: return Mobj_BspLeafAtOrigin(objectAs()); + case ContactLumobj: return objectAs().bspLeafAtOrigin(); + case ContactMobj: return Mobj_BspLeafAtOrigin(objectAs()); default: throw Error("oblink_t::objectBspLeafAtOrigin", "Invalid type"); @@ -133,12 +132,12 @@ struct objlink_t } }; -class objlinkblockmap_t +class ContactBlockmap { public: struct CellData { - objlink_t *head; + Contact *head; bool doneSpread; ///< Used to prevent repeated per-frame processing of a block. void unlinkAll() @@ -149,7 +148,7 @@ class objlinkblockmap_t }; public: - objlinkblockmap_t(AABoxd const &bounds, uint blockSize = 128) + ContactBlockmap(AABoxd const &bounds, uint blockSize = 128) : _origin(bounds.min), _gridmap(Vector2ui(de::ceil((bounds.maxX - bounds.minX) / ddouble( blockSize )), de::ceil((bounds.maxY - bounds.minY) / ddouble( blockSize ))), @@ -227,7 +226,7 @@ class objlinkblockmap_t * @param objlink Object to be linked. Note that if linked object's origin * lies outside the blockmap it will not be linked! */ - void link(objlink_t *objlink) + void link(Contact *objlink) { if(!objlink) return; @@ -280,79 +279,109 @@ class objlinkblockmap_t Gridmap _gridmap; }; -// Each linked object type uses a separate blockmap. -static objlinkblockmap_t *blockmaps[NUM_OBJ_TYPES]; - -struct contactfinderparams_t -{ - objlink_t *objlink; - AABoxd objAABox; -}; +// Each contactable object type uses a separate blockmap. +static ContactBlockmap *blockmaps[ContactTypeCount]; -struct objcontact_t +struct ListNode { - objcontact_t *next; /// Next in the BSP leaf. - objcontact_t *nextUsed; /// Next used contact. + ListNode *next; ///< Next in the BSP leaf. + ListNode *nextUsed; ///< Next used contact. void *obj; }; +static ListNode *firstNode; ///< First unused list node. +static ListNode *cursor; ///< Current list node. -struct objcontactlist_t +/// @todo Make type lists external. +struct ContactList { - objcontact_t *head[NUM_OBJ_TYPES]; -}; - -static objlink_t *objlinks; -static objlink_t *objlinkFirst, *objlinkCursor; - -// List of unused and used contacts. -static objcontact_t *contFirst, *contCursor; + // Start reusing list nodes. + static void reset() + { + cursor = firstNode; + } -// List of contacts for each BSP leaf. -static objcontactlist_t *bspLeafContacts; + void link(Contact *objlink) + { + if(!objlink) return; -static void spreadInBspLeaf(BspLeaf &bspLeaf, contactfinderparams_t &parms); + ListNode *list = listForType(objlink->type()); + ListNode *node = newNode(objlink->objectPtr()); -static inline void linkContact(objcontact_t *con, objcontact_t **list, uint index) -{ - con->next = list[index]; - list[index] = con; -} + node->next = list; + list = node; + } -static void linkContactToBspLeaf(objcontact_t *node, objtype_t type, uint index) -{ - linkContact(node, &bspLeafContacts[index].head[type], 0); -} + int mobjIterator(int (*callback)(mobj_s &, void *), void *context = 0) + { + for(ListNode *node = listForType(ContactMobj); node; node = node->next) + { + if(int result = callback(*static_cast(node->obj), context)) + return result; + } + return false; // Continue iteration. + } -/** - * Create a new objcontact. If there are none available in the list of - * used objects a new one will be allocated and linked to the global list. - */ -static objcontact_t *allocObjContact() -{ - objcontact_t *con; - if(!contCursor) + int lumobjIterator(int (*callback)(Lumobj &, void *), void *context = 0) { - con = (objcontact_t *) Z_Malloc(sizeof *con, PU_APPSTATIC, 0); + for(ListNode *node = listForType(ContactLumobj); node; node = node->next) + { + if(int result = callback(*static_cast(node->obj), context)) + return result; + } + return false; // Continue iteration. + } - // Link to the list of objcontact nodes. - con->nextUsed = contFirst; - contFirst = con; +private: + inline ListNode *listForType(ContactType type) const + { + return _head[type]; } - else + + /** + * Create a new list node. If there are none available in the list of + * used objects a new one will be allocated and linked to the global list. + */ + static ListNode *newNode(void *object) { - con = contCursor; - contCursor = contCursor->nextUsed; + DENG2_ASSERT(object != 0); + + ListNode *con; + if(!cursor) + { + con = (ListNode *) Z_Malloc(sizeof *con, PU_APPSTATIC, 0); + + // Link to the list of objcontact nodes. + con->nextUsed = firstNode; + firstNode = con; + } + else + { + con = cursor; + cursor = cursor->nextUsed; + } + + con->obj = object; + + return con; } - con->obj = 0; - return con; -} -static objlink_t *allocObjlink() + ListNode *_head[ContactTypeCount]; ///< Separate lists for each contact type. +}; + +static Contact *objlinks; +static Contact *objlinkFirst, *objlinkCursor; + +// List of contacts for each BSP leaf. +static ContactList *bspLeafContactLists; + +static Contact *newObjlink(void *object, ContactType type) { - objlink_t *link; + DENG2_ASSERT(object != 0); + + Contact *link; if(!objlinkCursor) { - link = (objlink_t *) Z_Malloc(sizeof *link, PU_APPSTATIC, 0); + link = (Contact *) Z_Malloc(sizeof *link, PU_APPSTATIC, 0); // Link the link to the global list. link->nextUsed = objlinkFirst; @@ -363,91 +392,93 @@ static objlink_t *allocObjlink() link = objlinkCursor; objlinkCursor = objlinkCursor->nextUsed; } + link->nextInBlock = 0; - link->_object = 0; // Link it to the list of in-use objlinks. link->next = objlinks; objlinks = link; + link->_object = object; + link->_type = type; + return link; } -void R_InitObjlinkBlockmapForMap(Map &map) +void R_InitContactBlockmaps(Map &map) { - for(int i = 0; i < NUM_OBJ_TYPES; ++i) + for(int i = 0; i < ContactTypeCount; ++i) { DENG2_ASSERT(blockmaps[i] == 0); - blockmaps[i] = new objlinkblockmap_t(map.bounds(), BLOCK_SIZE); + blockmaps[i] = new ContactBlockmap(map.bounds(), BLOCK_SIZE); } // Initialize obj => BspLeaf contact lists. - bspLeafContacts = (objcontactlist_t *) - Z_Calloc(sizeof *bspLeafContacts * map.bspLeafCount(), + bspLeafContactLists = (ContactList *) + Z_Calloc(sizeof *bspLeafContactLists * map.bspLeafCount(), PU_MAPSTATIC, 0); } -void R_DestroyObjlinkBlockmap() +void R_DestroyContactBlockmaps() { - for(int i = 0; i < NUM_OBJ_TYPES; ++i) + for(int i = 0; i < ContactTypeCount; ++i) { delete blockmaps[i]; blockmaps[i] = 0; } - if(bspLeafContacts) + if(bspLeafContactLists) { - Z_Free(bspLeafContacts); - bspLeafContacts = 0; + Z_Free(bspLeafContactLists); + bspLeafContactLists = 0; } } -static inline objlinkblockmap_t &blockmap(objtype_t type) +static inline ContactBlockmap &blockmap(ContactType type) { - DENG2_ASSERT(VALID_OBJTYPE(type)); return *blockmaps[int( type )]; } -void R_ClearObjlinksForFrame() +static inline ContactList &contactList(BspLeaf &bspLeaf) +{ + return bspLeafContactLists[bspLeaf.indexInMap()]; +} + +void R_ClearContacts(Map &map) { - for(int i = 0; i < NUM_OBJ_TYPES; ++i) + for(int i = 0; i < ContactTypeCount; ++i) { - blockmap(objtype_t(i)).unlinkAll(); + blockmap(ContactType(i)).unlinkAll(); } // Start reusing objlinks. objlinkCursor = objlinkFirst; objlinks = 0; -} - -static void linkObjToBspLeaf(BspLeaf &bspLeaf, void *object, objtype_t type) -{ - if(!object) return; - // Never link to a BspLeaf with no geometry. - if(!bspLeaf.hasPoly()) return; + // Start reusing nodes from the first one in the list. + ContactList::reset(); - objcontact_t *con = allocObjContact(); - con->obj = object; - // Link the contact list for this bspLeaf. - linkContactToBspLeaf(con, type, bspLeaf.indexInMap()); + if(bspLeafContactLists) + { + std::memset(bspLeafContactLists, 0, map.bspLeafCount() * sizeof *bspLeafContactLists); + } } -inline static void linkObjToBspLeaf(BspLeaf &bspLeaf, objlink_t *link) +static void linkContact(BspLeaf &bspLeaf, Contact *objlink) { - linkObjToBspLeaf(bspLeaf, link->objectPtr(), link->type()); + DENG2_ASSERT(objlink != 0); + // Never link to a BspLeaf with no geometry. + DENG2_ASSERT(bspLeaf.hasCluster()); + + contactList(bspLeaf).link(objlink); } -static void createObjlink(BspLeaf &bspLeaf, void *object, objtype_t type) +struct contactfinderparams_t { - if(!object) return; - - // Never link to a BspLeaf with no geometry. - if(!bspLeaf.hasPoly()) return; + Contact *objlink; + AABoxd objAABox; +}; - objlink_t *link = allocObjlink(); - link->_object = object; - link->_type = type; -} +static void spreadInBspLeaf(BspLeaf &bspLeaf, contactfinderparams_t &parms); /** * On which side of the half-edge does the specified @a point lie? @@ -461,8 +492,7 @@ static void createObjlink(BspLeaf &bspLeaf, void *object, objtype_t type) */ static coord_t pointOnHEdgeSide(HEdge const &hedge, Vector2d const &point) { - /// @todo Why are we calculating this every time? - Vector2d direction = hedge.twin().origin() - hedge.origin(); + Vector2d const direction = hedge.twin().origin() - hedge.origin(); ddouble pointV1[2] = { point.x, point.y }; ddouble fromOriginV1[2] = { hedge.origin().x, hedge.origin().y }; @@ -577,7 +607,7 @@ static void maybeSpreadOverEdge(HEdge *hedge, contactfinderparams_t &parms) backLeaf.setValidCount(validCount); // Link up a new contact with the back BSP leaf. - linkObjToBspLeaf(backLeaf, parms.objlink); + linkContact(backLeaf, parms.objlink); spreadInBspLeaf(backLeaf, parms); } @@ -611,7 +641,7 @@ static void spreadInBspLeaf(BspLeaf &bspLeaf, contactfinderparams_t &parms) * * @param oLink Ptr to objlink to find BspLeaf contacts for. */ -static void findContacts(objlink_t *link) +static void findContacts(Contact *link) { DENG_ASSERT(link != 0); @@ -625,7 +655,7 @@ static void findContacts(objlink_t *link) parms.objAABox = link->objectAABox(); // Always contact the obj's own BspLeaf. - linkObjToBspLeaf(bspLeaf, link); + linkContact(bspLeaf, link); spreadInBspLeaf(bspLeaf, parms); } @@ -636,7 +666,7 @@ static void findContacts(objlink_t *link) * @param obm Objlink blockmap. * @param bspLeaf BspLeaf to spread the contacts of. */ -static void spreadContacts(objlinkblockmap_t &obm, AABoxd const &box) +static void spreadContacts(ContactBlockmap &obm, AABoxd const &box) { GridmapCellBlock const cellBlock = obm.toCellBlock(box); @@ -644,10 +674,10 @@ static void spreadContacts(objlinkblockmap_t &obm, AABoxd const &box) for(cell.y = cellBlock.min.y; cell.y <= cellBlock.max.y; ++cell.y) for(cell.x = cellBlock.min.x; cell.x <= cellBlock.max.x; ++cell.x) { - objlinkblockmap_t::CellData *data = obm.data(cell, true/*can allocate a block*/); + ContactBlockmap::CellData *data = obm.data(cell, true/*can allocate a block*/); if(!data->doneSpread) { - for(objlink_t *iter = data->head; iter; iter = iter->nextInBlock) + for(Contact *iter = data->head; iter; iter = iter->nextInBlock) { findContacts(iter); } @@ -656,23 +686,28 @@ static void spreadContacts(objlinkblockmap_t &obm, AABoxd const &box) } } -static inline float radiusMax(objtype_t type) +static inline float radiusMax(ContactType type) { - DENG_ASSERT(VALID_OBJTYPE(type)); - if(type == OT_LUMOBJ) return Lumobj::radiusMax(); - // Must be OT_MOBJ - return DDMOBJ_RADIUS_MAX; + switch(type) + { + case ContactLumobj: return Lumobj::radiusMax(); + case ContactMobj: return DDMOBJ_RADIUS_MAX; + + default: + DENG2_ASSERT(false); + return 8; + } } -void R_InitForBspLeaf(BspLeaf &bspLeaf) +void R_SpreadContacts(BspLeaf &bspLeaf) { if(!bspLeaf.hasCluster()) return; - for(int i = 0; i < NUM_OBJ_TYPES; ++i) + for(int i = 0; i < ContactTypeCount; ++i) { - float const maxRadius = radiusMax(objtype_t(i)); - objlinkblockmap_t &bmap = blockmap(objtype_t(i)); + float const maxRadius = radiusMax(ContactType(i)); + ContactBlockmap &bmap = blockmap(ContactType(i)); AABoxd bounds = bspLeaf.poly().aaBox(); bounds.minX -= maxRadius; @@ -684,65 +719,41 @@ void R_InitForBspLeaf(BspLeaf &bspLeaf) } } -void R_LinkObjs() +void R_AddContact(mobj_t &mobj) { - // Link object-links into the relevant blockmap. - for(objlink_t *link = objlinks; link; link = link->next) + // Never link to a BspLeaf with no geometry. + if(Mobj_BspLeafAtOrigin(mobj).hasCluster()) { - blockmap(link->type()).link(link); + newObjlink(&mobj, ContactMobj); } } -void R_InitForNewFrame(Map &map) +void R_AddContact(Lumobj &lum) { - // Start reusing nodes from the first one in the list. - contCursor = contFirst; - if(bspLeafContacts) + // Never link to a BspLeaf with no geometry. + if(lum.bspLeafAtOrigin().hasCluster()) { - std::memset(bspLeafContacts, 0, map.bspLeafCount() * sizeof *bspLeafContacts); + newObjlink(&lum, ContactLumobj); } } -int R_IterateBspLeafMobjContacts(BspLeaf &bspLeaf, - int (*callback)(mobj_s &, void *), void *context) +void R_LinkContacts() { - objcontactlist_t const &conList = bspLeafContacts[bspLeaf.indexInMap()]; - for(objcontact_t *con = conList.head[OT_MOBJ]; con; con = con->next) - { - if(int result = callback(*static_cast(con->obj), context)) - return result; - } - return false; // Continue iteration. -} - -int R_IterateBspLeafLumobjContacts(BspLeaf &bspLeaf, - int (*callback)(Lumobj &, void *), void *context) -{ - objcontactlist_t const &conList = bspLeafContacts[bspLeaf.indexInMap()]; - for(objcontact_t *con = conList.head[OT_LUMOBJ]; con; con = con->next) + // Link object-links into the relevant blockmap. + for(Contact *link = objlinks; link; link = link->next) { - if(int result = callback(*static_cast(con->obj), context)) - return result; + blockmap(link->type()).link(link); } - return false; // Continue iteration. } -void R_ObjlinkCreate(mobj_t &mobj) -{ - createObjlink(Mobj_BspLeafAtOrigin(mobj), &mobj, OT_MOBJ); -} - -void R_LinkObjToBspLeaf(BspLeaf &bspLeaf, mobj_t &mobj) -{ - linkObjToBspLeaf(bspLeaf, &mobj, OT_MOBJ); -} - -void R_ObjlinkCreate(Lumobj &lum) +int R_IterateBspLeafMobjContacts(BspLeaf &bspLeaf, + int (*callback)(mobj_s &, void *), void *context) { - createObjlink(lum.bspLeafAtOrigin(), &lum, OT_LUMOBJ); + return contactList(bspLeaf).mobjIterator(callback, context); } -void R_LinkObjToBspLeaf(BspLeaf &bspLeaf, Lumobj &lum) +int R_IterateBspLeafLumobjContacts(BspLeaf &bspLeaf, + int (*callback)(Lumobj &, void *), void *context) { - linkObjToBspLeaf(bspLeaf, &lum, OT_LUMOBJ); + return contactList(bspLeaf).lumobjIterator(callback, context); } diff --git a/doomsday/client/src/world/world.cpp b/doomsday/client/src/world/world.cpp index b7342300bf..f26b2af8d9 100644 --- a/doomsday/client/src/world/world.cpp +++ b/doomsday/client/src/world/world.cpp @@ -641,7 +641,7 @@ DENG2_PIMPL(World) Rend_RadioInitForMap(*map); - R_InitObjlinkBlockmapForMap(*map); + R_InitContactBlockmaps(*map); Rend_ProjectorInitForMap(*map); VL_InitForMap(*map); // Converted vlights (from lumobjs). map->initBias(); // Shadow bias sources and surfaces. @@ -750,7 +750,7 @@ bool World::changeMap(de::Uri const &uri) /// for allocating memory used elsewhere so it should be repurposed for /// this usage specifically. #ifdef __CLIENT__ - R_DestroyObjlinkBlockmap(); + R_DestroyContactBlockmaps(); #endif delete d->map; d->map = 0; Z_FreeTags(PU_MAP, PU_PURGELEVEL - 1);