- added Gez's submission for inventory restrictions but changed the added checks to be in the main CallTryPickup function.
SVN r3296 (trunk)
This commit is contained in:
parent
a0bb1c2546
commit
3c47a30249
17 changed files with 158 additions and 199 deletions
|
|
@ -72,6 +72,30 @@ void AWeapon::Serialize (FArchive &arc)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
bool AWeapon::TryPickupRestricted (AActor *&toucher)
|
||||
{
|
||||
// Wrong class, but try to pick up for ammo
|
||||
if (ShouldStay())
|
||||
{ // Can't pick up weapons for other classes in coop netplay
|
||||
return false;
|
||||
}
|
||||
|
||||
bool gaveSome = (NULL != AddAmmo (toucher, AmmoType1, AmmoGive1));
|
||||
gaveSome |= (NULL != AddAmmo (toucher, AmmoType2, AmmoGive2));
|
||||
if (gaveSome)
|
||||
{
|
||||
GoAwayAndDie ();
|
||||
}
|
||||
return gaveSome;
|
||||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// AWeapon :: TryPickup
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
bool AWeapon::TryPickup (AActor *&toucher)
|
||||
{
|
||||
FState * ReadyState = FindState(NAME_Ready);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue