- removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code.
This commit is contained in:
parent
d6d3dd038e
commit
0e095b0c05
15 changed files with 124 additions and 157 deletions
|
|
@ -371,8 +371,8 @@ void DBot::WhatToGet (AActor *item)
|
|||
return;
|
||||
auto ammo1 = heldWeapon->PointerVar<AInventory>(NAME_Ammo1);
|
||||
auto ammo2 = heldWeapon->PointerVar<AInventory>(NAME_Ammo2);
|
||||
if ((ammo1 == NULL || ammo1->Amount >= ammo1->MaxAmount) &&
|
||||
(ammo2 == NULL || ammo2->Amount >= ammo2->MaxAmount))
|
||||
if ((ammo1 == NULL || ammo1->IntVar(NAME_Amount) >= ammo1->MaxAmount) &&
|
||||
(ammo2 == NULL || ammo2->IntVar(NAME_Amount) >= ammo2->MaxAmount))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -384,7 +384,7 @@ void DBot::WhatToGet (AActor *item)
|
|||
auto parent = item->GetClass();
|
||||
while (parent->ParentClass != ac) parent = static_cast<PClassActor*>(parent->ParentClass);
|
||||
AInventory *holdingammo = player->mo->FindInventory(parent);
|
||||
if (holdingammo != NULL && holdingammo->Amount >= holdingammo->MaxAmount)
|
||||
if (holdingammo != NULL && holdingammo->IntVar(NAME_Amount) >= holdingammo->MaxAmount)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue