- scriptified A_SpawnItem(Ex) and A_ThrowGrenade.

These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
This commit is contained in:
Christoph Oelckers 2018-11-24 17:01:12 +01:00
commit b4c272ddff
5 changed files with 361 additions and 474 deletions

View file

@ -227,30 +227,6 @@ bool AWeapon::CheckAmmo(int fireMode, bool autoSwitch, bool requireAmmo, int amm
return false;
}
//===========================================================================
//
// AWeapon :: DepleteAmmo
//
// Use up some of the weapon's ammo. Returns true if the ammo was successfully
// depleted. If checkEnough is false, then the ammo will always be depleted,
// even if it drops below zero.
//
//===========================================================================
bool AWeapon::DepleteAmmo(bool altFire, bool checkEnough, int ammouse)
{
IFVIRTUAL(AWeapon, DepleteAmmo)
{
VMValue params[] = { (DObject*)this, altFire, checkEnough, ammouse };
VMReturn ret;
int retval;
ret.IntAt(&retval);
VMCall(func, params, 4, &ret, 1);
return !!retval;
}
return false;
}
//===========================================================================
//
// AWeapon :: GetUpState