- added a no-parameter Spawn function for inventory items that never show on the map, because the coordinate and replacement parameters will always be 0 for them.
- started converting g_hexen. Most importantly this removes CHolyWeave as it is just a specialized version of A_Weave with far more convoluted use of parameters.
This commit is contained in:
parent
4e60ea0252
commit
f1602882c8
33 changed files with 168 additions and 175 deletions
|
|
@ -387,7 +387,7 @@ AAmmo *AWeapon::AddAmmo (AActor *other, PClassActor *ammotype, int amount)
|
|||
ammo = static_cast<AAmmo *>(other->FindInventory (ammotype));
|
||||
if (ammo == NULL)
|
||||
{
|
||||
ammo = static_cast<AAmmo *>(Spawn (ammotype, 0, 0, 0, NO_REPLACE));
|
||||
ammo = static_cast<AAmmo *>(Spawn (ammotype));
|
||||
ammo->Amount = MIN (amount, ammo->MaxAmount);
|
||||
ammo->AttachToOwner (other);
|
||||
}
|
||||
|
|
@ -449,7 +449,7 @@ AWeapon *AWeapon::AddWeapon (PClassWeapon *weapontype)
|
|||
weap = static_cast<AWeapon *>(Owner->FindInventory (weapontype));
|
||||
if (weap == NULL)
|
||||
{
|
||||
weap = static_cast<AWeapon *>(Spawn (weapontype, 0, 0, 0, NO_REPLACE));
|
||||
weap = static_cast<AWeapon *>(Spawn (weapontype));
|
||||
weap->AttachToOwner (Owner);
|
||||
}
|
||||
return weap;
|
||||
|
|
@ -749,7 +749,7 @@ bool AWeaponGiver::TryPickup(AActor *&toucher)
|
|||
{
|
||||
if (master == NULL)
|
||||
{
|
||||
master = weap = static_cast<AWeapon*>(Spawn(di->Name, 0, 0, 0, NO_REPLACE));
|
||||
master = weap = static_cast<AWeapon*>(Spawn(di->Name));
|
||||
if (weap != NULL)
|
||||
{
|
||||
weap->ItemFlags &= ~IF_ALWAYSPICKUP; // use the flag of this item only.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue