diff --git a/source/src/main.cpp b/source/src/main.cpp index 0226d3be..12c90a65 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -51,8 +51,8 @@ void screenshot() glReadPixels(0, 0, scr_w, scr_h, GL_RGB, GL_UNSIGNED_BYTE, image->pixels); for (idx = 0; idxpixels+3*scr_w*idx; - memcpy(dest, (char *)image->pixels+3*scr_w*(scr_h-1-idx), 3*scr_w); + char *dest = (char *)temp->pixels+temp->pitch*idx; + memcpy(dest, (char *)image->pixels+image->pitch*(scr_h-1-idx), 3*scr_w); endianswap(dest, 3, scr_w); }; s_sprintfd(buf)("screenshots/screenshot_%d.bmp", lastmillis); diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 04ce4a79..26a33720 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -115,7 +115,7 @@ void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, floa light.y = s->g/ll+of; light.z = s->b/ll+of; - if(d) + if(d && (anim&ANIM_INDEX)!=ANIM_LYING_DEAD) { vec center(x, z, s->floor); if(s->type==FHF) center.z -= s->vdelta/4.0f;