- Be stricter about types accepted by spawning functions.

SVN r2265 (scripting)
This commit is contained in:
Randy Heit 2010-04-03 04:07:17 +00:00
commit 06995e26d9
59 changed files with 192 additions and 186 deletions

View file

@ -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)
{