From 76a00867442ce3febb8cd4964bde8dac2b764979 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 2 Aug 2008 10:51:00 +0000 Subject: [PATCH] - Fixed: The mugshot drawe ignored the accuracy parameter. - Fixed: The Alt HUD's weapon drawer didn't check properly for invalid icons. SVN r1102 (trunk) --- docs/rh-log.txt | 2 ++ src/g_shared/sbar_mugshot.cpp | 2 +- src/g_shared/shared_hud.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 9840c776e..3d1de8b96 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ August 2, 2008 (Changes by Graf Zahl) +- Fixed: The mugshot drawe ignored the accuracy parameter. +- Fixed: The Alt HUD's weapon drawer didn't check properly for invalid icons. - Added DECORATE conversions for Hexen's Cleric Mace, Firedemon and fog by Karate Chris. diff --git a/src/g_shared/sbar_mugshot.cpp b/src/g_shared/sbar_mugshot.cpp index 0b27c069c..d9a913de9 100644 --- a/src/g_shared/sbar_mugshot.cpp +++ b/src/g_shared/sbar_mugshot.cpp @@ -473,7 +473,7 @@ FTexture *FMugShot::GetFace(player_t *player, const char *default_face, int accu { int angle = UpdateState(player, xdeath, animated_god_mode); int level = 0; - while (player->health < (4-level) * (player->mo->GetMaxHealth()/5)) + while (player->health < (accuracy-1-level) * (player->mo->GetMaxHealth()/accuracy)) { level++; } diff --git a/src/g_shared/shared_hud.cpp b/src/g_shared/shared_hud.cpp index 680d34e06..39496085e 100644 --- a/src/g_shared/shared_hud.cpp +++ b/src/g_shared/shared_hud.cpp @@ -588,7 +588,7 @@ static void DrawOneWeapon(player_t * CPlayer, int x, int & y, AWeapon * weapon) FState * state=NULL, *ReadyState; FTextureID AltIcon = GetHUDIcon(weapon->GetClass()); - picnum = AltIcon.isValid()? AltIcon : weapon->Icon; + picnum = !AltIcon.isNull()? AltIcon : weapon->Icon; if (picnum.isNull()) {