From 25c0f679cb9dbdb2b01b5008269eb79d8e256d0d Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 24 Jul 2009 20:25:19 +0000 Subject: [PATCH] - Fixed: using custom automap backgrounds crashed. SVN r1735 (trunk) --- docs/rh-log.txt | 5 ++++- src/am_map.cpp | 2 +- src/g_shared/a_morph.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 396e93a6e..0f4f533c6 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ -July 22, 2009 +July 24, 2009 (Changes by Graf Zahl) +- Fixed: using custom automap backgrounds crashed. + +July 22, 2009 - Added extra states to dehsupp for the MBF additions. - Removed specific Button_Speed handling from the controllers' AddAxes() methods. Analog axes now respond to Button_Speed and cl_run in exactly the diff --git a/src/am_map.cpp b/src/am_map.cpp index 1139a4124..a4948c99e 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -854,7 +854,7 @@ void AM_loadPics () marknums[i] = TexMan.CheckForTexture (namebuf, FTexture::TEX_MiscPatch); } - const char *autopage = level.info->mapbg[0] == 0? "AUTOPAGE" : (const char*)level.info->mapbg[0]; + const char *autopage = level.info->mapbg[0] == 0? "AUTOPAGE" : (const char*)&level.info->mapbg[0]; mapback = TexMan.CheckForTexture(autopage, FTexture::TEX_MiscPatch); } diff --git a/src/g_shared/a_morph.cpp b/src/g_shared/a_morph.cpp index d14f1f8bb..f319f5414 100644 --- a/src/g_shared/a_morph.cpp +++ b/src/g_shared/a_morph.cpp @@ -262,7 +262,7 @@ bool P_UndoPlayerMorph (player_t *activator, player_t *player, bool force) if ((player->health > 0) || undobydeathsaves) { - player->health = mo->health = mo->GetDefault()->health; + player->health = mo->health = mo->SpawnHealth(); } else // killed when morphed so stay dead {