From 632e03fa7e70b6543d68c00a137a03e6761ef3fe Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 10 May 2006 00:25:53 +0000 Subject: [PATCH] - Fixed a few Strife ammo amount values. - Fixed the ClearLocks function so it doesn't crash when called before the ActorInfos have been created. SVN r96 (trunk) --- docs/rh-log.txt | 3 +++ src/g_shared/a_keys.cpp | 3 ++- src/g_strife/a_strifeammo.cpp | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 4545365f4c..4d3854c631 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -12,6 +12,9 @@ May 9, 2006 - Fixed: The secnodes were never freed. May 9, 2006 (Changes by Graf Zahl) +- Fixed a few Strife ammo amount values. +- Fixed the ClearLocks function so it doesn't crash when called before the + ActorInfos have been created. - Fixed: The FSpecialFont constructor created the name string twice. - Fixed: The animated door parser was still leaking memory when it encountered an invalid animation due to missing textures. diff --git a/src/g_shared/a_keys.cpp b/src/g_shared/a_keys.cpp index fd7e17d6f4..8af3e0d70d 100644 --- a/src/g_shared/a_keys.cpp +++ b/src/g_shared/a_keys.cpp @@ -322,7 +322,8 @@ static void ClearLocks() { if (TypeInfo::m_Types[i]->IsDescendantOf(RUNTIME_CLASS(AKey))) { - static_cast(GetDefaultByType(TypeInfo::m_Types[i]))->KeyNumber=0; + if (TypeInfo::m_Types[i]->ActorInfo != NULL) + static_cast(GetDefaultByType(TypeInfo::m_Types[i]))->KeyNumber=0; } } for(i=0;i<256;i++) diff --git a/src/g_strife/a_strifeammo.cpp b/src/g_strife/a_strifeammo.cpp index 89fa90b56a..e77b2f9e56 100644 --- a/src/g_strife/a_strifeammo.cpp +++ b/src/g_strife/a_strifeammo.cpp @@ -27,7 +27,7 @@ IMPLEMENT_ACTOR (AHEGrenadeRounds, Strife, 152, 0) PROP_StrifeType (177) PROP_StrifeTeaserType (170) PROP_StrifeTeaserType2 (174) - PROP_Inventory_Amount (12) + PROP_Inventory_Amount (6) PROP_Inventory_MaxAmount (30) PROP_Ammo_BackpackAmount (6) PROP_Ammo_BackpackMaxAmount (60) @@ -54,9 +54,9 @@ IMPLEMENT_ACTOR (APhosphorusGrenadeRounds, Strife, 153, 0) PROP_StrifeType (178) PROP_StrifeTeaserType (171) PROP_StrifeTeaserType2 (175) - PROP_Inventory_Amount (8) + PROP_Inventory_Amount (4) PROP_Inventory_MaxAmount (16) - PROP_Ammo_BackpackAmount (2) + PROP_Ammo_BackpackAmount (4) PROP_Ammo_BackpackMaxAmount (32) PROP_Inventory_Icon ("I_GRN2") PROP_Tag ("Phoshorus-Grenade_Rounds") // "Fire-Grenade_Rounds" in the Teaser @@ -85,7 +85,7 @@ IMPLEMENT_ACTOR (AClipOfBullets, Strife, 2007, 11) PROP_StrifeTeaserType2 (177) PROP_Inventory_Amount (10) PROP_Inventory_MaxAmount (250) - PROP_Ammo_BackpackAmount (20) + PROP_Ammo_BackpackAmount (10) PROP_Ammo_BackpackMaxAmount (500) PROP_Inventory_Icon ("I_BLIT") PROP_Tag ("clip_of_bullets") // "bullets" in the Teaser