- Added code submissions for non-piercing railguns and new skill options.

SVN r1706 (trunk)
This commit is contained in:
Christoph Oelckers 2009-07-04 18:17:44 +00:00
commit 635d71e660
25 changed files with 155 additions and 50 deletions

View file

@ -1089,6 +1089,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
}
enum
{
RAF_SILENT = 1,
RAF_NOPIERCE = 2
};
//==========================================================================
//
// customizable railgun attack function
@ -1102,9 +1108,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
ACTION_PARAM_BOOL(UseAmmo, 2);
ACTION_PARAM_COLOR(Color1, 3);
ACTION_PARAM_COLOR(Color2, 4);
ACTION_PARAM_BOOL(Silent, 5);
ACTION_PARAM_INT(Flags, 5);
ACTION_PARAM_FLOAT(MaxDiff, 6);
ACTION_PARAM_CLASS(PuffType, 7);
ACTION_PARAM_CLASS(PuffType, 7);
if (!self->player) return;
@ -1116,7 +1122,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_RailAttack)
if (!weapon->DepleteAmmo(weapon->bAltFire, true)) return; // out of ammo
}
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffType);
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, (Flags & RAF_SILENT), PuffType, (!(Flags & RAF_NOPIERCE)));
}
//==========================================================================
@ -1138,7 +1144,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
ACTION_PARAM_INT(Spawnofs_XY, 1);
ACTION_PARAM_COLOR(Color1, 2);
ACTION_PARAM_COLOR(Color2, 3);
ACTION_PARAM_BOOL(Silent, 4);
ACTION_PARAM_INT(Flags, 4);
ACTION_PARAM_INT(aim, 5);
ACTION_PARAM_FLOAT(MaxDiff, 6);
ACTION_PARAM_CLASS(PuffType, 7);
@ -1201,7 +1207,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomRailgun)
angle_t angle = (self->angle - ANG90) >> ANGLETOFINESHIFT;
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, Silent, PuffType);
P_RailAttack (self, Damage, Spawnofs_XY, Color1, Color2, MaxDiff, (Flags & RAF_SILENT), PuffType, (!(Flags & RAF_NOPIERCE)));
self->x = saved_x;
self->y = saved_y;