diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 476c29eafe..456a1d6e37 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -4951,3 +4951,19 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetDamageType) self->DamageType = damagetype; } + +//========================================================================== +// +// A_DropItem +// +//========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DropItem) +{ + ACTION_PARAM_START(3); + ACTION_PARAM_CLASS(spawntype, 0); + ACTION_PARAM_INT(amount, 1); + ACTION_PARAM_INT(chance, 2); + + P_DropItem(self, spawntype, amount, chance); +} diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 0ea0184224..31051a1a17 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -300,6 +300,7 @@ ACTOR Actor native //: Thinker action native A_Quake(int intensity, int duration, int damrad, int tremrad, sound sfx = "world/quake"); action native A_SetTics(int tics); action native A_SetDamageType(name damagetype); + action native A_DropItem(class item, int dropamount = -1, int chance = -1); action native A_CheckSightOrRange(float distance, state label); action native A_CheckRange(float distance, state label);