- added some options to A_CustomPunch, including calling Strife's dagger alert function.
SVN r2367 (trunk)
This commit is contained in:
parent
4d86ebddf9
commit
ec44397881
4 changed files with 21 additions and 3 deletions
|
|
@ -1125,12 +1125,20 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
|
|||
// Berserk is not handled here. That can be done with A_CheckIfInventory
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
enum
|
||||
{
|
||||
CPF_USEAMMO = 1,
|
||||
CPF_DAGGER = 2,
|
||||
CPF_PULLIN = 4,
|
||||
};
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
||||
{
|
||||
ACTION_PARAM_START(5);
|
||||
ACTION_PARAM_INT(Damage, 0);
|
||||
ACTION_PARAM_BOOL(norandom, 1);
|
||||
ACTION_PARAM_BOOL(UseAmmo, 2);
|
||||
ACTION_PARAM_INT(flags, 2);
|
||||
ACTION_PARAM_CLASS(PuffType, 3);
|
||||
ACTION_PARAM_FIXED(Range, 4);
|
||||
ACTION_PARAM_FIXED(LifeSteal, 5);
|
||||
|
|
@ -1152,7 +1160,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
|||
pitch = P_AimLineAttack (self, angle, Range, &linetarget);
|
||||
|
||||
// only use ammo when actually hitting something!
|
||||
if (UseAmmo && linetarget && weapon)
|
||||
if ((flags & CPF_USEAMMO) && linetarget && weapon)
|
||||
{
|
||||
if (!weapon->DepleteAmmo(weapon->bAltFire, true)) return; // out of ammo
|
||||
}
|
||||
|
|
@ -1173,6 +1181,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
|
|||
self->y,
|
||||
linetarget->x,
|
||||
linetarget->y);
|
||||
|
||||
if (flags & CPF_PULLIN) self->flags |= MF_JUSTATTACKED;
|
||||
if (flags & CPF_DAGGER) P_DaggerAlert (self, linetarget);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue