Removed all remaining references to AInventory

What remains is the class definition and one single reference that will be scriptified.
This commit is contained in:
Christoph Oelckers 2018-12-04 17:11:36 +01:00
commit 9348baeeb1
27 changed files with 74 additions and 89 deletions

View file

@ -1532,7 +1532,7 @@ static int PatchSprite (int sprNum)
static int PatchAmmo (int ammoNum)
{
PClassActor *ammoType = NULL;
AInventory *defaultAmmo = NULL;
AActor *defaultAmmo = NULL;
int result;
int oldclip;
int dummy;
@ -1545,7 +1545,7 @@ static int PatchAmmo (int ammoNum)
ammoType = AmmoNames[ammoNum];
if (ammoType != NULL)
{
defaultAmmo = (AInventory*)GetDefaultByType (ammoType);
defaultAmmo = GetDefaultByType (ammoType);
if (defaultAmmo != NULL)
{
max = &defaultAmmo->IntVar(NAME_MaxAmount);
@ -1587,7 +1587,7 @@ static int PatchAmmo (int ammoNum)
if (type->IsDescendantOf (ammoType))
{
defaultAmmo = (AInventory *)GetDefaultByType (type);
defaultAmmo = GetDefaultByType (type);
defaultAmmo->IntVar(NAME_MaxAmount) = *max;
defaultAmmo->IntVar(NAME_Amount) = Scale (defaultAmmo->IntVar(NAME_Amount), *per, oldclip);
}
@ -1615,7 +1615,7 @@ static int PatchWeapon (int weapNum)
{
int result;
PClassActor *type = nullptr;
AInventory *info = nullptr;
AActor *info = nullptr;
bool patchedStates = false;
FStateDefinitions statedef;
@ -1624,7 +1624,7 @@ static int PatchWeapon (int weapNum)
type = WeaponNames[weapNum];
if (type != NULL)
{
info = (AInventory*)GetDefaultByType (type);
info = GetDefaultByType (type);
DPrintf (DMSG_SPAMMY, "Weapon %d\n", weapNum);
}
}