Skip to content

Commit

Permalink
Server: Removed unused Objlink blockmaps
Browse files Browse the repository at this point in the history
The Objlink blockmaps are not needed on server side. These blockmaps
are used by the client's map renderer when projecting the mobjs and
lumobjs of the current map.
  • Loading branch information
danij-deng committed Feb 19, 2013
1 parent 61ac178 commit 6a8d89c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
10 changes: 7 additions & 3 deletions doomsday/client/include/render/r_things.h
Expand Up @@ -243,14 +243,18 @@ void R_ProjectSprite(struct mobj_s *mobj);
*/
void R_ProjectPlayerSprites(void);

void R_SortVisSprites(void);
/// To be called at the start of the current render frame to clear the vissprite list.
void R_ClearVisSprites(void);

vissprite_t *R_NewVisSprite(void);

#ifdef __CLIENT__

void R_AddSprites(BspLeaf *bspLeaf);

/// To be called at the start of the current render frame to clear the vissprite list.
void R_ClearVisSprites(void);
void R_SortVisSprites(void);

#endif // __CLIENT__

void R_InitSprites(void);

Expand Down
16 changes: 10 additions & 6 deletions doomsday/client/src/map/p_data.cpp
Expand Up @@ -83,36 +83,40 @@ void P_SetCurrentMap(GameMap* map)
theMap = map;
}

DENG_EXTERN_C boolean P_MapExists(char const* uriCString)
#undef P_MapExists
DENG_EXTERN_C boolean P_MapExists(char const *uriCString)
{
de::Uri uri = de::Uri(uriCString, RC_NULL);
lumpnum_t lumpNum = W_CheckLumpNumForName2(uri.path().toString().toAscii().constData(), true/*quiet please*/);
return (lumpNum >= 0);
}

DENG_EXTERN_C boolean P_MapIsCustom(char const* uriCString)
#undef P_MapIsCustom
DENG_EXTERN_C boolean P_MapIsCustom(char const *uriCString)
{
de::Uri uri = de::Uri(uriCString, RC_NULL);
lumpnum_t lumpNum = W_CheckLumpNumForName2(uri.path().toString().toAscii().constData(), true/*quiet please*/);
return (lumpNum >= 0 && W_LumpIsCustom(lumpNum));
}

DENG_EXTERN_C AutoStr* P_MapSourceFile(char const* uriCString)
#undef P_MapSourceFile
DENG_EXTERN_C AutoStr *P_MapSourceFile(char const *uriCString)
{
de::Uri uri = de::Uri(uriCString, RC_NULL);
lumpnum_t lumpNum = W_CheckLumpNumForName2(uri.path().toString().toAscii().constData(), true/*quiet please*/);
if(lumpNum < 0) return AutoStr_NewStd();
return W_LumpSourceFile(lumpNum);
}

DENG_EXTERN_C boolean P_LoadMap(char const* uriCString)
#undef P_LoadMap
DENG_EXTERN_C boolean P_LoadMap(char const *uriCString)
{
if(!uriCString || !uriCString[0])
{
LegacyCore_FatalError("P_LoadMap: Invalid Uri argument.");
}

de::Uri uri = de::Uri(uriCString, RC_NULL);
de::Uri uri(uriCString, RC_NULL);
LOG_MSG("Loading Map \"%s\"...") << uri;

// It would be very cool if map loading happened in another
Expand Down Expand Up @@ -179,9 +183,9 @@ DENG_EXTERN_C boolean P_LoadMap(char const* uriCString)
// Material animations should begin from their first step.
App_Materials().resetAllAnims();

#ifdef __CLIENT__
R_InitObjlinkBlockmapForMap();

#ifdef __CLIENT__
LO_InitForMap(); // Lumobj management.
R_InitShadowProjectionListsForMap(); // Projected mobj shadows.
VL_InitForMap(); // Converted vlights (from lumobjs) management.
Expand Down
2 changes: 0 additions & 2 deletions doomsday/server/server.pro
Expand Up @@ -213,7 +213,6 @@ DENG_HEADERS += \
$$SRC/include/map/p_maptypes.h \
$$SRC/include/map/p_maputil.h \
$$SRC/include/map/p_object.h \
$$SRC/include/map/p_objlink.h \
$$SRC/include/map/p_particle.h \
$$SRC/include/map/p_players.h \
$$SRC/include/map/p_polyobjs.h \
Expand Down Expand Up @@ -393,7 +392,6 @@ SOURCES += \
$$SRC/src/map/p_intercept.cpp \
$$SRC/src/map/p_maputil.cpp \
$$SRC/src/map/p_mobj.cpp \
$$SRC/src/map/p_objlink.cpp \
$$SRC/src/map/p_particle.cpp \
$$SRC/src/map/p_players.cpp \
$$SRC/src/map/p_polyobjs.cpp \
Expand Down

0 comments on commit 6a8d89c

Please sign in to comment.