Skip to content

Commit

Permalink
FIXED rendering of shape when sprite offset != 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ksterker committed Sep 2, 2009
1 parent a236da2 commit 98f35c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modeller/mdl_renderer.cc
Expand Up @@ -72,11 +72,11 @@ void ModelRenderer::draw (GdkPoint *handles, const s_int16 & x, const s_int16 &
u_int32 color = target->map_color (0xD8, 0x77, 0x2D);
drawRect (sx, sy, ri.Sprite->length(), ri.Sprite->height(), color, da, target);

// render shapes, if any
// render shapes, if any, relative to sprite
for (std::vector<world::cube3*>::const_iterator i = ri.Shape->begin(); i != ri.Shape->end(); i++)
{
s_int16 ox = sx;
s_int16 oy = sy + (*i)->max_z() - (*i)->min_z();
s_int16 ox = sx - ri.Shape->ox();
s_int16 oy = sy + (*i)->max_z() - (*i)->min_z() - ri.Shape->oy();

(*i)->draw (ox, oy, &da, target);

Expand Down

0 comments on commit 98f35c9

Please sign in to comment.