From 6164807e97764047ef39699a7602ee9860d4d5c7 Mon Sep 17 00:00:00 2001 From: Shawn Walker Date: Sat, 21 Jun 2014 22:49:42 -0700 Subject: [PATCH 1/2] - fix x64 visual studio linking for common controls --- src/win32/zdoom.exe.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e56e525d0ff9b946031058278013bda688bb60d4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 22 Jun 2014 08:55:21 +0200 Subject: [PATCH 2/2] - A_FireCustomMissile transfer tranlsation flag, code submission by jpalomo --- src/thingdef/thingdef_codeptr.cpp | 17 ++++++++++++++--- wadsrc/static/actors/constants.txt | 4 ++++ 2 files changed, 18 insertions(+), 3 deletions(-) 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/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;