mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
e15f80f640
3 changed files with 19 additions and 4 deletions
|
@ -1297,6 +1297,11 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
|
|||
// A_FireProjectile
|
||||
//
|
||||
//==========================================================================
|
||||
enum FP_Flags
|
||||
{
|
||||
FPF_AIMATANGLE = 1,
|
||||
FPF_TRANSFERTRANSLATION = 2,
|
||||
};
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
|
||||
{
|
||||
ACTION_PARAM_START(7);
|
||||
|
@ -1305,11 +1310,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
|
|||
ACTION_PARAM_BOOL(UseAmmo, 2);
|
||||
ACTION_PARAM_INT(SpawnOfs_XY, 3);
|
||||
ACTION_PARAM_FIXED(SpawnHeight, 4);
|
||||
ACTION_PARAM_BOOL(AimAtAngle, 5);
|
||||
ACTION_PARAM_INT(Flags, 5);
|
||||
ACTION_PARAM_ANGLE(pitch, 6);
|
||||
|
||||
if (!self->player) return;
|
||||
|
||||
|
||||
player_t *player=self->player;
|
||||
AWeapon * weapon=player->ReadyWeapon;
|
||||
AActor *linetarget;
|
||||
|
@ -1327,18 +1333,23 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
|
|||
fixed_t z = SpawnHeight;
|
||||
fixed_t shootangle = self->angle;
|
||||
|
||||
if (AimAtAngle) shootangle+=Angle;
|
||||
if (Flags & FPF_AIMATANGLE) shootangle += Angle;
|
||||
|
||||
// Temporarily adjusts the pitch
|
||||
fixed_t SavedPlayerPitch = self->pitch;
|
||||
self->pitch -= pitch;
|
||||
AActor * misl=P_SpawnPlayerMissile (self, x, y, z, ti, shootangle, &linetarget);
|
||||
self->pitch = SavedPlayerPitch;
|
||||
if (Flags & FPF_TRANSFERTRANSLATION)
|
||||
{
|
||||
misl->Translation = self->Translation;
|
||||
}
|
||||
|
||||
// automatic handling of seeker missiles
|
||||
if (misl)
|
||||
{
|
||||
if (linetarget && misl->flags2&MF2_SEEKERMISSILE) misl->tracer=linetarget;
|
||||
if (!AimAtAngle)
|
||||
if (!(Flags & FPF_AIMATANGLE))
|
||||
{
|
||||
// This original implementation is to aim straight ahead and then offset
|
||||
// the angle from the resulting direction.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
</assembly>
|
|
@ -164,6 +164,10 @@ const int CPF_DAGGER = 2;
|
|||
const int CPF_PULLIN = 4;
|
||||
const int CPF_NORANDOMPUFFZ = 8;
|
||||
|
||||
// Flags for A_CustomMissile
|
||||
const int FPF_AIMATANGLE = 1;
|
||||
const int FPF_TRANSFERTRANSLATION = 2;
|
||||
|
||||
// Flags for A_Teleport
|
||||
const int TF_TELEFRAG = 1;const int TF_RANDOMDECIDE = 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue