diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 6e3b0cdcc3..581b89ae31 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,8 @@ +November 4, 2007 (Changes by Graf Zahl) +- Fixed: Backpacks didn't increase the ammo capacity to BackpackMaxAmount if + an ammo type's BackpackAmount was 0. +- Fixed some minor bugs in custom skill code. + November 3, 2007 (Changes by Graf Zahl) - Added text color options to menu code so that the skill definitions can set the color of the menu's text. diff --git a/src/actor.h b/src/actor.h index ce462c5ca3..3f8961eeed 100644 --- a/src/actor.h +++ b/src/actor.h @@ -622,7 +622,7 @@ public: fixed_t scaleX, scaleY; // Scaling values; FRACUNIT is normal size BYTE RenderStyle; // Style to draw this actor with DWORD renderflags; // Different rendering flags - WORD picnum; // Draw this instead of sprite if != 0xffff + int picnum; // Draw this instead of sprite if != 0xffff SWORD TIDtoHate; // TID of things to hate (0 if none) DWORD effects; // [RH] see p_effect.h fixed_t alpha; diff --git a/src/g_level.cpp b/src/g_level.cpp index edd82fa2d2..2f9634c447 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -3064,7 +3064,7 @@ static void ParseSkill () else if (SC_Compare ("damagefactor")) { SC_MustGetFloat (); - skill.AmmoFactor = FLOAT2FIXED(sc_Float); + skill.DamageFactor = FLOAT2FIXED(sc_Float); } else if (SC_Compare ("fastmonsters")) { diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index 963150db6e..625fb1dd55 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -1497,8 +1497,7 @@ AInventory *ABackpackItem::CreateCopy (AActor *other) { const PClass *type = PClass::m_Types[i]; - if (type->ParentClass == RUNTIME_CLASS(AAmmo) && - ((AAmmo *)GetDefaultByType (type))->BackpackAmount > 0) + if (type->ParentClass == RUNTIME_CLASS(AAmmo)) { AAmmo *ammo = static_cast(other->FindInventory (type)); int amount = static_cast(GetDefaultByType(type))->BackpackAmount; @@ -1507,6 +1506,7 @@ AInventory *ABackpackItem::CreateCopy (AActor *other) { amount = FixedMul(amount, G_SkillProperty(SKILLP_AmmoFactor)); } + if (amount < 0) amount = 0; if (ammo == NULL) { // The player did not have the ammo. Add it. ammo = static_cast(Spawn (type, 0, 0, 0, NO_REPLACE)); diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 4ef85a4b19..358cf9f895 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -384,7 +384,7 @@ MapData *P_OpenMapData(const char * mapname) // //=========================================================================== -static void SetTexture (short *texture, DWORD *blend, char *name8) +static void SetTexture (int *texture, DWORD *blend, char *name8) { char name[9]; strncpy (name, name8, 8); @@ -413,7 +413,7 @@ static void SetTexture (short *texture, DWORD *blend, char *name8) } } -static void SetTextureNoErr (short *texture, DWORD *color, char *name8, bool *validcolor) +static void SetTextureNoErr (int *texture, DWORD *color, char *name8, bool *validcolor) { char name[9]; strncpy (name, name8, 8); diff --git a/src/p_switch.cpp b/src/p_switch.cpp index c0ada71c7d..88acd7f712 100644 --- a/src/p_switch.cpp +++ b/src/p_switch.cpp @@ -495,7 +495,7 @@ static int TryFindSwitch (SWORD texture) bool P_ChangeSwitchTexture (side_t *side, int useAgain, BYTE special, bool *quest) { DActiveButton::EWhere where; - short *texture; + int *texture; int i, sound; if ((i = TryFindSwitch (side->toptexture)) != -1) diff --git a/src/r_defs.h b/src/r_defs.h index cbc376a2d1..17d1b9848b 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -302,7 +302,7 @@ struct sector_t BYTE FloorLight, CeilingLight; BYTE FloorFlags, CeilingFlags; - short floorpic, ceilingpic; + int floorpic, ceilingpic; BYTE lightlevel; AActor * SoundTarget; @@ -399,7 +399,7 @@ struct side_s fixed_t rowoffset; // add this to the calculated texture top sector_t* sector; // Sector the SideDef is facing. DBaseDecal* AttachedDecals; // [RH] Decals bound to the wall - short toptexture, bottomtexture, midtexture; // texture indices + int toptexture, bottomtexture, midtexture; // texture indices WORD linenum; DWORD LeftSide, RightSide; // [RH] Group walls into loops WORD TexelLength; diff --git a/wadsrc/mapinfo/doomcommon.txt b/wadsrc/mapinfo/doomcommon.txt index 687fa3d834..6ade281bca 100644 --- a/wadsrc/mapinfo/doomcommon.txt +++ b/wadsrc/mapinfo/doomcommon.txt @@ -18,7 +18,7 @@ skill normal Key h skill hard - SpawnFilter "Normal" + SpawnFilter "Hard" PicName "M_ULTRA" Key u