- removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
This commit is contained in:
parent
00a48b09e5
commit
b5c4ab8c47
18 changed files with 95 additions and 76 deletions
|
|
@ -369,8 +369,10 @@ void DBot::WhatToGet (AActor *item)
|
|||
{
|
||||
if (!weapgiveammo)
|
||||
return;
|
||||
if ((heldWeapon->Ammo1 == NULL || heldWeapon->Ammo1->Amount >= heldWeapon->Ammo1->MaxAmount) &&
|
||||
(heldWeapon->Ammo2 == NULL || heldWeapon->Ammo2->Amount >= heldWeapon->Ammo2->MaxAmount))
|
||||
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))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue