From 228c447a02c1ca32bb654378f03905907798e461 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 27 Mar 2016 14:20:14 +0200 Subject: [PATCH] - fixed: A_FireCustomMissile used the player position as offset. --- src/thingdef/thingdef_codeptr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 19cd555e62..e403de07d6 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1642,7 +1642,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile) if (ti) { DAngle ang = self->Angles.Yaw - 90; - DVector3 ofs = self->Vec3Angle(spawnofs_xy, ang, spawnheight); + DVector2 ofs = ang.ToVector(spawnofs_xy); DAngle shootangle = self->Angles.Yaw; if (flags & FPF_AIMATANGLE) shootangle += angle; @@ -1650,7 +1650,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile) // Temporarily adjusts the pitch DAngle saved_player_pitch = self->Angles.Pitch; self->Angles.Pitch -= pitch; - AActor * misl=P_SpawnPlayerMissile (self, ofs.X, ofs.Y, ofs.Z, ti, shootangle, &t, NULL, false, (flags & FPF_NOAUTOAIM) != 0); + AActor * misl=P_SpawnPlayerMissile (self, ofs.X, ofs.Y, spawnheight, ti, shootangle, &t, NULL, false, (flags & FPF_NOAUTOAIM) != 0); self->Angles.Pitch = saved_player_pitch; // automatic handling of seeker missiles