diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 992c65624..feffba4a5 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,13 @@ -July 15, 2009 +July 16, 2009 +- Added HotWax's A_SetArg. +- Gez's patch for more A_WeaponReady flags: + * WRF_NOBOB (1): Weapon won't bob + * WRF_NOFIRE (12): Weapon won't fire at all + * WRF_NOSWITCH (2): Weapon can't be switched off + * WRF_NOPRIMARY (4): Weapon will not fire its main attack + * WRF_NOSECONDARY (8): Weapon will not fire its alt attack + +July 15, 2009 - Attempt to add support for Microsoft's SideWinder Strategic Commander. July 14, 2009 diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 52de61485..c991bf374 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -2749,3 +2749,22 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ChangeVelocity) CheckStopped(self); } } + +//=========================================================================== +// +// A_SetArg +// +//=========================================================================== + +DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetArg) +{ + ACTION_PARAM_START(2); + ACTION_PARAM_INT(pos, 0); + ACTION_PARAM_INT(value, 1); + + // Set the value of the specified arg + if ((size_t)pos < countof(self->args)) + { + self->args[pos] = value; + } +} diff --git a/wadsrc/static/actors/actor.txt b/wadsrc/static/actors/actor.txt index 425863b75..3a5e5c5ee 100644 --- a/wadsrc/static/actors/actor.txt +++ b/wadsrc/static/actors/actor.txt @@ -249,6 +249,7 @@ ACTOR Actor native //: Thinker action native A_SetPitch(float pitch); action native A_ScaleVelocity(float scale); action native A_ChangeVelocity(float x = 0, float y = 0, float z = 0, int flags = 0); + action native A_SetArg(int pos, int value); States {