From 75920f2ed0a910167e47aac4cd44d204bca5832b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 30 Aug 2009 20:47:43 +0000 Subject: [PATCH] - fixed: R_InitColormaps was broken since the resource file code rewrite. SVN r1778 (trunk) --- docs/rh-log.txt | 1 + src/r_data.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 55ef1e67b..10807c7b7 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,5 @@ August 29, 2009 (Changes by Graf Zahl) +- fixed: R_InitColormaps was broken since the resource file code rewrite. - fixed: WIF_STAFF2_KICKBACK did not work anymore because it depended on conditions that were changed some time ago. - fixed: The damage inflictor for a rail attack was the shooter, not the puff. diff --git a/src/r_data.cpp b/src/r_data.cpp index b5383236b..0be54a8ad 100644 --- a/src/r_data.cpp +++ b/src/r_data.cpp @@ -153,12 +153,13 @@ void R_InitColormaps () { char name[9]; name[8] = 0; - Wads.GetLumpName (name, ns_colormaps); + Wads.GetLumpName (name, i); if (Wads.CheckNumForName (name, ns_colormaps) == (int)i) { strncpy(cm.name, name, 8); cm.blend = 0; + cm.lump = i; fakecmaps.Push(cm); } } @@ -241,7 +242,7 @@ DWORD R_ColormapNumForName (const char *name) { if (strnicmp (name, "COLORMAP", 8)) { // COLORMAP always returns 0 - for(int i=fakecmaps.Size()-1; i > 0; i++) + for(int i=fakecmaps.Size()-1; i > 0; i--) { if (!strnicmp(name, fakecmaps[i].name, 8)) {