diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 43cb34c8d3..9055f7b913 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -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. diff --git a/src/win32/zdoom.exe.manifest b/src/win32/zdoom.exe.manifest index e8fb80f97b..4aee7a96cf 100644 --- a/src/win32/zdoom.exe.manifest +++ b/src/win32/zdoom.exe.manifest @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/wadsrc/static/actors/constants.txt b/wadsrc/static/actors/constants.txt index 0ea5060e25..0332d09a31 100644 --- a/wadsrc/static/actors/constants.txt +++ b/wadsrc/static/actors/constants.txt @@ -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;