Skip to content

Commit

Permalink
Map Renderer|Client: Adjusted minimum mobj lumobj radius; cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Sep 7, 2013
1 parent 09ac308 commit 53fcbc1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
13 changes: 5 additions & 8 deletions doomsday/client/src/render/projector.cpp
Expand Up @@ -261,8 +261,8 @@ struct project_params_t
/**
* Project the given lumobj onto the surface.
*
* @param lum Lumobj representing the light being projected.
* @param parm project_params_t parameters.
* @param lum Lumobj representing the light being projected.
* @param parm project_params_t parameters.
*/
static void projectLumobj(Lumobj &lum, project_params_t &parm)
{
Expand Down Expand Up @@ -422,13 +422,10 @@ void Rend_ProjectPlaneGlows(BspLeaf *bspLeaf, Vector3d const &topLeft,
}

/**
* Project a mobj shadow onto the surface. If valid and the surface is
* contacted a new projection node will constructed and returned.
*
* @param mobj Mobj for which a shadow may be projected.
* @param parameters ProjectShadowToSurfaceIterator paramaters.
* Project a shadow for the given mobj onto the surface.
*
* @return @c 0 = continue iteration.
* @param mobj Mobj to project a shadow for.
* @param parm project_params_t parameters.
*/
static void projectMobjShadow(mobj_t &mobj, project_params_t &parm)
{
Expand Down
7 changes: 3 additions & 4 deletions doomsday/client/src/render/rend_shadow.cpp
Expand Up @@ -294,10 +294,9 @@ static void drawShadow(TexProjection const &tp, rendershadowprojectionparams_t &
R_FreeRendColors(rcolors);
}

static int drawShadowWorker(TexProjection const *tp, void *parameters)
static int drawShadowWorker(TexProjection const *tp, void *context)
{
rendershadowprojectionparams_t *p = (rendershadowprojectionparams_t *)parameters;
drawShadow(*tp, *p);
drawShadow(*tp, *static_cast<rendershadowprojectionparams_t *>(context));
return 0; // Continue iteration.
}

Expand All @@ -309,5 +308,5 @@ void Rend_RenderShadowProjections(uint listIdx, rendershadowprojectionparams_t &
GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE);

// Write shadows to the render lists.
Rend_IterateProjectionList(listIdx, drawShadowWorker, (void *)&p);
Rend_IterateProjectionList(listIdx, drawShadowWorker, &p);
}
3 changes: 1 addition & 2 deletions doomsday/client/src/world/p_mobj.cpp
Expand Up @@ -278,7 +278,6 @@ DENG_EXTERN_C void Mobj_OriginSmoothed(mobj_t *mo, coord_t origin[3])

static modeldef_t *currentModelDefForMobj(mobj_t *mo)
{
// If models are being used, use the model's radius.
if(useModels)
{
modeldef_t *mf = 0, *nextmf = 0;
Expand Down Expand Up @@ -380,7 +379,7 @@ void Mobj_GenerateLumobjs(mobj_t *mo)
{
if(!de::fequal(def->size, 0))
{
lum->setRadius(de::max(def->size, 32.f));
lum->setRadius(de::max(def->size, 32.f / (40 * lum->radiusFactor())));
}

if(!de::fequal(def->offset[1], 0))
Expand Down

0 comments on commit 53fcbc1

Please sign in to comment.