mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
Fix A_CustomBulletAttack's spawnofs_xy parameter
The current behaviour offsets to the front of the actor rather than the side, due to an oversight in the code, which oddly is not present in the A_FireBullets equivalent.
This commit is contained in:
parent
dc612703d5
commit
3e3d21cd35
1 changed files with 3 additions and 4 deletions
|
@ -92,11 +92,10 @@ extend class Actor
|
|||
let puff = LineAttack(pangle, range, slope, damage, 'Hitscan', pufftype, laflags);
|
||||
if (missile != null && pufftype != null)
|
||||
{
|
||||
double x = Spawnofs_xy * cos(pangle);
|
||||
double y = Spawnofs_xy * sin(pangle);
|
||||
|
||||
double ang = pangle - 90;
|
||||
let ofs = AngleToVector(ang, Spawnofs_xy);
|
||||
let pos = self.pos;
|
||||
SetXYZ(Vec3Offset(x, y, 0.));
|
||||
SetXYZ(Vec3Offset(ofs.x, ofs.y, 0.));
|
||||
let proj = SpawnMissileAngleZSpeed(Pos.Z + GetBobOffset() + Spawnheight, missile, self.Angle, 0, GetDefaultByType(missile).Speed, self, false);
|
||||
SetXYZ(pos);
|
||||
|
||||
|
|
Loading…
Reference in a new issue