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:
parent
cd563cc4db
commit
9348baeeb1
27 changed files with 74 additions and 89 deletions
|
|
@ -289,7 +289,7 @@ void DBot::ThinkForMove (ticcmd_t *cmd)
|
|||
r = pr_botmove();
|
||||
if (r < 128)
|
||||
{
|
||||
TThinkerIterator<AInventory> it (MAX_STATNUM+1, bglobal.firstthing);
|
||||
TThinkerIterator<AActor> it (NAME_Inventory, MAX_STATNUM+1, bglobal.firstthing);
|
||||
auto item = it.Next();
|
||||
|
||||
if (item != NULL || (item = it.Next()) != NULL)
|
||||
|
|
@ -362,9 +362,7 @@ void DBot::WhatToGet (AActor *item)
|
|||
if (item->IsKindOf(NAME_Weapon))
|
||||
{
|
||||
// FIXME
|
||||
AInventory *heldWeapon;
|
||||
|
||||
heldWeapon = player->mo->FindInventory(item->GetClass());
|
||||
auto heldWeapon = player->mo->FindInventory(item->GetClass());
|
||||
if (heldWeapon != NULL)
|
||||
{
|
||||
if (!weapgiveammo)
|
||||
|
|
@ -383,7 +381,7 @@ void DBot::WhatToGet (AActor *item)
|
|||
auto ac = PClass::FindActor(NAME_Ammo);
|
||||
auto parent = item->GetClass();
|
||||
while (parent->ParentClass != ac) parent = static_cast<PClassActor*>(parent->ParentClass);
|
||||
AInventory *holdingammo = player->mo->FindInventory(parent);
|
||||
AActor *holdingammo = player->mo->FindInventory(parent);
|
||||
if (holdingammo != NULL && holdingammo->IntVar(NAME_Amount) >= holdingammo->IntVar(NAME_MaxAmount))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue