From cf04ebb774802e9c466093526d7bae184b5bfef3 Mon Sep 17 00:00:00 2001 From: Xaser Acheron Date: Tue, 11 Jan 2022 11:28:48 -0600 Subject: [PATCH] fix MBF21 A_WeaponProjectile spawn position --- wadsrc/static/zscript/actors/mbf21.zs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wadsrc/static/zscript/actors/mbf21.zs b/wadsrc/static/zscript/actors/mbf21.zs index a8fbd40b3..1a8f76fbb 100644 --- a/wadsrc/static/zscript/actors/mbf21.zs +++ b/wadsrc/static/zscript/actors/mbf21.zs @@ -316,11 +316,9 @@ extend class Weapon FTranslatedLineTarget t; angle += self.angle; - double x = Spawnofs_xy * cos(angle); - double y = Spawnofs_xy * sin(angle); - let pos = self.Vec3Offset(x, y, Spawnofs_z); + Vector2 ofs = AngleToVector(self.Angle - 90, spawnofs_xy); - let mo = SpawnPlayerMissile(type, angle, pos.X, pos.Y, pos.Z, pLineTarget: t); + let mo = SpawnPlayerMissile(type, angle, ofs.x, ofs.y, Spawnofs_z, pLineTarget: t); if (!mo) return; Pitch += mo.PitchFromVel();