- Be stricter about types accepted by spawning functions.
SVN r2265 (scripting)
This commit is contained in:
parent
549ddf8035
commit
06995e26d9
59 changed files with 192 additions and 186 deletions
|
|
@ -1660,7 +1660,7 @@ AInventory *ABackpackItem::CreateCopy (AActor *other)
|
|||
if (amount < 0) amount = 0;
|
||||
if (ammo == NULL)
|
||||
{ // The player did not have the ammo. Add it.
|
||||
ammo = static_cast<AAmmo *>(Spawn (type, 0, 0, 0, NO_REPLACE));
|
||||
ammo = static_cast<AAmmo *>(Spawn(atype, 0, 0, 0, NO_REPLACE));
|
||||
ammo->Amount = bDepleted ? 0 : amount;
|
||||
if (ammo->BackpackMaxAmount > ammo->MaxAmount)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue