Merge pull request #374 from MajorCooke/A_SetFloatSpeed

- Added A_SetFloatSpeed.
This commit is contained in:
coelckers 2015-09-07 08:56:21 +02:00
commit dae0e217d1
2 changed files with 24 additions and 1 deletions

View file

@ -5071,7 +5071,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_DropItem)
// A_SetSpeed // A_SetSpeed
// //
//========================================================================== //==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpeed) DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpeed)
{ {
ACTION_PARAM_START(2); ACTION_PARAM_START(2);
@ -5089,6 +5088,28 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpeed)
ref->Speed = speed; ref->Speed = speed;
} }
//==========================================================================
//
// A_SetFloatSpeed
//
//==========================================================================
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetFloatSpeed)
{
ACTION_PARAM_START(2);
ACTION_PARAM_FIXED(speed, 0);
ACTION_PARAM_INT(ptr, 1);
AActor *ref = COPY_AAPTR(self, ptr);
if (!ref)
{
ACTION_SET_RESULT(false);
return;
}
ref->FloatSpeed = speed;
}
//=========================================================================== //===========================================================================
// //
// Common A_Damage handler // Common A_Damage handler
@ -5823,3 +5844,4 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetRipMax)
ACTION_PARAM_INT(max, 0); ACTION_PARAM_INT(max, 0);
self->RipLevelMax = max; self->RipLevelMax = max;
} }

View file

@ -304,6 +304,7 @@ ACTOR Actor native //: Thinker
action native A_SetDamageType(name damagetype); action native A_SetDamageType(name damagetype);
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_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");