mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
Merge pull request #390 from MajorCooke/SetPainThreshold
- Added A_SetPainThreshold for the calling actor('s pointer).
This commit is contained in:
commit
c1496ea1bf
2 changed files with 23 additions and 0 deletions
|
@ -5113,6 +5113,28 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetFloatSpeed)
|
||||||
ref->FloatSpeed = speed;
|
ref->FloatSpeed = speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// A_SetPainThreshold
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetPainThreshold)
|
||||||
|
{
|
||||||
|
ACTION_PARAM_START(2);
|
||||||
|
ACTION_PARAM_INT(threshold, 0);
|
||||||
|
ACTION_PARAM_INT(ptr, 1);
|
||||||
|
|
||||||
|
AActor *ref = COPY_AAPTR(self, ptr);
|
||||||
|
|
||||||
|
if (!ref)
|
||||||
|
{
|
||||||
|
ACTION_SET_RESULT(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ref->PainThreshold = threshold;
|
||||||
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
//
|
//
|
||||||
// Common A_Damage handler
|
// Common A_Damage handler
|
||||||
|
|
|
@ -305,6 +305,7 @@ ACTOR Actor native //: Thinker
|
||||||
action native A_DropItem(class<Actor> item, int dropamount = -1, int chance = 256);
|
action native A_DropItem(class<Actor> item, int dropamount = -1, int chance = 256);
|
||||||
action native A_SetSpeed(float speed, int ptr = AAPTR_DEFAULT);
|
action native A_SetSpeed(float speed, int ptr = AAPTR_DEFAULT);
|
||||||
action native A_SetFloatSpeed(float speed, int ptr = AAPTR_DEFAULT);
|
action native A_SetFloatSpeed(float speed, int ptr = AAPTR_DEFAULT);
|
||||||
|
action native A_SetPainThreshold(int threshold, int ptr = AAPTR_DEFAULT);
|
||||||
action native A_DamageSelf(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = "None", name species = "None");
|
action native A_DamageSelf(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = "None", name species = "None");
|
||||||
action native A_DamageTarget(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = "None", name species = "None");
|
action native A_DamageTarget(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = "None", name species = "None");
|
||||||
action native A_DamageMaster(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = "None", name species = "None");
|
action native A_DamageMaster(int amount, name damagetype = "none", int flags = 0, class<Actor> filter = "None", name species = "None");
|
||||||
|
|
Loading…
Reference in a new issue