mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- fixed compilation.
This commit is contained in:
parent
cd0d17dbd5
commit
cd1d96b83a
4 changed files with 12 additions and 2 deletions
|
@ -699,6 +699,15 @@ void AInventory::AbsorbDamage (int damage, FName damageType, int &newdamage)
|
|||
{
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AInventory, AbsorbDamage)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AInventory);
|
||||
PARAM_INT(damage);
|
||||
PARAM_NAME(type);
|
||||
PARAM_POINTER(newdmg, int);
|
||||
self->AbsorbDamage(damage, type, *newdmg);
|
||||
return 0;
|
||||
}
|
||||
//===========================================================================
|
||||
//
|
||||
// AInventory :: ModifyDamage
|
||||
|
|
|
@ -1385,7 +1385,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
|
|||
if (!(flags & (DMG_NO_ARMOR|DMG_FORCED)) && target->Inventory != NULL && damage > 0)
|
||||
{
|
||||
int newdam = damage;
|
||||
newdam = target->AbsorbDamage damage, mod);
|
||||
newdam = target->AbsorbDamage(damage, mod);
|
||||
damage = newdam;
|
||||
if (damage <= 0)
|
||||
{
|
||||
|
|
|
@ -3621,7 +3621,7 @@ int AActor::AbsorbDamage(int damage, FName dmgtype)
|
|||
{
|
||||
IFVIRTUALPTR(item, AInventory, AbsorbDamage)
|
||||
{
|
||||
VMValue params[4] = { (item, damage, dmgtype.GetIndex(), &damage };
|
||||
VMValue params[4] = { item, damage, dmgtype.GetIndex(), &damage };
|
||||
GlobalVMStack.Call(func, params, 4, nullptr, 0, nullptr);
|
||||
}
|
||||
else item->AbsorbDamage(damage, dmgtype, damage);
|
||||
|
|
|
@ -39,6 +39,7 @@ class Inventory : Actor native
|
|||
virtual native void AttachToOwner(Actor user);
|
||||
virtual native void DetachFromOwner();
|
||||
virtual native bool DrawPowerup(int x, int y);
|
||||
virtual native void AbsorbDamage (int damage, Name damageType, out int newdamage);
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue