- added A_GunFlash extension submission.

SVN r3217 (trunk)
This commit is contained in:
Christoph Oelckers 2011-05-26 23:29:36 +00:00
parent 6053627c5c
commit 60a411c9ad
3 changed files with 12 additions and 3 deletions

View file

@ -660,10 +660,16 @@ DEFINE_ACTION_FUNCTION(AInventory, A_Raise)
// //
// A_GunFlash // A_GunFlash
// //
enum GF_Flags
{
GFF_NOEXTCHANGE = 1,
};
DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_GunFlash) DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_GunFlash)
{ {
ACTION_PARAM_START(1) ACTION_PARAM_START(2)
ACTION_PARAM_STATE(flash, 0); ACTION_PARAM_STATE(flash, 0);
ACTION_PARAM_INT(Flags, 1);
player_t *player = self->player; player_t *player = self->player;
@ -671,7 +677,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AInventory, A_GunFlash)
{ {
return; return;
} }
player->mo->PlayAttacking2 (); if(!(Flags & GFF_NOEXTCHANGE)) player->mo->PlayAttacking2 ();
if (flash == NULL) if (flash == NULL)
{ {

View file

@ -19,6 +19,9 @@ const int CBAF_NORANDOM = 2;
const int CBAF_EXPLICITANGLE = 4; const int CBAF_EXPLICITANGLE = 4;
const int CBAF_NOPITCH = 8; const int CBAF_NOPITCH = 8;
// Flags for A_GunFlash
const int GFF_NOEXTCHANGE = 1;
// Flags for A_FireBullets // Flags for A_FireBullets
const int FBF_USEAMMO = 1; const int FBF_USEAMMO = 1;
const int FBF_NORANDOM = 2; const int FBF_NORANDOM = 2;

View file

@ -40,7 +40,7 @@ ACTOR Inventory native
action native A_ReFire(state flash = ""); action native A_ReFire(state flash = "");
action native A_ClearReFire(); action native A_ClearReFire();
action native A_CheckReload(); action native A_CheckReload();
action native A_GunFlash(state flash = ""); action native A_GunFlash(state flash = "", int flags = 0);
action native A_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class<Actor> pufftype = "BulletPuff", int flags = 0, float range = 0, float spread_xy = 2.8125, float spread_z = 0, float lifesteal = 0); action native A_Saw(sound fullsound = "weapons/sawfull", sound hitsound = "weapons/sawhit", int damage = 2, class<Actor> pufftype = "BulletPuff", int flags = 0, float range = 0, float spread_xy = 2.8125, float spread_z = 0, float lifesteal = 0);
action native A_CheckForReload(int counter, state label, bool dontincrement = false); action native A_CheckForReload(int counter, state label, bool dontincrement = false);
action native A_ResetReloadCounter(); action native A_ResetReloadCounter();