From b55ca6ffaa12cdafadd113865c0283d8fc8885e2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 15 May 2009 22:06:44 +0000 Subject: [PATCH] - Fixed: Monsters should not check the inventory for damage absorbtion when they have the MF5_NODAMAGE flag set. - Added patch for saving automap zoom. SVN r1587 (trunk) --- docs/rh-log.txt | 3 +++ src/am_map.cpp | 2 ++ src/p_acs.cpp | 2 +- src/p_interaction.cpp | 2 +- src/version.h | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 4156eba49..7df7d9dda 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ May 15, 2009 (Changes by Graf Zahl) +- Fixed: Monsters should not check the inventory for damage absorbtion when + they have the MF5_NODAMAGE flag set. +- Added patch for saving automap zoom. - Added ACS GetChar function. - Added Gez's submission for polyobjects being able to crush corpses but made it an explicit MAPINFO option only. diff --git a/src/am_map.cpp b/src/am_map.cpp index ee904508a..141497e94 100644 --- a/src/am_map.cpp +++ b/src/am_map.cpp @@ -1912,4 +1912,6 @@ void AM_SerializeMarkers(FArchive &arc) { arc << markpoints[i].x << markpoints[i].y; } + arc << scale_mtof; + arc << scale_ftom; } diff --git a/src/p_acs.cpp b/src/p_acs.cpp index 9643c50b8..dca81de06 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -2897,7 +2897,7 @@ int DLevelScript::CallFunction(int argCount, int funcIndex, SDWORD *args) case ACSF_GetChar: { const char *p = FBehavior::StaticLookupString(args[0]); - if (p != NULL && args[1] >= 0 && args[1] < strlen(p)) + if (p != NULL && args[1] >= 0 && args[1] < int(strlen(p))) { return p[args[1]]; } diff --git a/src/p_interaction.cpp b/src/p_interaction.cpp index 68dbda5cc..ca483b89d 100644 --- a/src/p_interaction.cpp +++ b/src/p_interaction.cpp @@ -1156,7 +1156,7 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage else { // Armor for monsters. - if (!(flags & DMG_NO_ARMOR) && target->Inventory != NULL) + if (!(flags & DMG_NO_ARMOR) && target->Inventory != NULL && damage > 0) { int newdam = damage; target->Inventory->AbsorbDamage (damage, mod, newdam); diff --git a/src/version.h b/src/version.h index ab9724686..97d42b61a 100644 --- a/src/version.h +++ b/src/version.h @@ -75,7 +75,7 @@ // SAVESIG should match SAVEVER. // MINSAVEVER is the minimum level snapshot version that can be loaded. -#define MINSAVEVER 1583 +#define MINSAVEVER 1586 #if SVN_REVISION_NUMBER < MINSAVEVER // Never write a savegame with a version lower than what we need