diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9c837e133..4eb084d48 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ February 21, 2009 (Changes by Graf Zahl) +- Fixed: Heretic's fullscreen HUD crashed when the player had armor without + a valid icon. +- Fixed: The StrifePlayer was missing a RunHealth setting. - Fixed: Untranslated colors in fonts had an alpha value of 0 but need 255. - Fixed: The Doom status bar's ammo display may not use the INDEXFONT for the alternative HUD. Instead it has to create a separate one out of the diff --git a/src/g_heretic/heretic_sbar.cpp b/src/g_heretic/heretic_sbar.cpp index 4583189f9..d9cabf2d5 100644 --- a/src/g_heretic/heretic_sbar.cpp +++ b/src/g_heretic/heretic_sbar.cpp @@ -549,11 +549,14 @@ private: if (armor != NULL && armor->Amount != 0) { pic = TexMan(armor->Icon); - screen->DrawTexture (pic, 56, -24, - DTA_HUDRules, HUD_Normal, - DTA_LeftOffset, pic->GetWidth()/2, - DTA_TopOffset, pic->GetHeight(), - TAG_DONE); + if (pic != NULL) + { + screen->DrawTexture (pic, 56, -24, + DTA_HUDRules, HUD_Normal, + DTA_LeftOffset, pic->GetWidth()/2, + DTA_TopOffset, pic->GetHeight(), + TAG_DONE); + } DrBNumberOuter (armor->Amount, 5, -43); } diff --git a/src/g_level.cpp b/src/g_level.cpp index 8c2e06886..92e992e26 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -922,6 +922,8 @@ void G_DoLoadLevel (int position, bool autosave) } P_SetupLevel (level.mapname, position); + P_CompleteWeaponSetup(consoleplayer, players[consoleplayer].mo->GetClass()); + AM_LevelInit(); // [RH] Start lightning, if MAPINFO tells us to diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index a4b22b175..3b1e93f5c 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -3769,10 +3769,6 @@ APlayerPawn *P_SpawnPlayer (FMapThing *mthing, bool tempplayer) FBehavior::StaticStartTypedScripts (SCRIPT_Respawn, p->mo, true); } } - if (playernum == consoleplayer) - { - P_CompleteWeaponSetup(consoleplayer, mobj->GetClass()); - } return mobj; }