From fd1a239c66c3625a51bf42067558b2272809ebb5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 1 Jun 2006 00:05:03 +0000 Subject: [PATCH] SVN r158 (trunk) --- cbuild.c | 8 ++++---- docs/rh-log.txt | 9 +++++++++ src/dobject.h | 2 +- src/g_shared/a_artifacts.cpp | 4 ++-- src/p_enemy.cpp | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/cbuild.c b/cbuild.c index 045a1dcac4..d20ee22d26 100644 --- a/cbuild.c +++ b/cbuild.c @@ -1969,8 +1969,8 @@ reparse: if(do_level >= sizeof(int)*8) { printf("\n\n!!! %s error, line %d !!!\n" - "Too many 'do' commands enountered (max: %ud)!\n\n", - fname, curr_line, sizeof(int)*8 - 1); + "Too many 'do' commands enountered (max: %lud)!\n\n", + fname, curr_line, (unsigned long)(sizeof(int)*8 - 1)); snprintf(linebuf, sizeof(linebuf), "exit -1\n"); goto reparse; } @@ -2687,8 +2687,8 @@ dir_write_check: if(!tmp) { fprintf(stderr, "\n\n\n*** Critical Error ***\n" - "Out of memory allocating %ud defines!\n\n", - num_defines+1); + "Out of memory allocating %lud defines!\n\n", + (unsigned long)(num_defines+1)); snprintf(linebuf, sizeof(linebuf), "exit -1\n"); goto reparse; } diff --git a/docs/rh-log.txt b/docs/rh-log.txt index d635715ffe..ae07df8397 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,12 @@ +May 31, 2006 (Changes by Graf Zahl) +- Fixed: Ammo items dropped by monsters that have a default amount of 1 didn't + contain any ammo at all. +- Fixed: PClass::FreeIndices was declared as TArray in the header but + as TArray in the cpp file. + +May 28, 2006 (Changes by Graf Zahl) +- Fixed: PowerFrighteners must check Owner for NULL in InitEffect and EndEffect. + May 28, 2006 - Fixed: When building GL nodes for Deathkings MAP42, one polyobject had one of its segs thrown away, so the map could not start. This was because the diff --git a/src/dobject.h b/src/dobject.h index b150924b60..3f7c669002 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -298,7 +298,7 @@ protected: private: static TArray Objects; - static TArray FreeIndices; + static TArray FreeIndices; static TArray ToDestroy; static void DestroyScan (DObject *obj); diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index 14ea9cd556..aee90f235f 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -1087,7 +1087,7 @@ END_DEFAULTS void APowerFrightener::InitEffect () { - if (Owner->player == NULL) + if (Owner== NULL || Owner->player == NULL) return; Owner->player->cheats |= CF_FRIGHTENING; @@ -1101,7 +1101,7 @@ void APowerFrightener::InitEffect () void APowerFrightener::EndEffect () { - if (Owner->player == NULL) + if (Owner== NULL || Owner->player == NULL) return; Owner->player->cheats &= ~CF_FRIGHTENING; diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index 2384b806ac..5899d67226 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -2222,7 +2222,7 @@ AInventory *P_DropItem (AActor *source, const PClass *type, int special, int cha else if (mo->IsKindOf (RUNTIME_CLASS(AAmmo))) { // Half ammo when dropped by bad guys. - inv->Amount = inv->GetClass()->Meta.GetMetaInt (AIMETA_DropAmount, inv->Amount / 2 ); + inv->Amount = inv->GetClass()->Meta.GetMetaInt (AIMETA_DropAmount, MAX(1, inv->Amount / 2 )); } else if (mo->IsKindOf (RUNTIME_CLASS(AWeapon))) {