Merge branch 'maint'

This commit is contained in:
Christoph Oelckers 2013-07-23 12:33:49 +02:00
commit f8d69b1974
2 changed files with 11 additions and 1 deletions

View file

@ -267,7 +267,6 @@ static void CopyPlayer (player_t *dst, player_t *src, const char *name)
bool usedown = dst->usedown; bool usedown = dst->usedown;
dst->~player_t(); // ensure that the userinfo in dst does not contain anything before copying everything over.
*dst = *src; // To avoid memory leaks at this point the userinfo in src must be empty which is taken care of by the TransferFrom call above. *dst = *src; // To avoid memory leaks at this point the userinfo in src must be empty which is taken care of by the TransferFrom call above.
dst->cheats |= chasecam; dst->cheats |= chasecam;

View file

@ -62,6 +62,9 @@
extern bool DrawFSHUD; // [RH] Defined in d_main.cpp extern bool DrawFSHUD; // [RH] Defined in d_main.cpp
EXTERN_CVAR (Bool, cl_capfps) EXTERN_CVAR (Bool, cl_capfps)
extern lighttable_t* fixedcolormap;
extern FSpecialColormap*realfixedcolormap;
// TYPES ------------------------------------------------------------------- // TYPES -------------------------------------------------------------------
struct InterpolationViewer struct InterpolationViewer
@ -1005,6 +1008,11 @@ void FCanvasTextureInfo::UpdateAll ()
{ {
FCanvasTextureInfo *probe; FCanvasTextureInfo *probe;
// curse Doom's overuse of global variables in the renderer.
// These get clobbered by rendering to a camera texture but they need to be preserved so the final rendering can be done with the correct palette.
unsigned char *savecolormap = fixedcolormap;
FSpecialColormap *savecm = realfixedcolormap;
for (probe = List; probe != NULL; probe = probe->Next) for (probe = List; probe != NULL; probe = probe->Next)
{ {
if (probe->Viewpoint != NULL && probe->Texture->bNeedsUpdate) if (probe->Viewpoint != NULL && probe->Texture->bNeedsUpdate)
@ -1012,6 +1020,9 @@ void FCanvasTextureInfo::UpdateAll ()
Renderer->RenderTextureView(probe->Texture, probe->Viewpoint, probe->FOV); Renderer->RenderTextureView(probe->Texture, probe->Viewpoint, probe->FOV);
} }
} }
fixedcolormap = savecolormap;
realfixedcolormap = savecm;
} }
//========================================================================== //==========================================================================