From 8410ac760aa69239f175d871d1a96bcc2c4aab67 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 13 Mar 2013 04:04:48 +0000 Subject: [PATCH] - Added A_SetDamageType. SVN r4180 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 16 +++++++++++++++- wadsrc/static/actors/actor.txt | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index c86c78a15..e57f58fb2 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -4509,4 +4509,18 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetTics) ACTION_PARAM_INT(tics_to_set, 0); self->tics = tics_to_set; -} \ No newline at end of file +} + +//========================================================================== +// +// A_SetDamageType +// +//========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetDamageType) +{ + ACTION_PARAM_START(1); + ACTION_PARAM_NAME(damagetype, 0); + + self->DamageType = damagetype; +} diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index f7ee26769..b4024878f 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -295,6 +295,7 @@ ACTOR Actor native //: Thinker action native A_SetSpecial(int spec, int arg0 = 0, int arg1 = 0, int arg2 = 0, int arg3 = 0, int arg4 = 0); 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_CheckSightOrRange(float distance, state label);